Skip to main content

What is honeypot token?

U
Written by UKey Wallet

Honeypot token is a class of cryptocurrencies with malicious restrictions. Developers will deliberately add restrictions or backdoors to smart contracts so that ordinary users can Buy token, but not normal sell, or encounter extremely high fees, blacklists and other restrictions when selling, thus leaving funds trapped in token. On the surface, this type of token may look normal: there is a liquidity pool, token logo, and active community promotion. But once users buy on a decentralized exchange, they may find that the sale is rejected, or the transaction fee is so high that it is almost impossible to recover the funds.

How to check and reduce risk

  1. You can OKLINK Wait for the blockchain browser to enter the token contract address (as shown in the example below). If token has been identified as a honeypot, it will usually be marked accordingly. ​

2. Since on-chain will have new token online every day, the risk mark of the blockchain browser may not cover all token in real time, so you can also perform manual self-check through the following method. ​
View the "Read Contract" tab:

owner(): If the return value is not 0x000..., usually means the contract owner retains control.

totalSupply() and balanceOf(): Used to check initial token allocation.

Look for functions or variables such as "isExcludedFromFee(address)", "isBlacklisted(address)", "maxTxAmount()" and "tradingEnabled()" (different contracts may use different names, but their purpose is similar). ​
In the "Write Contract" tab (only accessible if you have Permissions):

Check for the presence of sensitive write functions, e.g. setFeePercent, setBlacklist, renounceOwnership or setTradingEnabled. If these functions exist and can only be called by the contract owner, the risk of token will be higher. ​
Search for the following keywords in the source code (not case sensitive, you can also pay attention to the underlined writing):blacklist, isBot, onlyOwner, setFee, maxTx, exclusionFromFee, trading, swapAndLiquify, transferFrom, approve, mint, burn, renounceOwnership, liquidity.

special attention transfer,_transfer and transferFrom implementations, checking whether they will target to == pair or from == pair Use different logic to differentiate between buying and selling operations.

If you find code like this:

require(!_isBlacklisted[from]); if (to == pair) { fee = 99; }

this is one Obvious red flag. ​
Check if the contract calls the router(such as Pancake/Uniswap Router), and whether the swap process includes lockTheSwap,_tax and other complex logic. These logics may hinder normal transactions.

Did this answer your question?