HODLEPUFF Honeypot
What happened
HODLEPUFF (HODLEPUFF, 9 decimals) has an owner-controlled tracing switch that is off by default. While it is on, the first transferFrom with a non-zero sender stores its recipient in nxOwner; from then on transferFrom and transfer to that address revert, so a sale into the trading pair fails if the pair was stored. The owner can switch tracing back off, and the stored nxOwner address also passes the onlyOwner check.
De.Fi's REKT database lists the token as an exit scam/honeypot in which the owner could disable transfers and restrict users from selling; no sale attempt, transaction or loss figure was opened for this record.
How it happened
What the code allows:
tracingisfalseat deployment, and onlysetTracing(bool _tracing) onlyOwnerchanges it. While it is false, both transfer modifiers do nothing.- With
tracingon, thecontextHandlermodifier ontransferFromrunsif(from != address(0) && nxOwner == address(0)) nxOwner = to; else require(to != nxOwner, "Order ContextHandler");. The firsttransferFromafter tracing is enabled stores its recipient asnxOwner; if that call is a sale through a router, the recipient is the pair. - Every later
transferFromtonxOwnerreverts, so a sale that pulls tokens from the holder into the pair fails.transferhas therequestHandlermodifier,if(tracing) require(to != nxOwner, "Handling Request");, which blocks direct transfers to the same address. No address is exempt, including the owner. - Purchases send tokens from the pair to the buyer, so
tois the buyer and the checks do not block them. The block can be lifted bysetTracing(false), and re-applied bysetTracing(true), becausenxOwnerstays stored. onlyOwnerisrequire(msg.sender == owner || msg.sender == nxOwner);. If the firsttransferFromafter tracing is switched on sends tokens to a wallet rather than the pair, that wallet receives the owner's permissions too.emitTransfer(uint256 _input)isonlyOwnerand runsbalances[msg.sender] = balances[msg.sender] + (_input);with an event from the zero address, creating balance for the caller without a cap and without changing_totalSupply.renounceOwnership(address _newOwner)has no access control and only writescurrentOwner, which no check reads;owneris assigned only in the constructor, and no function changes it. The constructor also transfers half of_totalSupplyto 0x00000000…00dEaD.
De.Fi's REKT database lists HODLEPUFF as an exit scam/honeypot dated 2021-06-05 where holders were restricted from selling. A Token Sniffer tweet of 2021-05-05 (no token named) says contracts of this kind block transfers to the LP address. No transaction showing setTracing, the stored nxOwner, a failed sale, emitTransfer, or a liquidity removal was opened for this record.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.