SafeCow Honeypot

Reported loss Not disclosed
BNB Chain
Honeypot

What happened

SafeCow (SAFEcow) is a BNB Smart Chain token whose transfer path reverts any transfer sent to an address the owner has flagged in PanCakeSwapReciever. The owner can flag an address at any time with setPanCakeSwapReciever, which is not covered by the canWhitelist switch that renounceWhitelist turns off. Once a trading-pair address is flagged, a sell to it reverts with "Error: Can not sell this token" and the holder's balance is left untouched.

De.Fi's REKT database lists the token as an Exit Scam/Honeypot. The code shows what the owner can do; the verified source does not show whether or when an address was flagged.

How it happened

  1. The owner deploys SafeCow and receives the full supply: _transferTO(msg.sender, 75000000e18).
  2. The owner can call setPanCakeSwapReciever(address _recipient, bool _feeless), guarded only by onlyOwner. Unlike the feeless whitelist setters, it does not check canWhitelist, so renounceWhitelist() does not switch it off.
  3. Every transfer runs _transfer, which calls calculateFeesBeforeSend(sender, recipient, amount). That function contains if(PanCakeSwapReciever[recipient]){ revert("Error: Can not sell this token"); }.
  4. If the recipient of a transfer is a flagged address, the whole call reverts, including the earlier _balances[sender] = _balances[sender].sub(...) line. A holder sending tokens to a flagged pair address therefore cannot sell, while transfers to unflagged addresses go through with no fee, because the function otherwise returns (amount, 0).
  5. The check looks only at the recipient, so it applies to every sender, including the owner, and the owner can undo it for an address by calling setPanCakeSwapReciever again with false.

Protocol details

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

Build your security review skills

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