Scaleswap Honeypot
What happened
Scaleswap (SCA) is an ERC-20 token on Ethereum, deployed 2021-06-25 at 0xb552898c…eb10b7, with a supply of 25,000,000 tokens. Every transfer passes through a modifier, burnTokenCheck, that lets the owner and a stored _safeOwner address move tokens freely but restricts every other sender to sending only to the Uniswap V2 router (_unirouter). A holder's sell moves tokens to the trading pair rather than to the router, so it reverts with "ERC20: transfer amount exceeds balance", while the owner can whitelist addresses, blacklist others, raise a small-transfer threshold and mint more supply.
De.Fi's REKT database lists SCA as an Exit Scam/Honeypot with no loss figure.
How it happened
What the code allows (the owner is _owner, set once in the constructor; the contract has no function that changes it):
- The constructor sets
_owner = owner; _safeOwner = owner;and mintsinitialSupply*(10**18)to the owner._unirouteris hard-coded as0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D, and_sellAmountstarts at 0. transferandtransferFromboth call_approveCheck, which runs theburnTokenCheckmodifier. While_owner == _safeOwner, any transfer from the owner takes the first branch,_safeOwner = recipient;. In a normal liquidity add the owner's first transfer goes to the pair, which would make the pair_safeOwner. From then on_owner != _safeOwner.- Second branch: if
sender == _owner || sender == _safeOwner || recipient == _ownerthe transfer passes. If the pair is_safeOwner, this is why a buy, which sends tokens out of the pair, succeeds.if (sender == _owner && sender == recipient){_sellAmount = amount;}also lets the owner set a threshold by sending to itself. - Every other sender: if
_whiteAddress[sender] == truethe transfer passes. If_blackAddress[sender] == true, it requires(sender == _safeOwner)||(recipient == _unirouter)or reverts with "ERC20: transfer amount exceeds balance". If the sender is on neither list andamount < _sellAmount, the transfer passes, and ifrecipient == _safeOwnerthe sender is blacklisted by_blackAddress[sender] = true;. Otherwise it reverts unlessrecipient == _unirouter. - With
_sellAmountat its initial 0,amount < _sellAmountis never true, so an ordinary holder can send tokens only to the router address. A sell through a router callstransferFrom(holder, pair, amount), whose recipient is the pair, so it reverts. Plain wallet-to-wallet sends revert for the same reason. - The owner-only functions
increaseAllowance(address[])(whitelists and un-blacklists),addApprove(address[])(blacklists and un-whitelists) anddecreaseAllowance(address safeOwner)(rewrites_safeOwner) change who passes.multiTransferwhitelists the firstapprovecountreceivers and approves the router for them. _mint(address account, uint256 amount) publicrequiresmsg.sender == _ownerand addsamountto_balances[_owner], so the owner can increase supply at any time.
De.Fi's REKT database lists SCA as an Exit Scam/Honeypot with no stated loss. No transaction was examined here, so which address became _safeOwner, which addresses were whitelisted or blacklisted, and whether any mint or liquidity removal occurred are not established.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.