Sonne Finance Hack

TOTAL LOST $20.0M
High Flash Loan Attacks Optimism

What happened

Sonne Finance's Optimism markets were exploited for approximately $20 million in May 2024. The attacker used an empty-market donation vulnerability in Sonne's Compound V2 fork after permissionless execution of timed market-creation and collateral-factor changes.

Technical Root Cause

Compound V2 calculates a market exchange rate from its cash, borrows, reserves, and share supply. A newly created market with an extremely small share supply allowed a direct token donation to inflate the exchange rate. Sonne's intended zero-collateral initialization was split across publicly executable Optimism timelock transactions, letting the attacker sequence market creation and collateral activation before the protective setup was complete.

Case & protocol details

Classification Smart Contract / Share Price Manipulation
Protocol Type Lending
Smart Contract Language Solidity
Official Website sonne.finance
Protocol Twitter/X @SonneFinance

Attack Timeline

The attacker minted 2 wei of soVELO in a new market, then directly transferred borrowed VELO to the soVELO contract. The donation increased the market's cash without issuing additional soVELO, inflating its exchange rate. That made 2 wei of soVELO appear to be valuable collateral, allowing the attacker to borrow other assets.

A rounding-down path in redeemUnderlying then allowed the attacker to recover the donated VELO with only 1 wei of soVELO and repeat the pattern against further markets.

Practice this exploit pattern safely

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