SafeCookie Honeypot
What happened
SafeCookie's transfer and transferFrom revert with "please wait" whenever the recipient equals a stored address called newun. That address is set automatically by the first transferFrom call that has a non-zero sender, and the owner can overwrite it at any time with transfernewun. Whichever address newun points at can no longer receive tokens through these functions, so if it is a liquidity pair, holders cannot sell into it.
De.Fi's REKT database lists SafeCookie as an exit scam/honeypot in which the owner could disable the transfer function, restricting users from selling.
How it happened
- The constructor mints the whole supply to the deployer:
balances[owner] = _totalSupply;. transferstarts withrequire(to != newun, "please wait");, so no transfer can end at thenewunaddress.- In
transferFrom,if(from != address(0) && newun == address(0)) newun = to; else require(to != newun, "please wait");locks in the recipient of the first non-zero-sendertransferFromasnewun. That first call itself succeeds. - The write-up at cryptot3ddybear.gitlab.io describes the same pattern: when the first
transferFromis the liquidity add, the pair becomesnewun, buyers can still receive tokens from it, and sells that send tokens back to the pair revert. This record's code does not show which address ended up innewun. - The owner can change
newunwithtransfernewun(address _newun). Setting it toaddress(0)lets the nexttransferFromcapture a new recipient; pointing it at an unused address lifts the block. - A reverted sell does not debit the holder: the
balances[from].sub(tokens)line runs after therequire, so the tokens stay in the holder's wallet but cannot be sold into the blocked address.
Protocol details
Evidence
- report @Token_Sniffer incident report twitter.com
- report De.Fi REKT database listing (proof: Token Sniffer tweet 1381346761566916614, not retrievable) twitter.com
- address BscScan code page for 0x1766fed4b4ad09c5a31afe6e7c58607a537b4b97 bscscan.com
- analysis Sourcify copy of the same contract repo.sourcify.dev
- analysis Scam explained: BSC stealthy LP block cryptot3ddybear.gitlab.io
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.