EigenLayer Rug Pull

Reported loss $821K
Rugpull

What happened

This EigenLayer was a copycat BEP20 token on BNB Chain, unrelated to the real EigenLayer restaking protocol. Its contract lets only whitelisted addresses and the PancakeSwap router or pair move tokens freely. For everyone else, a transfer to another wallet silently does nothing, and a sell to the pair only works if it passes three checks, two of them owner-tunable: the wallet cannot sell more EL than it bought from the pair, the BNB value it has ever sold must stay under an owner-set cap, and the seller must hold an owner-set minimum BNB balance.

The owner can also mint unlimited EL to itself, and a master address is given an unlimited allowance over the pair's EL balance. CertiK flagged the token as an exit scam on 1 October 2023 and said the deployer profited about $300,000. De.Fi's listing puts the loss at 3,802 BNB (about $821,232), removed from the PancakeSwap pool in 27 transactions between 14 September and 2 October 2023, with the funds sent on to other addresses.

How it happened

  1. The constructor gives the whole 100,000,000 EL supply to the deployer, whitelists it in _marketersAndDevs, and creates the EL/WBNB PancakeSwap pair.
  2. Buyers can always receive EL from the pair, because _canTransfer returns true when the sender is the router or pair (if (_isSuper(sender)) { return true; }). Each buy is recorded in _buySum.
  3. A holder's sell is a transfer to the pair, which passes only if bought >= sold + amount && _theNumber >= soldETH + amountETH && sender.balance >= _theRemainder. The owner can change _theNumber with setNumber (a lifetime cap on the BNB value a wallet may sell) and _theRemainder with setRemainder (the BNB a seller must already hold). Setting a low cap or a high remainder blocks sells.
  4. A blocked transfer does not revert. transfer and transferFrom skip _transfer and still return true, so the router's swap then fails because the pair never receives the tokens. Wallet-to-wallet transfers are blocked the same way (return false; at the end of _canTransfer).
  5. The owner can mint to itself at will with rewardHolders (_balances[owner()] += amount; _totalSupply += amount;), and master holds _allowances[address(_pair)][master] = ~uint256(0), so it can pull EL out of the pair with transferFrom and call syncPair. The custom Ownable has no renounceOwnership or transferOwnership, so these powers cannot be given up.
  6. According to De.Fi's listing, the deployer removed 3,802 BNB of liquidity from the pool in 27 transactions ending on 2 October 2023; CertiK's alert puts the deployer's profit at about $300,000.

Protocol details

Classification Token
Protocol Type Exit Scam/Rugpull
Affected asset / contract EL

Build your security review skills

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