SafePaid Honeypot

Reported loss Not disclosed
BNB Chain
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

  1. The constructor mints 10,000,000 SAFEPAID to the deployer, who is the Ownable owner and is also set as feeDistributor.
  2. transfer and transferFrom both run _transfer, which debits the sender and then calls calculateFeesBeforeSend(sender, recipient, amount).
  3. 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.
  4. The owner-only setPanCakeSwapReciever(address, bool) can flag any address, and nothing in renounceWhitelist or the canWhitelist switch 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.
  5. The flag checks only the recipient, so it also blocks the owner's own transfers into the pair; transfers between ordinary wallets are unaffected.
  6. The fee settings are cosmetic: seTxFee stores a value capped at 100, but calculateFeesBeforeSend never reads it and always returns a zero fee.
  7. renounceOwnership() sets the owner to the zero address, after which no one could add or clear flags; flags already set would stay.

Protocol details

Classification Token
Protocol Type Exit Scam/Honeypot
Affected asset / contract SAFEPAID

Build your security review skills

Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.