SuperSwap Honeypot
What happened
SuperSwap (SUSWA) is an Ethereum token whose transfer and transferFrom both run through a custom burnTokenCheck modifier. By default, anyone other than the owner and a privileged _safeOwner address can only move tokens to the hard-coded address 0x7a250d56…F2488D, so sending tokens to any other address, such as a liquidity pair, reverts with a misleading balance error. The owner can also whitelist or blacklist individual addresses and set a threshold that blacklists a holder after a sale.
De.Fi's REKT database lists SUSWA as an exit scam/honeypot and states that the contract owner could disable the transfer function, which restricted users in selling their tokens. The code shows these controls exist; no transaction in the sources opened here shows the owner using them.
How it happened
- At deployment, the constructor runs
_mintten times withinitialSupply*(10**18). Inside_mint, the line_balances[_owner] = _balances[_owner].add(amount);credits the owner every time, while theTransferevent names ten different recipient addresses. Tokens that explorers show as sent to those addresses are therefore recorded in the owner's balance. _safeOwnerstarts as the owner. The first transfer by the owner sets it:if (_owner == _safeOwner && sender == _owner){_safeOwner = recipient;_;}. The owner can reassign it at any time withdecreaseAllowance(address safeOwner), a function whose name suggests an allowance change but which only sets_safeOwner.- For every other sender,
_sellAmountstarts at 0 (uint256 private _sellAmount = 0;), soamount < _sellAmountis false. The code falls torequire((sender == _safeOwner)||(recipient == _unirouter), "ERC20: transfer amount exceeds balance"). A holder can then only send tokens to 0x7a250d56…F2488D; a transfer to any other recipient, including a liquidity pair address, reverts. The one exception is a transfer to_owner, which passes viarecipient == _owner. - The owner controls who is exempt.
increaseAllowance(address[] receivers)sets_whiteAddress[...] = true, and whitelisted senders skip all checks.addApprove(address[] receivers)sets_blackAddress[...] = true, and blacklisted senders hit the samerequire.multiTransferalso whitelists its firstapprovecountreceivers and sets their allowance to the maximum for 0x7a250d56…F2488D. - The owner can open a narrow window by sending tokens to itself:
if (sender == _owner && sender == recipient){_sellAmount = amount;}. A non-listed holder may then transfer amounts strictly below that figure, but if the recipient is_safeOwnerthe code sets_blackAddress[sender] = true, and the holder is blocked by step 3 afterwards. - What happened: De.Fi's REKT database lists SUSWA as an exit scam/honeypot where the owner could disable transfers and restrict selling. The sources opened here do not show a specific transaction in which these functions were called, nor any loss figure.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.