ChainBleedv0.1 · open intel
← back to feed·ETHFLASHLOAN2023-03-13 · 3y ago
Incident · DEFILLAMA

Euler V1

Flashloan Donate Function Logic Exploit
Estimated loss
$197.00M
$240.00M returned
VERDICT —AUDIT-CATCHABLE
Missing `checkLiquidity` on a function that mutates collateral side is a checklist-grade access-control / state-transition finding; every other balance-mutating Euler function had the check. A diff review of EIP-14 against the surrounding module would flag it.
▰ METHOD
Flashloan Donate Function Logic Exploit
FLASHLOANBYTECODE CATCHABLEAI SCANNABLE
Root cause

Euler V1's `EToken.donateToReserves(uint subAccountId, uint amount)` — added in EIP-14 — let a user burn their own eTokens and credit the reserve, but it did NOT invoke `checkLiquidity` on the caller. The attacker flash-loaned 30M DAI from Aave, deposited into Euler to mint eDAI, recursively borrowed via `mint` to inflate dDAI (creating a 10x leverage position), then called `donateToReserves` to burn a large slice of their eDAI without proportionally reducing dDAI. This left the position with debt > collateral instantly — a state normally unreachable because the standard `withdraw`/`transfer` paths call `checkLiquidity`. A second attacker-controlled account then invoked `liquidate()`, which under Euler's percent-discount liquidation curve granted the liquidator an outsized portion of the violator's collateral (the bigger the gap, the bigger the discount). Repeated across pools (DAI, WBTC, stETH, USDC) for ~$197M.

▰ PROOF OF CONCEPT
DEFIHACKLABS
src/test/2023-03/Euler_exp.sol
view forked test on github ↗

Reproducible Foundry test fork from SunWeb3Sec/DeFiHackLabs. Clone the repo, run forge test against the file path above, and replay the exploit against a mainnet fork at the historical block. Use for reproduction only — not for live targets.

Forensic narrative

Classification: Protocol Logic. Technique: Flashloan Donate Function Logic Exploit. Target type: DeFi Protocol. Affected chains: Ethereum. Implementation language: Solidity. Funds returned: $240,000,000.

Primary source
https://medium.com/immunefi/hack-analysis-euler-finance-march-2023-43a78b95dba2
Sourced from
DefiLlama Hacks dataset · api.llama.fi/hacks
Technical record
chain
ethereum
protocol
Euler V1
bug_class
flashloan
date_occurred
2023-03-13
loss_usd
$197,000,000
classification
Protocol Logic
technique
Flashloan Donate Function Logic Exploit
target_type
DeFi Protocol
language
Solidity
source_id
dl:1183
Related — same bug class· flashloan
2026-05-11
1mo ago
POLY
Ink Finance
Contract Vulnerability
flashloan
$140.0K
UNRATED
2026-05-04
1mo ago
ETH
SmartCredit
Flashloan Exploit
flashloan
$72.0K
UNRATED
2026-05-04
1mo ago
SmartCredit
Flash Loan Exploit
flashloan
$72.0K
UNRATED
2026-04-28
1mo ago
BSC
JUDAO
Flashloan Exploit
flashloan
$228.0K
UNRATED
2026-04-28
1mo ago
JUDAO
Exploit
flashloan
$228.0K
UNRATED
2026-04-15
1mo ago
LootBot AI
Contract Vulnerability
flashloan
$9.6K
UNRATED
ChainBleed — live web3 threat intelligence