You buy a token on Uniswap. The UI says you received 10,000 tokens. A few hours later, the price has gone up 30%. You try to sell. The transaction confirms, but your wallet receives almost nothing — a 50% "sell tax" silently ate half your output. Or worse: the sell transaction reverts entirely, because the contract owner set the sell tax to 100%, effectively turning the token into a honeypot.
Token taxes — also called transaction fees, buy taxes, or sell taxes — are programmable fees built into a token's smart contract. They are neither inherently good nor inherently evil. Legitimate projects use them to fund development, distribute rewards, or create deflationary pressure. Scammers use the exact same mechanism to trap funds, extract value, and execute rug pulls. The difference is entirely in the implementation details.
This guide explains how token taxes work at the contract level, what separates legitimate tax mechanics from predatory ones, and how to verify tax rates before you ever connect your wallet.
BLUF: Token taxes are programmable fees on buys and sells, coded into the token contract. Safe tax rates are typically 1–10%, transparent, and hard-capped in the contract code. Dangerous patterns include taxes above 25%, variable rates the owner can change at will, asymmetric buy/sell taxes (low buy, high sell), and any tax the owner can set to 100% — which creates a honeypot. Always check the contract source code on a block explorer for the tax function and the maximum rate before buying. Use honeypot detection tools like Honeypot.is or Token Sniffer to simulate the buy and sell in a sandbox.
A standard ERC-20 token has a simple transfer function: move tokens from address A to address B, update balances, emit an event. No fees, no conditions.
A token with taxes modifies this flow. When a transfer happens — specifically when tokens move to or from a DEX liquidity pool — the contract intercepts the transfer, calculates a percentage-based fee, and redirects that fee somewhere other than the recipient.
Here is what happens during a taxed buy on Uniswap:
1. User calls Uniswap swap function
2. DEX pool sends tokens to user's wallet
3. Token contract intercepts the transfer
4. Contract checks: is the sender a DEX pool?
5. If yes → apply buy tax (e.g., 5%)
6. Deduct 5% of the transfer amount
7. Send 95% to the user, 5% to the fee wallet (or burn it)
For sells, the flow is reversed:
1. User sends tokens to the DEX pool
2. Token contract intercepts the transfer
3. Contract checks: is the recipient a DEX pool?
4. If yes → apply sell tax (e.g., 10%)
5. Deduct 10% of the transfer amount
6. Send 90% to the DEX pool, 10% to the fee wallet
The critical word is "intercepts." The token contract's _transfer function has been modified to add conditional logic. This is the same mechanism that honeypots use — the only difference is whether the condition results in "take a fee" or "block the transaction entirely."
Taxed tokens are redirected to one of several destinations:
Destination | What It Means | Risk Level |
|---|---|---|
Project treasury (multi-sig or team wallet) | Funds development, marketing, operations | Low if multi-sig and transparent |
Burn address (0x000...dEaD) | Permanently removed from supply — deflationary | Low |
Liquidity pool (auto-LP) | Added back to the DEX pool to deepen liquidity | Low if automated |
Holder redistribution | Distributed proportionally to all token holders | Low if implemented correctly |
Single EOA controlled by owner | Goes to an externally owned account the owner controls | High — effectively a direct drain |
Nowhere (tax collected but held in contract) | Owner can claim at any time | Medium |
The destination matters as much as the rate. A 5% tax to a transparent multi-sig wallet is reasonable. A 5% tax to a single anonymous EOA is just a slower rug pull.
Not all token taxes are scams. Well-known projects have used them effectively:
Automated liquidity provisioning. Tokens like SafeMoon popularized the "auto-LP" tax: a small percentage of each transaction is used to add liquidity to the DEX pool automatically. This gradually increases price stability and reduces slippage. The mechanism is legitimate when the LP tokens are locked and the rate is modest (1–3%).
Deflationary mechanics. Some tokens burn a percentage of each transaction, reducing total supply over time. This is transparent and verifiable on-chain — you can watch the burn address balance increase with every transaction. See deflationary token for how this works.
Reflection rewards. Holder-reward tokens distribute transaction fees proportionally to all holders. This creates a passive income stream without requiring users to stake. The implementation is complex and has been the source of bugs, but the concept is valid.
Ecosystem funding. Gaming tokens, DeFi protocol tokens, and community coins often charge 1–5% to fund development grants, marketing, or ecosystem growth. This is functionally similar to a management fee in traditional finance.
Factor | Legitimate | Suspicious |
|---|---|---|
Rate | 1–10%, fixed in code | 15%+, or variable and owner-controlled |
Cap | Hard-coded maximum (e.g., | No upper bound — owner can set any rate |
Destination | Multi-sig, burn, auto-LP | Single EOA, owner's wallet |
Symmetry | Buy tax equals or close to sell tax | Sell tax massively higher than buy tax |
Transparency | Documented in whitepaper and docs | Undisclosed, discovered only by code reading |
Renounced/Time-locked | Ownership renounced or admin functions time-locked | Owner retains full control with no lock |
Token taxes become weapons when the contract owner can change the rate at will. Here are the patterns seen repeatedly in exit scams.
The token launches with a 2% buy tax and 2% sell tax. Users buy confidently. Trading volume increases. The community grows. Then, weeks later, the owner calls setSellTax(100) — every sell transaction now sends 100% of the tokens to the fee address. No one can exit. The owner then removes liquidity.
How to detect: Check if the contract has a setFee(), setTax(), setSellTax(), or similar function. If that function exists and has no upper-bound check, the owner can rug at any time.
// DANGEROUS — owner can set any tax rate
function setSellTax(uint256 newTax) external onlyOwner {
sellTax = newTax; // No require(newTax <= MAX_TAX)
}
// SAFER — tax is capped
uint256 public constant MAX_TAX = 10; // 10% hard cap
function setSellTax(uint256 newTax) external onlyOwner {
require(newTax <= MAX_TAX, "Tax exceeds maximum");
sellTax = newTax;
}
Even the "safer" version is not risk-free — the owner can still change the rate up to 10% without notice. The safest version renounces ownership entirely or time-locks the admin key.
Buy tax: 1%. Sell tax: 50%. This creates a trap where entering is cheap but exiting is devastating. Users buy, the price pumps (because demand is uninhibited), and early sellers lose half their tokens to the fee. Late sellers discover the sell tax has increased further — the owner raises it as the pool fills up.
Red flag: Any token where the sell tax is more than 3x the buy tax. Legitimate projects rarely need dramatically higher sell taxes unless they are explicitly anti-speculation (even then, 10–15% is the upper bound of reasonableness).
Some contracts do not expose tax settings as obvious function names. Instead, they manipulate the _transfer function to deduct tokens silently based on internal logic that is hard to audit — dynamic taxes based on time of day, wallet size, or arbitrary conditions.
How to detect: This is where honeypot detection tools become essential. Reading the source code may not be enough if the logic is obfuscated with complex conditionals. Always run a honeypot simulation.
Even a seemingly reasonable 5% tax becomes a scam when the 5% flows to a wallet the owner controls and can drain at any time. The tax is not funding development — it is a slow extraction.
How to detect: Check the fee recipient address on a block explorer. If it is an unlabeled EOA with regular withdrawals to an exchange, it is a personal drain, not a treasury.
Never rely on the project's website or social media for tax information. They can claim "5% tax" while the contract allows the owner to change it to 50%. Always verify on-chain.
Find the token contract address on a block explorer (Etherscan, BscScan, Polygonscan)
Go to the Contract tab and confirm source code is verified
Search the code for:
_fee,_tax,_feeNum,buyFee,sellFee,taxFee,setFee,setTax,SWITCH,tradingEnabledCheck for a
MAX_FEEorMAX_TAXconstant — if it exists, that is the ceilingCheck the
_transferfunction for conditional fee logic
If you want a deeper guide to reading contract source code, see our ERC-20 token security check guide, which walks through every function an auditor examines.
These tools simulate a buy and sell transaction in a sandbox, showing you the actual tax rates applied:
Tool | URL | What It Shows |
|---|---|---|
Honeypot.is | honeypot.is | Simulated buy/sell tax, transfer status, swap simulation |
Token Sniffer | tokensniffer.com | Automated contract analysis, tax detection, trust score |
DexScreener | dexscreener.com | Token page shows buy/sell tax and warns if taxes are high |
GoPlus Security | gopluslabs.com | API-based security data including buy/sell tax rates |
RugCheck | rugcheck.xyz |
Run at least two of these tools. If they disagree, the contract may have dynamic tax logic that changes based on conditions. Treat disagreement as a red flag.
On the block explorer, look at recent sell transactions for the token:
Find a recent sell transaction on the DEX
Check the input token amount vs. the output amount
Calculate the effective tax rate:
1 - (actual_output / expected_output)If sells are failing (status = reverted), the token may have a 100% sell tax or is a full honeypot
If you must buy, test with the minimum tradeable amount first. Buy a small quantity, then immediately try to sell. Compare the received amounts to what the DEX UI predicted. This is the most reliable test, but it costs gas and you may still lose the test amount if the token is a scam.
These patterns in the source code are strong indicators that the token tax is weaponized:
Pattern | Code Signal | Why It Is Dangerous |
|---|---|---|
Uncapped setter |
| Owner can set 100% tax at any time |
Per-address tax |
| Owner can set 100% tax for specific addresses (whistleblowers, large holders) |
Time-based tax | Tax rate changes based on | May start low and increase on a schedule |
Volume-based tax | Tax increases as volume rises | Traps late sellers who entered during high volume |
Trading toggle |
| Owner can pause all trading, trapping holders |
Blacklist + high tax |
| Owner can blacklist sellers or set prohibitive tax selectively |
A common pattern on BNB Chain in 2023–2024:
Developer creates a token with a 5% buy tax and 5% sell tax, fee goes to a "marketing wallet"
Token is promoted heavily on Telegram and Twitter
Early buyers profit, the price pumps 10–50x
Developer waits until the liquidity pool reaches $200K–$500K
Developer calls
setSellTax(99)— sell tax jumps to 99%Panic selling begins, but every sell sends 99% to the developer's wallet
Developer drains the accumulated tax tokens, removes liquidity, disappears
This entire sequence is visible on-chain. The setSellTax transaction is public. The tax wallet's outgoing transactions are public. But most victims never check until it is too late. This is why checking the contract's admin functions before buying — not after — is critical.
For a broader guide on verifying tokens, see our complete token verification checklist.
Token taxes are sometimes confused with other types of crypto fees:
Fee Type | Where It Applies | Who Sets It | Can It Be Changed? |
|---|---|---|---|
Token tax | Inside the token contract | Token developer | Yes, if owner has control |
DEX swap fee | Inside the DEX pool contract | DEX protocol (e.g., Uniswap 0.3%) | No (encoded in pool at creation) |
Slippage tolerance | User's wallet settings | The user | Yes (user adjusts per trade) |
Network layer (Ethereum, BSC) | Network validators | No (market-driven) | |
Bridge fee | Cross-chain bridge protocol | Bridge operator | Varies by bridge |
Token taxes are unique because they are controlled by the token developer — not the DEX, not the network, and not the user. This is why they require the most scrutiny.
Q: What is a safe token tax rate?
A: Generally, 1–10% total (buy + sell combined) is considered reasonable for legitimate projects. Anything above 15% requires strong justification. Above 25% is almost always predatory. A hard cap in the contract code (e.g., MAX_TAX = 10) is an important safety signal.
Q: Can the owner change the tax after I buy?
A: Only if the contract has a setter function (like setSellTax) and ownership has not been renounced. Always check. If ownership is renounced (the owner address is set to the burn address), the tax rate is permanent.
Q: How is token tax different from a honeypot?
A: A honeypot blocks selling entirely. A token tax reduces the amount you receive but still allows selling. However, a 99% sell tax is functionally identical to a honeypot — you can "sell" but receive almost nothing.
Q: Are token taxes visible on DEX interfaces like Uniswap?
A: Partially. Uniswap's interface shows the price impact of your trade, which includes tax, but does not break it out separately. Tools like DexScreener and Poocoin display tax rates explicitly. Always cross-reference with on-chain data.
Q: Can I avoid token taxes?
A: No. The tax is enforced by the smart contract code. If the contract applies a 10% sell tax, every sell transaction pays it. There is no workaround without exploiting a vulnerability in the contract — which would be a separate security issue.
Q: Do token taxes exist on all blockchains?
A: Token taxes are most common on EVM chains (Ethereum, BNB Chain, Polygon, Arbitrum, Base) where ERC-20-compatible contracts allow custom transfer logic. They are rare on Solana, where the SPL token standard does not natively support custom transfer fees in the same way. For chain-specific safety, see our guides for Base, Solana, and Arbitrum.
Before buying any token with a transaction tax, verify these items:
Source code is verified on a block explorer
Buy tax and sell tax rates are identified in the code
Tax rate has a hard-coded maximum (
MAX_TAXor equivalent)Buy and sell taxes are symmetric (or close)
Fee recipient is a multi-sig wallet or burn address, not a single EOA
Contract ownership is renounced or admin functions are time-locked
No blacklist, trading-pause, or per-address tax functions
Honeypot simulation (Honeypot.is or Token Sniffer) passes
Recent sell transactions succeed on-chain with reasonable effective rates
If any item fails, treat the token as high risk. If three or more items fail, do not buy.
Token taxes are a tool. Used responsibly, they fund legitimate projects. Weaponized, they are one of the most common mechanisms for extracting value from unsuspecting buyers. The contract source code does not lie — verify before you buy. For more on protecting yourself against malicious contracts, see our guides on spotting rug pulls and honeypots and preventing wallet drainers.
Originally published at https://theonchaindiary.com/articles/token-taxes-explained/. More Web3 security guides and risk-scoring tools at Onchain Diary.

