SafeAmerica Honeypot

Reported loss Not disclosed
BNB Chain
Honeypot

What happened

SafeAmerica (SAFEAMERICA) is a token on BNB Smart Chain whose burnTokenCheck modifier wraps every transfer. Under the default state (_sellAmount = 0) a holder who is neither whitelisted nor the owner or _safeOwner can only send tokens to the hard-coded _unirouter address or to the owner; any other transfer reverts with "ERC20: transfer amount exceeds balance". The owner controls the whitelist, blacklist, _safeOwner and _sellAmount, and can mint more tokens.

De.Fi's REKT database lists the token as an exit scam/honeypot in which the contract owner could disable the transfer function, which restricted users in selling their tokens.

How it happened

  1. The constructor sets _owner = owner; _safeOwner = owner; and mints the initial supply to the owner. _owner is assigned only there; the contract has no function to transfer or renounce it.
  2. transfer and transferFrom both call _approveCheck, which carries the burnTokenCheck(sender,recipient,amount) modifier.
  3. If _owner == _safeOwner && sender == _owner, the modifier runs _safeOwner = recipient; and lets the transfer through. After that, transfers where sender == _owner || sender == _safeOwner || recipient == _owner also pass, and a self-transfer by the owner runs _sellAmount = amount;.
  4. A sender in _whiteAddress always passes. Every other sender reaches if (amount < _sellAmount). With the default _sellAmount = 0 that is never true, so the final branch runs require((sender == _safeOwner)||(recipient == _unirouter), "ERC20: transfer amount exceeds balance"); and, for a sender who is not _safeOwner, the transfer reverts unless the recipient is _unirouter (or the owner, handled earlier). A blacklisted sender faces the same require.
  5. If the owner sets _sellAmount above zero, a non-listed sender sending less than that amount passes, and if the recipient is _safeOwner that sender is moved to _blackAddress by _blackAddress[sender] = true; _whiteAddress[sender] = false;. The owner can also whitelist (increaseAllowance), blacklist (addApprove), and re-point _safeOwner (decreaseAllowance), and multiTransfer whitelists the first approvecount receivers and approves _unirouter for the maximum allowance on their behalf.
  6. _mint is public and credits _balances[_owner] regardless of the account argument, so the owner can add supply at any time; the Transfer event names account rather than the owner. The code alone does not show whether any of these functions was used or which address the pair is relative to _safeOwner.

Protocol details

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

Build your security review skills

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