Token Blacklist & Whitelist Functions: Why They Block Sells
A blacklist function lets a token owner block specific wallets from transferring or selling, while a whitelist does the inverse by allowing only approved addresses to trade. Both are enforced inside the contract's transfer logic: if your address is flagged, your sell reverts. This is a common honeypot mechanism, since you buy freely and then get blacklisted so you can never sell. The presence of such controls means the owner can freeze your position at any time.
How blacklists and whitelists work
The contract keeps a mapping of addresses and checks it inside _transfer. A blacklist reverts the transfer if your address is flagged; a whitelist reverts unless you are approved. Because buys and sells both route through _transfer, an owner can let you buy and then blacklist you before you sell, trapping your tokens.
Why this is a red flag
Blacklist and whitelist controls hand the owner discretionary power over who can exit. Even if a token trades normally today, the owner can flag your wallet at any time, converting your holding into a frozen, unsellable position, the same result as a honeypot applied selectively.
How Tok{In} detects it
Tok{In} raises has_blacklist_or_whitelist when Gigahorse decompilation finds address-gating logic in the transfer path, and confirms the practical effect with live buy and sell simulation across Ethereum, BSC, Base, Arbitrum, and Avalanche. This surfaces the control even when the function is renamed.
What to do
Treat discretionary blacklist power as a standing risk to your ability to sell, and prefer tokens without it. If you already hold such a token, consider exiting while you can, and re-scan before trading since your status can change between scans.
Check any ERC-20 token for this and 20+ other risks in seconds — free, no wallet connection.
Scan a token →Frequently asked questions
- Can a token stop me from selling?
- Yes. A token with a blacklist function lets the owner flag your wallet so its transfer logic reverts your sell. A whitelist does the same by allowing only approved addresses to trade. Both are enforced on-chain by the contract itself, so there is no support desk to appeal to once you are blocked.
- What is the difference between a blacklist and a whitelist?
- A blacklist blocks named addresses while everyone else trades freely; a whitelist blocks everyone except approved addresses. Both give the owner control over who can transfer or sell. A whitelist is often more restrictive, since trading is disabled by default until the owner explicitly permits an address.
- Are blacklist functions always malicious?
- Not always. Some regulated or stablecoin-style tokens use blacklists to freeze stolen funds or comply with sanctions. In speculative meme and micro-cap tokens, however, a blacklist is far more often a honeypot tool. The safest assumption for an unknown token is that the power can be used against you.