25. September 2023

Euler Finance Attack Causes $195M Loss: What We Can Learn

• The Euler Finance exploit was the largest of Q1 2023, resulting in over $195 million in losses.
• At least 11 protocols other than Euler suffered losses due to the attack.
• Analysis of the attack can help developers and users prevent similar attacks in the future.

Euler Finance Attack: Overview

The Euler Finance exploit was a flash loan attack that happened on March 13, 2023. It resulted in over $195 million in losses and caused a contagion to spread through multiple decentralized finance (DeFi) protocols, with at least 11 protocols other than Euler suffering losses due to the attack. After 23 days, the attacker returned all of the exploited funds.

How it Happened

Euler is a lending platform similar to Compound or Aave. Users can deposit crypto and allow the protocol to lend it to others, or they can use a deposit as collateral to borrow crypto. Whenever users deposit to Euler, they receive eTokens representing the deposited coins which are worth more than 1:1 with the underlying asset due to interest earned on deposits. Additionally, users can mint eTokens for leverage but this also creates debt tokens (dTokens).

Exploit Details

For this attack, an attacker used flash loans from dYdX and Aave protocols to acquire enough dTokens so that when combined with their existing eToken holdings allowed them enough collateral for a massive loan from Euler Finance’s protocol pool ($60 million). The attacker then sold off these assets for Ethereum (ETH) which ended up totaling $195 million when all was said and done – far more than what they initially borrowed from both dYdX and Aave protocols combined ($11 million).

Implications & Lessons Learned

This attack highlights several important lessons that developers should take into account when designing future DeFi protocols: firstly, always ensure there is sufficient collateralization; secondly, beware of cross-protocol exploits like those carried out against Euler; thirdly, always be aware of potential vulnerabilities stemming from flash loans; and finally, never underestimate human ingenuity – attackers will always find ways around any security system if given enough time and resources.

Summary

The March 13 flash loan attack against Euler Finance resulted in over $195 million in losses across multiple DeFi protocols beyond just Euler itself. However thankfully after 23 days, the attacker returned all of these funds back again. This incident serves as an important reminder for developers designing new DeFi platforms about potential vulnerabilities stemming from flash loans as well as how cross-protocol exploits may be carried out by malicious actors if not properly guarded against.