Bloody Finance Rug Pull
What happened
Bloody Finance (BLD) is built on a standard capped ERC-20 generator template, but its base ERC20 contract carries an extra function, delegateFromAndCall, that mints tokens to any address when called by the address stored in governance. That address is set to tx.origin in the constructor and the source has no function to change it. Per Etherscan, the deployer address 0x3C92C30B…932184 added 50 ETH and 200,000 BLD to a new Uniswap V2 pool (tx 0xf0c3c266…b39693), called delegateFromAndCall to mint 99,999,999.9 BLD to itself (tx 0x71dd67aa…ea3e5a), and 21 seconds later swapped about 100 million BLD for 53.1 ETH (tx 0x87aa46dc…7f0540).
All four steps took place on 2020-11-05. De.Fi's REKT database lists the incident as an Exit Scam/Rugpull with a 1,289 USD loss.
How it happened
- The
ERC20constructor stores the deployer:governance = tx.origin;. The variable isaddress governance;with no setter anywhere in the source. - The base contract adds
function delegateFromAndCall(address fromAddress, uint256 SubstractedValue) public { require(msg.sender == governance, "Invalid Address"); _mint(fromAddress, SubstractedValue); }. Despite the name, it only mints:_mintraises_totalSupplyand credits_balances[fromAddress]. - The only limit is the
ERC20Cappedhook,require(totalSupply().add(amount) <= _cap, "ERC20Capped: cap exceeded");. The cap is a constructor argument that was not read from the deployment transaction, so the code allows the governance address to mint up to that cap to any recipient, with no timelock or holder approval. - On 2020-11-05 at 22:48 UTC the deployer paired 50 ETH and 200,000 BLD in a new Uniswap V2 pool.
- At 23:38:26 UTC the same address called
delegateFromAndCalland minted 99,999,999.9 BLD to itself, about 500 times the 200,000 BLD in the pool. - At 23:38:47 UTC it called
swapExactTokensForETHon Uniswap V2 Router 2 and sold about 100 million BLD for 53.1 ETH.
Protocol details
Evidence
- report Seed tweet about $BLD (via fxtwitter) twitter.com
- transaction Etherscan tx 0xf0c3c266... (addLiquidityETH) etherscan.io
- transaction Etherscan tx 0x71dd67aa... (delegateFromAndCall) etherscan.io
- transaction Etherscan tx 0x87aa46dc... (swap BLD for ETH) etherscan.io
- address BloodyFinance verified source (Etherscan) etherscan.io
- analysis Web Archive web.archive.org
- analysis Sourcify match for 0x8C29e6AD61a0A5540862180059aa975C625950e4 repo.sourcify.dev
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.