SAV3R Rug Pull
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
- The
ERC20constructor stores the deployer as the minting authority:governance = tx.origin;. - The contract exposes
function sav3rPools(address _address, uint256 _amount) publicwhose only check isrequire(msg.sender == governance, "Governance");followed by_mint(_address, _amount);. No amount limit appears in the function. - The cap check in
ERC20Capped._beforeTokenTransfer(require(totalSupply().add(amount) <= _cap, "ERC20Capped: cap exceeded");) is not reached by this path, because the_mintimplementation in this file updates_totalSupplyand_balancesdirectly without calling_beforeTokenTransfer. - In 0x02991350…581f6c (2020-11-17 00:11:43 UTC) the deployer wallet called
addLiquidityETHwith 70,000 SAV3R and 30 WETH and received 1,449.1377 UNI-V2 LP tokens. - In 0x437a300a…65b419 (02:33:46 UTC) the same wallet called
sav3rPoolsand 100 million SAV3R were minted to it. - In 0x1ed734e1…d7260c (02:34:14 UTC) the wallet called
swapExactTokensForETHon 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
Evidence
- report Report t.me
- report Sav3rToken source (Sourcify, chain 1) repo.sourcify.dev
- transaction Etherscan transaction 0x437a300a...c465b419 (sav3rPools) etherscan.io
- transaction Etherscan transaction 0x1ed734e1...d7260c (swapExactTokensForETH) etherscan.io
- transaction Etherscan transaction 0x02991350...1b61b581f6c (addLiquidityETH) etherscan.io
- address Sav3rToken verified source (Etherscan) etherscan.io
- analysis Web Archive web.archive.org
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.