SafePaid Honeypot
What happened
SafePaid (SAFEPAID) is a BNB Chain token deployed on 26 March 2021 at 0x50690c33…5766ab. Its internal _transfer calls a fee helper, calculateFeesBeforeSend, that charges no fee at all but reverts with "Error: Can not sell this token" whenever the recipient is flagged in a mapping called PanCakeSwapReciever. The owner sets that flag with setPanCakeSwapReciever, which, unlike the fee whitelist setters, is not disabled by renounceWhitelist.
Once the PancakeSwap pair is flagged, every transfer into the pool, including every sale, reverts, while purchases paid out of the pool still arrive. De.Fi's REKT database lists SafePaid as an exit scam/honeypot, stating that the contract owner could disable the transfer function and so stop users from selling their tokens.
How it happened
- The constructor mints 10,000,000 SAFEPAID to the deployer, who is the
Ownableowner and is also set asfeeDistributor. transferandtransferFromboth run_transfer, which debits the sender and then callscalculateFeesBeforeSend(sender, recipient, amount).- That helper runs
if(PanCakeSwapReciever[recipient]){ revert("Error: Can not sell this token"); }and otherwise returns(amount, 0). The revert undoes the whole call, including the debit. - The owner-only
setPanCakeSwapReciever(address, bool)can flag any address, and nothing inrenounceWhitelistor thecanWhitelistswitch limits it. With the pair flagged, a router sale, which sends the holder's tokens to the pair, reverts; a purchase sends tokens from the pair to the buyer, so it is unaffected. - The flag checks only the recipient, so it also blocks the owner's own transfers into the pair; transfers between ordinary wallets are unaffected.
- The fee settings are cosmetic:
seTxFeestores a value capped at 100, butcalculateFeesBeforeSendnever reads it and always returns a zero fee. renounceOwnership()sets the owner to the zero address, after which no one could add or clear flags; flags already set would stay.
Protocol details
Evidence
- report De.Fi REKT database listing for SafePaid (proof link: Token Sniffer tweet 1386163504470659074) twitter.com
- transaction SafePaid contract creation transaction bscscan.com
- address SafePaid verified contract code on BscScan bscscan.com
- analysis Sourcify exact match for 0x50690c337482100f4351f3d79dc5d64f4e5766ab on BNB Chain repo.sourcify.dev
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.