SAV3R Rug Pull

Reported loss $10K
Ethereum
Rugpull

What happened

Sav3rToken contains a mint function named sav3rPools that the deployer can call at any time. It is labelled in a comment as a way to create reward tokens for liquidity providers, but it simply mints any amount to any address. On 2020-11-17 the deployer wallet added initial liquidity of 70,000 SAV3R and 30 WETH to a Uniswap V2 pool in 0x02991350…581f6c, then called sav3rPools in 0x437a300a…65b419 to mint 100 million SAV3R to itself.

About 28 seconds later, in 0x1ed734e1…d7260c, it swapped those 100 million SAV3R for 51.578677 WETH through Uniswap V2 Router 2. De.Fi's REKT database lists the loss at 10,423 USD.

How it happened

  1. The ERC20 constructor stores the deployer as the minting authority: governance = tx.origin;.
  2. The contract exposes function sav3rPools(address _address, uint256 _amount) public whose only check is require(msg.sender == governance, "Governance"); followed by _mint(_address, _amount);. No amount limit appears in the function.
  3. The cap check in ERC20Capped._beforeTokenTransfer (require(totalSupply().add(amount) <= _cap, "ERC20Capped: cap exceeded");) is not reached by this path, because the _mint implementation in this file updates _totalSupply and _balances directly without calling _beforeTokenTransfer.
  4. In 0x02991350…581f6c (2020-11-17 00:11:43 UTC) the deployer wallet called addLiquidityETH with 70,000 SAV3R and 30 WETH and received 1,449.1377 UNI-V2 LP tokens.
  5. In 0x437a300a…65b419 (02:33:46 UTC) the same wallet called sav3rPools and 100 million SAV3R were minted to it.
  6. In 0x1ed734e1…d7260c (02:34:14 UTC) the wallet called swapExactTokensForETH on Uniswap V2 Router 2 and received 51.578677 WETH for the 100 million tokens, against a pool that had been seeded with 70,000 tokens and 30 WETH.

Protocol details

Classification Token
Protocol Type Exit Scam/Rugpull
Affected asset / contract SAV3R
Protocol links Website @SAV3R_

Build your security review skills

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