PirateElon Honeypot
What happened
PirateElon is a BNB Smart Chain token whose transferFrom accepts calls only when the token owner is the from address. De.Fi's REKT database lists it as an exit scam/honeypot and states that the owner could disable the transfer function, which restricted users in selling their tokens. In the code there is no switch: the restriction is permanent and hard-coded.
Plain transfer between wallets is unrestricted, but a sale through a router that pulls tokens with transferFrom from a holder fails.
How it happened
- The constructor sets the supply to the deployer:
balances[msg.sender] = _totalSupply;. A hard-coded address is stored as the owner:address private _owner = 0xCd2Bb8358e739b4dDb4ccE55eDFd222bc7Df2E24;, which equals the deployer address in the deploy transaction. transferhas no restrictions: it subtracts frommsg.senderand adds toto.transferFromstarts withrequire(from == _owner, "You are not the owner!");. For any other holder it reverts, whatever allowance the holder has granted.- A router-based sale calls
transferFrom(holder, pair, amount). For a holder other than_ownerthat call reverts, so the holder cannot sell into a pool. The owner address can move tokens throughtransferFrom. - There is no setter for
_ownerand no function that changes the check, so the code contains no way to lift the restriction. Whether any holder tried to sell, and the amounts involved, are not shown by the source.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.