SafeWorld Honeypot

Reported loss Not disclosed
BNB Chain
Honeypot

What happened

De.Fi's REKT database lists SafeWorld (SAFEworld) on BNB Smart Chain as an Exit Scam/Honeypot, noting that the contract owner could disable the transfer function and so stop users selling. In the verified source at 0x8222f0c4…50e523 the control is a per-address flag: the owner can call setPanCakeSwapReciever(address, bool) for any address, and calculateFeesBeforeSend then reverts every transfer whose recipient is flagged with Error: Can not sell this token. Because the revert happens after the sender's balance is debited inside _transfer, the whole transaction is undone and the holder keeps the tokens.

The code also exposes a txFee setter capped at 100 but never applies it. The code shows how sales to a chosen address can be blocked; no transaction showing a blocked sale was opened for this record.

How it happened

  1. The constructor mints 150,000,000 tokens to the deployer with _transferTO(msg.sender, 150000000e18);, and the deployer becomes owner through Ownable.
  2. The owner can mark any address as a blocked recipient with function setPanCakeSwapReciever(address _recipient, bool _feeless) public onlyOwner { ... PanCakeSwapReciever[_recipient] = _feeless; }. The function name suggests an exchange address, but the code does not say which address is flagged.
  3. Every transfer and transferFrom goes through _transfer, which first debits the sender (_balances[sender] = _balances[sender].sub(amount, ...)) and then calls calculateFeesBeforeSend(sender, recipient, amount).
  4. If the recipient is flagged, calculateFeesBeforeSend runs if(PanCakeSwapReciever[recipient]){ revert("Error: Can not sell this token"); }. The revert undoes the debit, so the sender's balance is unchanged and the transfer fails. For any unflagged recipient it returns (amount, 0) and the transfer completes with no fee.
  5. The owner can set the flag back to false for the same address, so the block can be switched on and off. The contract also has renounceOwnership(), so the owner could give up this power; the code does not show whether that happened.
  6. seTxFee only stores txFee (the require message reads Fees cannot go above 10% but the check is _ff <= 100), and calculateFeesBeforeSend returns a fee of 0 whatever txFee holds, so the fee setting has no effect on transfers.

Protocol details

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

Build your security review skills

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