All vulnerabilities
CRITICALWeb3exploited in the wild

WEB3-VALUEDEFI-2020

Web3 · Ethereum · Value DeFi

Summary

On 14 November 2020 Value DeFi's MultiStables vault was exploited for a net loss of roughly $6 million on Ethereum (the attacker later returned some funds) in a flash-loan price-manipulation attack, despite the vault marketing itself as flash-loan resistant. The vault valued stablecoin shares by converting assets to USDC and pricing them against Curve's 3pool spot rates, with no protection against intra-block manipulation, and deposits were not gated against contracts. The attacker flash-borrowed 80,000 ETH from Aave plus a large DAI flash swap from Uniswap, deposited DAI to mint vault shares, then swapped tens of millions of DAI and USDT into USDC to drain USDC from the 3pool so the remaining conversion returned inflated 3CRV amounts, making the vault's share price read about 1.32x its true value. They then withdrew their shares for far more 3CRV than deposited and repaid the loans for profit. The root cause was share pricing off a single Curve pool's manipulable spot rate inside one transaction.

How to avoid it in your code

  • Do not price vault shares from Curve 3pool spot conversion rates; a flash loan can drain a single coin and skew the rate
  • Use get_virtual_price or an external oracle with sanity bounds rather than instantaneous pool-balance conversions
  • Gate deposits/withdrawals against contracts or enforce same-block restrictions to stop atomic deposit-skew-withdraw loops
  • Audit new vault code before deployment; the exploited conversion path was unaudited
  • Do not claim flash-loan resistance without proving every price read is non-atomic and manipulation-resistant

References

Related vulnerabilities

All Web3 →