What Is a Token Blacklist Function? 5 Checks
A token blacklist function is a piece of contract code that lets an authorized address block specific wallets from sending, selling or receiving the token. A blacklisted wallet can usually still hold its balance, but every transfer attempt fails. For buyers, the function matters because whoever controls it can decide, after you buy, whether you are allowed to sell. What does a blacklist function do in a token contract? Most blacklist functions work through a simple mapping: a list of addresses marked as blocked. Each time someone tries to move tokens, the contract checks that list. If the sender or the recipient is on it, the transfer is rejected and the transaction fails. The code to add or remove addresses is normally restricted to the owner or an admin role. There are legitimate reasons for the feature. Regulated or compliance-focused tokens may need to freeze wallets linked to theft or sanctions. Some projects use it to stop known bots from sniping a launch. The same code, ho...