Skip to main content

What Happened

CertiK’s analysis describes the March 13, 2023 Euler exploit as combining leveraged positions, donateToReserves without a health check, and liquidation mechanics. The reported approximately $197 million exploit amount is distinct from later recovery valuations. CertiK incident analysis.

Attack Mechanism

Euler allowed users to create leveraged positions by minting matched deposit and debt exposure. donateToReserves then reduced the user’s collateral without running the account health check that normally constrained borrowing and withdrawals. The attack used a violator account and a liquidator account:
  1. Build a leveraged deposit/debt position using flash-borrowed funds.
  2. Donate collateral to reserves, making the violator unhealthy.
  3. Liquidate that position from the second account at a discount.
  4. Extract collateral while leaving bad debt with the violator.
A transaction-end-only test can inspect the wrong state: liquidation has already changed both accounts. The example checks health at the donation’s post-call snapshot, before a later liquidation can obscure the unsafe transition. There is no getModifiedAccounts cheatcode. The donating account is derived from each call’s caller and Euler subaccount ID, using Euler’s XOR subaccount convention, then queried through the Exec liquidity view.

Assertion Example

What This Check Covers

The example covers the donating subaccount for the selected eToken and requires the corresponding Euler Exec address. It does not claim protocol-wide account discovery or enforce liquidation incentives. Different subaccount layouts, deferred liquidity checks, price sources, and other debt-increasing operations need their own coverage.