Skip to main content
Smart Contract Risks5 min read

Blacklist Function

A smart contract function that lets the token owner add specific wallet addresses to a blacklist, preventing those wallets from transferring or selling their tokens.

What Is a Blacklist Function?

A blacklist function is a smart contract feature that lets the token owner add wallet addresses to a deny-list. Blacklisted wallets cannot transfer or sell their tokens. This is one of the most common mechanisms used in honeypot scams — the contract lets anyone buy, but silently blacklists buyers so they can never sell.

How Blacklist Functions Work

The contract typically contains a mapping like mapping(address => bool) isBlacklistedand a function like addToBlacklist(address) that only the owner can call. The transfer function checks this mapping before allowing any transfer:

require(!isBlacklisted[from], "You are blacklisted");
require(!isBlacklisted[to], "Recipient is blacklisted");

If either the sender or recipient is blacklisted, the transaction reverts. The victim's tokens are trapped in their wallet.

Two Blacklist Patterns

1. Auto-Blacklist on Buy

The contract automatically adds every wallet that buys the token to the blacklist. The buyer does not know they have been blacklisted until they try to sell. This is the most aggressive honeypot pattern — every buyer is trapped from the moment they buy.

2. Manual Blacklist

The owner can blacklist specific wallets at any time. They may allow early buyers to sell (to build trust and attract more buyers) and then blacklist later buyers. Or they may blacklist wallets that try to sell large amounts. This is more subtle and harder to detect from a single transaction.

Legitimate vs. Malicious Blacklists

Some legitimate tokens include blacklist functions for regulatory compliance. For example, USDC and USDT can blacklist addresses to comply with sanctions and anti-money-laundering regulations. However, in the context of meme coins, DeFi tokens, and unverified projects, a blacklist function is almost always a scam mechanism.

The key question is: who controls the blacklist and can you trust them? If the token is an established stablecoin from a regulated issuer, the blacklist is for compliance. If the token is an anonymous meme coin, the blacklist is for trapping buyers.

How to Detect a Blacklist Function

GuavaIntel's scanner automatically checks for blacklist functions via GoPlus. If you want to check manually, read the contract source on Etherscan or BscScan and look for:

  • blacklist, addToBlacklist, setBlacklisted
  • _isBlacklisted mapping
  • onlyOwner modifier on blacklist functions
  • Transfer restrictions in the transfer or _transfer function

Frequently Asked Questions

Are all blacklist functions malicious?

Not necessarily. Some legitimate tokens (especially compliance-focused stablecoins like USDC) include blacklist functions to comply with sanctions and regulatory requirements. However, in meme coins and DeFi tokens, a blacklist function is almost always a scam mechanism. Context matters — check the token type and team reputation.

How do I check if a token has a blacklist function?

Use a security scanner like GuavaIntel, which checks for blacklist functions via GoPlus. You can also read the contract source on Etherscan or BscScan — look for functions like 'blacklist', 'addToBlacklist', 'setBlacklisted', or '_isBlacklisted' mappings.

Can I be blacklisted after I buy?

Yes. Some honeypot contracts automatically add every buying wallet to the blacklist. Others let the owner manually blacklist specific wallets at any time. If the contract has a blacklist function, assume your wallet can be blacklisted at any point.

Check Before You Trade

Run a free security scan on any token across Ethereum, BSC, Base, and Solana.

Scan a Token Now