SafeAndromeda Honeypot
What happened
Every transfer of this token passes through a burnTokenCheck modifier that lets only the owner, a stored _safeOwner address and owner-whitelisted addresses move tokens freely. Any other holder can only send tokens to the hard-coded router address 0x05fF2B0DB69458A0750badebc4f9e13aDd608C7F or to the owner, because _sellAmount starts at zero and the exception amount < _sellAmount can never be met. A holder selling into a pair is sending to neither, so the transfer reverts.
The owner can whitelist or blacklist addresses, change _safeOwner and mint. De.Fi's REKT database lists this token as an Exit Scam/Honeypot, saying the owner could disable the transfer function, which restricted users in selling their tokens.
How it happened
- The constructor sets
_owner = owner;and_safeOwner = owner;._sellAmountis initialised to0. The deployed contract has no function that changes_owner. A comment at the top of the source says 8 BNB and 95% of the supply would be added to the pool and locked for 365 days; the code enforces no lock. transferandtransferFromboth call_approveCheck, which carries theburnTokenCheckmodifier. While_owner == _safeOwner, the first transfer out of the owner runsif (_owner == _safeOwner && sender == _owner){_safeOwner = recipient;_;}, so the recipient of the owner's first outgoing transfer becomes_safeOwner. The code alone does not show which address that was.- After that,
if (sender == _owner || sender == _safeOwner || recipient == _owner)passes. Whitelisted senders pass throughif (_whiteAddress[sender] == true){ _;. Both lists are set only by the owner:increaseAllowancewhitelists andaddApproveblacklists, despite their names. - Every other sender reaches
if (amount < _sellAmount). With_sellAmount == 0this is never true, so the code runsrequire((sender == _safeOwner)||(recipient == _unirouter), "ERC20: transfer amount exceeds balance");. Sincesender == _safeOwnerwas already handled above, an ordinary holder can only send to the router address. A swap that pulls tokens from the holder into a pair has a pair asrecipient, not the router or the owner, and reverts. Blacklisted senders face the samerequire. - The owner can change this:
if (sender == _owner && sender == recipient){_sellAmount = amount;}sets_sellAmountwhen the owner transfers tokens to itself. Once it is set, a non-whitelisted sender whoseamount < _sellAmountpasses, but if therecipient == _safeOwnerthe sender is added to_blackAddressand removed from_whiteAddress. decreaseAllowance(address safeOwner)lets the owner reassign_safeOwner, and_mintlets the owner create tokens credited to_balances[_owner].- Buys from a pair also go through the modifier. They pass only if the pair is
_safeOwner, is whitelisted, or is the owner; the code does not show which of these applied.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.