Understanding Tax Tokens & Transfer Fees
Not every token delivers 100% of what leaves a wallet. From classic EVM buy/sell taxes to Solana Token-2022 transfer fees, here is how fee-on-transfer tokens execute, why standard routers fail on them, and how to tell utility from an exit trap.
The short answer
A tax token (or fee-on-transfer token) intercepts every balance transfer and diverts a fraction of the transacted tokens to a treasury, marketing vault, liquidity pool, or existing holders as a dividend.
On EVM chains (BNB Chain, Robinhood Chain, Ethereum), this is implemented by overriding the ERC-20 _transfer() function. On Solana, native SPL tokens cannot tax transfers, but Token-2022 introduces a protocol-level TransferFee extension. Because the recipient receives less than the sender sent, standard AMM swaps revert unless routed through specialized fee-supporting functions or configured with higher slippage.
EVM ERC-20 vs Solana Token-2022
The mechanics differ fundamentally depending on whether you are trading on an EVM chain or on Solana:
| Feature | EVM Custom ERC-20 | Solana Token-2022 |
|---|---|---|
| Implementation | Custom Solidity override in _transfer() | Native runtime extension (TransferFee) |
| Tax Direction | Can differentiate Buy vs Sell vs Transfer | Uniform transfer fee across all transfers |
| Router Requirement | swapExactTokens...SupportingFeeOnTransfer | Token-2022 aware AMMs (Raydium CPMM, Meteora) |
| Mutability Risk | High if admin functions are un-renounced | Can have immutable fee or authority-revoked config |
Buy Tax, Sell Tax, and Transfer Tax
In contract logic, an automated market maker (AMM) like Uniswap or PancakeSwap is simply another wallet address—specifically, the liquidity pair contract. Contracts determine whether an operation is a buy, sell, or wallet-to-wallet transfer by inspecting the sender and recipient:
- Buy Tax: Triggered when
from == pairAddress. The user is buying tokens from the pool. If buy tax is 5%, buying 1,000 tokens delivers 950 tokens to the buyer’s wallet. - Sell Tax: Triggered when
to == pairAddress. The user is selling tokens into the pool. If sell tax is 10%, sending 1,000 tokens to the pair only deposits 900 tokens into the pool for calculation. - Transfer Tax: Triggered on ordinary wallet-to-wallet transfers where neither address is the pair. Many projects waive transfer tax (0%) to allow clean transfers between personal cold wallets and burners.
Why Standard AMM Swaps Fail on Tax Tokens
Standard AMM routers (like Uniswap V2 swapExactTokensForTokens) execute strict balance checks:
- The router calculates the exact output amount based on constant product formula.
- It transfers tokens to the pool and expects the pool balance to rise by exactly that amount.
- If a tax is deducted mid-transfer, the received tokens are less than calculated. The router triggers a
TRANSFER_FAILEDor balance assertion failure, reverting the transaction.
To trade fee-on-transfer tokens on EVM, decentralized frontends must call swapExactTokensForTokensSupportingFeeOnTransferTokens. This specialized function queries the pool’s actual balance difference before and after the transfer rather than assuming an exact mathematical input.
Legitimate Utility vs The Exit Trap
Tax tokens are not inherently malicious; they are used legitimately for:
- Automated Liquidity Seeding: Flap V7 and custom curves route a fraction of the tax into auto-LP generation, deepening liquidity as volume grows.
- Holder Dividends & Reflection: Distributing fees in native gas (BNB/SOL) or quote tokens to loyal holders (e.g. StonkFun transfer tax or Flap rewards).
- Anti-Sniper Defense: Temporary high opening taxes (like Pons 99% decaying tax) that decay to 0% over the first blocks to burn front-running bots.
Red flags that signal a scam:
- Taxes above 10% that never decay.
- Contract owner has an un-capped
setTaxFeePercent()function. - Whitelists that only allow the deployer wallet to sell without maximum tax.
- Total token transfer paused when market cap exceeds target.
The Trencher’s Rulebook for Tax Tokens
- Always inspect tax rates in BscScan / Solscan: Verify if the tax is hard-coded or controlled by an admin key.
- Calculate the Round-Trip Cost: A 5% buy tax and a 5% sell tax means your token must appreciate by at least 11.2% just for your position to break even.
- Adjust Slippage Upwards: Your slippage tolerance on the DEX must be strictly greater than the token’s combined tax rate plus expected price movement.
- Execute a Dust Sell Test: Before buying a significant position in a newly deployed tax token, purchase a small amount and immediately test selling 10% of it to verify that sells are not blocked.
Primary and official sources
Next