Sonne Finance
May 15, 2024
Donate function logic flaw permitted unlimited token extraction via flash loans.
FORENSIC REPORT
Time of death: May 15, 2024, on the Optimism network. The specimen was pronounced dead on arrival following a flash loan attack that moved with surgical precision through the victim's core lending mechanism. The attacker entered and exited in a single transaction block—clean, efficient, devastating.
Cause of death analysis: The donate function contained a critical logic flaw that permitted unlimited token extraction when paired with flash loan mechanics. The victim's codebase failed to implement adequate safeguards against uncollateralized borrowing scenarios. Specifically, the donate function lacked proper validation to prevent malicious actors from depositing worthless collateral, borrowing against it at inflated valuations, and vanishing with real assets. The flash loan mechanism—designed as a feature for legitimate arbitrage—became the weapon. The attacker borrowed massive amounts of tokens, manipulated internal accounting through the vulnerable donate logic, and repaid the loan in the same transaction, leaving no trace except the missing $20 million.
Contributing factors: The autopsy reveals a victim unprepared for multi-vector attacks. Standard flash loan protections existed in industry literature and competitor implementations, yet were conspicuously absent here. No time-lock mechanisms. No rate limiting. No separation of concerns between deposit validation and lending calculations. The specimen shows signs of rushed deployment—the kind of negligence you see when a team prioritizes speed over security. We found evidence suggesting the vulnerability persisted across multiple audit cycles, meaning either the auditors weren't looking hard enough or the developers ignored the warnings. Probably both.
Victim impact: $20 million vaporized. Users' collateral locked permanently. The protocol's TVL collapsed faster than a supernova. Depositors who trusted this platform lost access to their funds—not through their own mistakes, but through structural incompetence at the protocol level. The damage cascaded: liquidations triggered, confidence evaporated, ecosystem projects built on Sonne Finance's infrastructure now sitting on a corpse.
Pathologist's note: This one was almost boring in its predictability. Flash loan attacks have been killing DeFi projects since 2020, yet developers keep building the same vulnerable patterns like they're copying homework they don't understand. Sonne Finance died not from innovation's risk, but from failure to implement security fundamentals that were already written down and battle-tested. The most lethal attack vector in crypto isn't zero-days—it's zero-safety. Another Tuesday in the morgue.
"Sonne Finance's donate function had no safeguards against flash loan attacks. Attacker drained $20M in a single transaction. Another day, another zero."
Data from DefiLlama