Sunset Honeypot
What happened
Sunset (SUNS) is a BEP-20 token deployed on BNB Chain on 8 April 2021 at 0x1deae4ca…408738 by 0x620Efa9A…2f82c2. Its transferFrom only moves tokens out of addresses on an allow list, and at deployment only the deployer is on it. DEX sales pull tokens with transferFrom, so holders could buy SUNS but not sell it through a router.
The list, and a mint function that overwrites any address's balance, are controlled by a hard-coded address written as a decimal number, 0xbd486897…439192, not by the visible owner variable. De.Fi's REKT database lists Sunset as an exit scam/honeypot dated 8 April 2021, with no loss figure.
How it happened
- The constructor gives the deployer the whole supply and sets
allow[msg.sender] = true; no other address starts on the list. The on-chain supply is 1,000,000,000,000,000 SUNS (18 decimals). transferFromincludesrequire(allow[_from] == true);. A router sale usestransferFromto move the seller's tokens into the pair, so it reverts for every holder who is not on the list.- Plain
transferhas no such check, so the pair can send tokens to buyers and buying works. - The
onlyOwnermodifier isrequire(msg.sender == address(1080614020421183795110940285280029773222128095634)), which is 0xbd486897…439192. That address, not the deployer stored inowner, can calladdAllow(holder, allowApprove)to let chosen addresses sell, andmint(miner, _value), which setsbalances[miner] = _valuefor any address without changingtotalSupply. transferOwnershiponly rewrites theownervariable, which the modifier never reads, so changing or appearing to give up ownership would not remove these powers.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.