TIGER Honeypot
What happened
TIGER is a BNB Smart Chain token that overrides transferFrom with a gate controlled by a boolean trans, which starts as false. While it is false, transferFrom works only when the deployer is the sender or recipient, or when the sender is the liquidity pair. De.Fi's REKT database lists the token as an exit scam/honeypot and states that the owner could disable the transfer function, which restricted users in selling their tokens.
The code allows that: a holder selling through a router calls transferFrom with the holder as sender and the pair as recipient, which reverts until a minter-role account sets trans to true.
How it happened
- The constructor records the deployer in a private immutable (
moi = _msgSender();), setstrans = false;, grants the deployer the admin, pauser and minter roles, and mints1000000000000 * 10 ** decimals()tokens to the deployer. It also creates the router's pair for the token. transferFromis overridden:require (trans || moi == sender || moi == recipient || sender == UNI);, whereUNIisuniswapV2Pair.- A sale through a router pulls tokens with
transferFrom(holder, pair, amount). Withtransfalse, the holder is notmoi, the pair is notmoiand the sender is notUNI, so the call reverts. A purchase pays out from the pair; the pair is the sender, which passes thesender == UNIcondition when the pair usestransferFrom, and plaintransferis not overridden. - Only an account with
MINTER_ROLEcan change the gate:function setTrans(bool value) public { require(hasRole(MINTER_ROLE, msg.sender)); trans=value; }. The same role can create tokens withpiocher(address to, uint256 amount), which calls_mint(to, amount). - A pauser can also halt all transfers:
_beforeTokenTransferiswhenNotPaused, andpause()requiresPAUSER_ROLE. - The functions
renounceOwnership()andlockLiquidity()are public with no access check and only emit events (OwnershipRenounced,liquidityLocked); they change no state, so calling them gives up no role and locks no liquidity. - The source does not show whether
setTranswas ever called. De.Fi's REKT database lists the token as a honeypot dated 2021-05-18.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.