SafeGate Honeypot

Reported loss Not disclosed
BNB Chain
Honeypot

What happened

SafeGate (SAFEGATE) is a BNB Chain token deployed on 26 March 2021 at 0xf118267a…b37d56 by 0x09aAF4dc…05D9DE, which still holds ownership. Every transfer passes through calculateFeesBeforeSend, which reverts with "Error: Can not sell this token" whenever the recipient is flagged in the PanCakeSwapReciever mapping, and only the owner can set that flag with setPanCakeSwapReciever. Once the PancakeSwap pair is flagged, every sale, which sends tokens into the pair, fails, while buys, which send tokens out of the pair, still work.

The contract advertises a fee system and a whitelist lock (seTxFee, renounceWhitelist), but the fee is never charged and the lock does not cover the sell flag. De.Fi's REKT database lists SafeGate as an exit scam/honeypot.

How it happened

  1. The constructor hard-codes SafeERC20("SafeGate", "SAFEGATE") and credits 95,000,000 SAFEGATE to the deployer through _transferTO, which also makes the deployer feeDistributor. The deployer becomes owner().
  2. _transfer debits the sender, then calls calculateFeesBeforeSend(sender, recipient, amount). That function runs if(PanCakeSwapReciever[recipient]){ revert("Error: Can not sell this token"); } and otherwise returns (amount, 0), so the whole transfer reverts for a flagged recipient.
  3. setPanCakeSwapReciever(address _recipient, bool _feeless) is onlyOwner and writes that flag with no other check. Flagging the PancakeSwap pair blocks every token transfer into it, from transfer or from the router's transferFrom, so no holder can sell. Buys are transfers out of the pair and are not affected.
  4. renounceWhitelist() only sets canWhitelist = false, which setFeelessSender and setFeelessReciever check; setPanCakeSwapReciever does not check it, so the sell flag stays under owner control. seTxFee stores txFee, but the fee calculation never reads it.
  5. The owner can clear the flag again at any time. renounceOwnership exists; calling it would freeze the flags at their current values.

Protocol details

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

Build your security review skills

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