Last updated
User buys/sells on Portal bonding curve
β
Portal collects extra trading fee as tax in quote tokens (WETH/BNB/USDT/etc.)
β
Portal sends extra fee to TaxProcessor.processBondingCurveTax(quoteAmount)
β
Tax Processor accumulates quote tokens for later distributionUser trades token on DEX
β
Tax Token V2 applies tax (e.g., 5%) on transfer
β
Tax tokens accumulate in Token contract
β
When threshold reached β Triggers tax liquidation
β
Token contract calls TaxProcessor.processTaxTokens(taxAmount)Anyone calls dispatch()
β
1. Send feeQuoteBalance β Funds Recipient Wallet
2. Send marketQuoteBalance β Market Address
3. Send dividendQuoteBalance β Dividend Contract
4. Process preBondBurnFunds (the quote accumuated on bonding curve phase for the burn):
- If token on bonding curve: Use Portal to buyback & burn
- If token on DEX: Swap quote tokens for tax tokens & burn
5. Process burn:
- Send token to flapBlackHole or Burn address Token holder balance changes (buy/sell/transfer)
β
Token contract calls Dividend.setShare(user, newBalance)
β
Dividend contract updates user's share
β
Settles any pending rewards before share changeToken holder calls withdrawDividends()
β
Dividend contract calculates withdrawable amount
β
If dividendToken == WETH: Unwraps to ETH and sends
If dividendToken == other: Sends ERC20 tokens
β
Updates withdrawnDividends trackingFlap Tax Trigger Bot monitors pending dividends
β
When holder's pending > threshold:
Bot calls distributeDividend([holder1, holder2, ...])
β
Dividend contract sends rewards to holders
β
Bot pays gas feesAny external caller can call:
- withdrawDividendsFor(user) - claim for specific user
- distributeDividend([users]) - batch claim for multiple users
- Caller pays gas fees