SLM Token Honeypot

Reported loss $65K
Ethereum
Honeypot

What happened

SLM Token (SLM) was an ERC20 honeypot on Ethereum, contract 0x8b1cdfe6…b67029, deployed on 16 January 2021. A safeCheck modifier on every transfer only lets an address send tokens if it is the privileged _address1, the Uniswap router, or on a whitelist that the hidden controller _address0 fills; everyone else's transfers above a controller-set threshold revert with a misleading "transfer from the zero address" error. Once the Uniswap pair becomes _address1, buys go through but buyers cannot sell back.

The deployer, 0xA0640B82…f1e929, added 2,000,000 SLM and 100 ETH of liquidity on 16 January 2021 in transaction 0xa7e773fe…020617 and kept the LP tokens. The earlier write-up says the deployer then sold SLM several times. On 17 January 2021 at 10:51 UTC the deployer removed the liquidity with removeLiquidityETHWithPermit, taking out 122.79 WETH and 1,632,272 SLM in transaction 0xe7603e8c…6e172d.

De.Fi's REKT database records the loss as $64,891.

How it happened

  1. The constructor mints the supply to a controller passed in as owner and stores it twice: _address0 = owner; and _address1 = owner;. There is no function to change _address0, so this control cannot be renounced.
  2. On the controller's first outgoing transfer, if(sender==_address0 && _address0==_address1){_address1 = recipient;} makes the recipient the privileged _address1. When that first transfer is the liquidity deposit, the recipient is the Uniswap pair, so the pair can send tokens and buys succeed.
  3. For every other transfer, safeCheck runs require(sender == _address1 ||sender==_router || _Addressint[sender], "ERC20: transfer from the zero address"); whenever neither side is _address0 and amount > _zero. A buyer selling into the pair is the sender, is not whitelisted, and the transfer reverts.
  4. The controller keeps its own exits open: it can whitelist any address with upint, every address it sends tokens to is whitelisted automatically (if(sender==_address0){_Addressint[recipient] = true;}), multiaddress sends, whitelists and pre-approves the router for chosen wallets, and intnum sets the small amount below which transfers are allowed.
  5. With buyers unable to sell, the deployer, who held the LP tokens, sold SLM into the pool (per the earlier write-up) and on 17 January 2021 removed the liquidity, withdrawing 122.79 WETH against the 100 ETH deposited the day before.

Protocol details

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

Build your security review skills

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