🎉 The #CandyDrop Futures Challenge is live — join now to share a 6 BTC prize pool!
📢 Post your futures trading experience on Gate Square with the event hashtag — $25 × 20 rewards are waiting!
🎁 $500 in futures trial vouchers up for grabs — 20 standout posts will win!
📅 Event Period: August 1, 2025, 15:00 – August 15, 2025, 19:00 (UTC+8)
👉 Event Link: https://www.gate.com/candy-drop/detail/BTC-98
Dare to trade. Dare to win.
Euler Finance遭闪电贷攻击 损失近2亿美元
Euler Finance project suffered a flash loan attack, resulting in a loss of nearly 200 million USD.
On March 13, 2023, the Euler Finance project suffered a flash loan attack, resulting in a massive loss of approximately $197 million. The attacker exploited a vulnerability in the project's contract and completed the attack through multiple operations. Currently, the stolen funds remain in the attacker's account.
Attack Process Analysis
The attacker first borrowed 30 million DAI through a flash loan from a lending platform and deployed two contracts: one borrowing contract and one liquidation contract.
The attacker staked the borrowed 20 million DAI into the Euler Protocol contract and obtained 19.5 million eDAI.
By utilizing the leverage feature of the Euler Protocol, the attacker borrowed 195.6 million eDAI and 200 million dDAI.
The attacker used the remaining 10 million DAI to repay part of the debt, destroyed 10 million dDAI, and then borrowed again 195.6 million eDAI and 200 million dDAI.
Key Steps: The attacker calls the donateToReserves function, donating 100 million eDAI, and then liquidates through the liquidate function, obtaining 310 million dDAI and 250 million eDAI.
Finally, the attacker extracted 38.9 million DAI, repaid 30 million DAI in Flash Loans, and ultimately profited 8.87 million DAI.
Vulnerability Cause
The main reason for the success of the attack is the flaw in the donateToReserves function of the Euler Finance contract. Unlike other key functions, this function lacks the necessary liquidity check step (checkLiquidity). This check should ensure that the user's eToken quantity is greater than the dToken quantity to maintain the health of the contract.
Due to the lack of this critical check, attackers are able to place themselves in a liquidatable state through specific operations, and then exploit this to carry out the attack.
Security Recommendations
For similar lending projects, special attention should be paid to the following key points:
Before a contract goes live, it is essential to conduct a comprehensive and professional security audit. This not only helps to identify potential vulnerabilities but also ensures the overall security and stability of the contract.
This incident once again emphasizes the importance of contract security in the decentralized finance sector. Project teams should always prioritize security to protect user assets and maintain the healthy development of the entire ecosystem.