SAFEGUARD Honeypot
What happened
SAFEGUARD (SAFEGUARD) at 0x8e126d68…82626e on BNB Smart Chain keeps an owner-controlled flag, PanCakeSwapReciever, that is checked on every transfer. If the recipient is flagged, calculateFeesBeforeSend reverts with Error: Can not sell this token, so the whole transfer fails and the sender keeps their balance. The owner sets the flag with setPanCakeSwapReciever.
De.Fi's REKT database lists the token as an Exit Scam/Honeypot and describes it as the contract owner being able to disable the transfer function, which restricted users in selling their tokens; no loss figure is given.
How it happened
What the code allows:
- The constructor makes the deployer the owner and mints
50000e18tokens (50,000) to it. There is no public mint function after that. - Both
transferandtransferFromcall_transfer, which callscalculateFeesBeforeSend(sender, recipient, amount)for every move of tokens. - That function begins with
if(PanCakeSwapReciever[recipient]){ revert("Error: Can not sell this token"); }. A revert undoes the whole transaction, so a transfer to a flagged recipient fails for every sender, including the owner. A sell through a router sends tokens to the pair, so it would fail if the pair address is flagged; the code does not show which addresses are flagged. setPanCakeSwapReciever(address _recipient, bool _feeless)isonlyOwnerand setsPanCakeSwapReciever[_recipient] = _feeless;, so the owner can switch the block on or off for any address at any time. Unlike the other whitelist setters, it is not tied tocanWhitelist, sorenounceWhitelist()does not disable it.- The fee code is cosmetic:
calculateFeesBeforeSendotherwise returns(amount, 0), soseTxFeeandfeeDistributornever take anything.renounceOwnership()exists; if called, the flags would stay as they were at that moment.
De.Fi's REKT database lists the token as an Exit Scam/Honeypot. No transaction showing the owner setting the flag, a failed sell, or liquidity removal was opened.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.