Bloody Finance Rug Pull

Reported loss $1K
Ethereum
Rugpull

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

  1. The ERC20 constructor stores the deployer: governance = tx.origin;. The variable is address governance; with no setter anywhere in the source.
  2. 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: _mint raises _totalSupply and credits _balances[fromAddress].
  3. The only limit is the ERC20Capped hook, 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.
  4. On 2020-11-05 at 22:48 UTC the deployer paired 50 ETH and 200,000 BLD in a new Uniswap V2 pool.
  5. At 23:38:26 UTC the same address called delegateFromAndCall and minted 99,999,999.9 BLD to itself, about 500 times the 200,000 BLD in the pool.
  6. At 23:38:47 UTC it called swapExactTokensForETH on Uniswap V2 Router 2 and sold about 100 million BLD for 53.1 ETH.

Protocol details

Classification Token
Protocol Type Exit Scam/Rugpull
Affected asset / contract BLD
Protocol links Website

Build your security review skills

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