The reported exploit and the scope of this analysis
BlockSec’s technical analysis of the 13 March 2023 Euler exploit identifies a missing liquidity check in donateToReserves. The described sequence combined leverage, a donation that reduced collateral and liquidation behavior to extract value. The mechanism matters more than describing it only as a flash-loan attack: borrowed capital accelerated a failure in the protocol’s accounting and incentive rules.
Euler’s January 2024 retrospective describes the subsequent investigation and recovery effort. It explicitly concerns the historical Euler V1 event; the team distinguishes that system from the rebuilt V2 architecture. This article analyzes the published V1 failure class and does not imply that the same issue exists in current Euler contracts or independently verify current deployment security.
A harmless-sounding action can cross the solvency boundary
Our analysis: security review should classify a function by its accounting effects, not its user-facing label. Donation, transfer, fee collection, reserve movement and liquidation can all change which assets support a liability. A function intended to benefit a reserve may still make a borrower’s position unsafe if it removes collateral without the checks applied to an ordinary withdrawal.
Write the account and system invariants before reviewing individual functions. Identify every state change affecting assets, shares, debt, collateral eligibility, interest and liquidation eligibility. Then examine composition: a transition that appears safe alone may create an exploitable position when followed immediately by another operation with a discount or incentive. Review rounding and boundary values as part of that sequence.
Test economic effects across sequences
Build a local, authorized model with several users and realistic token behavior. Generate sequences of deposit, borrow, repay, donation, transfer and liquidation, including positions close to collateral limits. Require that an operation cannot remove support for outstanding debt outside the protocol’s intended liquidation rules. Track net assets and liabilities across all involved accounts rather than checking only the initiating user’s displayed health factor.
Investigate whether an actor can profit by creating and liquidating their own unsafe position through cooperating addresses. Model available external liquidity as an input rather than relying on attackers having little starting capital. Use the model to create durable regression tests for the invariant and review similar reserve or share-accounting functions for the same missing validation.
Separate prevention, containment and recovery
Define which parameters or entry points can be paused, who can authorize the action and how monitors detect abnormal balance changes. A response procedure should preserve the exploiter transaction, affected market state and relevant deployment versions. Do not improvise a counter-transaction or negotiation based solely on a public message; establish the authorized incident team and evidence-sharing process first.
Use the retrospective as a tabletop prompt rather than an assurance that funds will be returned after a future exploit. Ask the team to explain how it would identify liabilities, communicate uncertainty and determine safe restart conditions if recovery never occurred. A successful engineering outcome includes a tested accounting property, not merely a patch to the one function named in an incident report.
Controls to take away
- Flash liquidity amplifies a logic defect rather than explaining it away.
- Every collateral-changing path needs consistent validation.
- Recovery outcomes are not a substitute for accounting invariants.
Take this to your next review
Working checklist
Use this as a starting point, then assign owners and record evidence in your team's own system. Checks here reset when you leave or reload this note.
0 of 5 reviewed
Sources & further reading
Incident facts are attributed to the reports below. Controls and recommendations are our interpretation; this is not an independent forensic investigation.
A correction or a better primary source? Send Raiders the article URL and evidence. Editorial policy.