Tax Token V2
Overview
The V2 tax token let you split the tax for different usage:
.png)
When the "Funds Recipient Wallet" section is 100%, a v1 tax token will be created instead
Tax Processor & Dividend
.png)
For every Tax Token V2 launch, the following contracts are deployed:
- Tax Processor - Always deployed
- Dividend Contract - Optionally deployed if dividend distribution is enabled (when
dividendBps > 0)
When the token is still trading on the bonding curve (before DEX migration):
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 distribution
While the token is migrated to DEX and when users trade the Flap Tax Token V2 on DEX:
User 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 can call TaxProcessor.dispatch() to distribute accumulated funds:
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
- Flap Tax Trigger Bot monitors balances and calls
dispatch()when economically viable - Bot pays gas fees to ensure timely distribution
- Anyone can call dispatch() if they want to pay the gas
If dividend contract is deployed (dividendBps > 0):
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 change
Excluded from dividends:
- DEX pool addresses
- Token contract itself
- Dividend contract
- Dead address (0x000...dEaD)
- FlapBlackHole
- Zero address
- Addresses with balance below
minimumShareBalance
Manual Claiming:
Token holder calls withdrawDividends()
β
Dividend contract calculates withdrawable amount
β
If dividendToken == WETH: Unwraps to ETH and sends
If dividendToken == other: Sends ERC20 tokens
β
Updates withdrawnDividends tracking
Automated Claiming (by Bot):
Flap 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 fees
Anyone Can Trigger:
Any external caller can call:
- withdrawDividendsFor(user) - claim for specific user
- distributeDividend([users]) - batch claim for multiple users
- Caller pays gas fees