ELEPHANT Honeypot
What happened
ELEPHANT (ELEPHANT, 18 decimals) on BNB Chain overrides transferFrom with a gate that blocks it unless a trans flag is on or the deployer is a party to the transfer. trans starts as false, and only a holder of MINTER_ROLE can change it with setTrans. A holder selling through a router moves tokens with transferFrom from the holder to the pair, which none of the allowed cases cover, so that call reverts.
De.Fi's REKT database lists the token as an Exit Scam/Honeypot dated 2021-05-19 and says the contract owner could disable the transfer function, which restricted users in selling their tokens. No loss amount or transaction showing the block in use was verified.
How it happened
- The constructor stores the deployer in
moi, setstrans = false, grants the deployerDEFAULT_ADMIN_ROLE,PAUSER_ROLEandMINTER_ROLE, mints1000000000000 * 10 ** decimals()to the deployer and creates the pair with the router's factory. transferFromis overridden withrequire (trans || moi == sender || moi == recipient || sender == UNI);, whereUNIisuniswapV2Pair. Withtransfalse, only transfers where the deployer is sender or recipient, or where the pair is the sender, pass.- A sell through a router calls
transferFromwith the holder assenderand the pair asrecipient. None of the four conditions holds, so the call reverts with no message and no balance changes.transferis not overridden and is gated only by the pause check, so tokens leaving the pair in a buy are not stopped by this line. - The
MINTER_ROLEholder can turn the gate off withsetTrans(bool value), mint more withpiocher(address to, uint256 amount), and thePAUSER_ROLEholder can callpause(), after which_beforeTokenTransferiswhenNotPausedand all transfers revert. renounceOwnership()andlockLiquidity()only emit the eventsOwnershipRenouncedandliquidityLocked; neither changes any role or moves any liquidity.- What happened is limited to what De.Fi's REKT database lists: an Exit Scam/Honeypot on 2021-05-19. The Token Sniffer proof page could not be read and no transaction was opened.
Protocol details
Evidence
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.