Cointime

Download App
iOS & Android

SlowMist: An Analysis of the Attack on Euler Finance

On March 13th, 2023, the lending project, Euler Finance, on the Ethereum blockchain was attacked, and the attacker profited approximately 200 million US dollars. The SlowMist Security Team intervened and analyzed the situation promptly, and shared the results as follows:

https://twitter.com/SlowMist_Team/status/1635230255878373377

Background Info

Euler Finance is a non-custodial and permissionless lending protocol on Ethereum, allowing users to earn interest or hedge market volatility with their cryptocurrency assets.

When users deposit collateral on Euler Finance, they receive corresponding EToken as proof, and subsequent redemption of collateral and lending are both carried out through EToken. The design of EToken allows users to borrow more assets and increase their debt by minting EToken and directly using new EToken as collateral, that is, self-borrowing with layered leverage.

Euler’s soft liquidation mechanism allows liquidators to flexibly help debtors repay their debts, rather than being limited to fixed coefficients.

The following are the related addresses involved in this attack:

Attacker’s EOA Address 1: 0x5f259d0b76665c337c6104145894f4d1d2758b8c

Attacker’s EOA Address 2: 0xb2698c2d99ad2c302a95a8db26b08d17a77cedd4

Attack Contract Addresses:

https://etherscan.io/address/0xeBC29199C817Dc47BA12E3F86102564D640CBf99

https://etherscan.io/address/0x036cec1a199234fC02f72d29e596a09440825f1C

Attack Transactions:

https://etherscan.io/tx/0xc310a0affe2169d1f6feec1c63dbc7f7c62a887fa48795d327d4d2da2d6b111d

https://etherscan.io/tx/0x71a908be0bef6174bccc3d493becdfd28395d78898e355d451cb52f7bac38617

https://etherscan.io/tx/0x62bd3d31a7b75c098ccf28bc4d4af8c4a191b4b9e451fab4232258079e8b18c4

https://etherscan.io/tx/0x465a6780145f1efe3ab52f94c006065575712d2003d83d85481f3d110ed131d9

https://etherscan.io/tx/0x3097830e9921e4063d334acb82f6a79374f76f0b1a8f857e89b89bc58df1f311

https://etherscan.io/tx/0x47ac3527d02e6b9631c77fad1cdee7bfa77a8a7bfd4880dccbda5146ace4088f

Root Cause

There were two critical reasons behind the attack:

Firstly, failure to check whether the user was in a state of liquidation after donating funds to the reserve address resulted in the direct triggering of the soft liquidation mechanism.

Secondly, the debtor’s health factor drops below 1 when the soft liquidation logic is triggered due to high leverage. This allows the liquidator’s profit to entirely cover their debt, as the value of the collateral obtained after liquidation is greater than the value of the debt. Thus, the liquidator can successfully extract the obtained funds without the need for any additional collateral, passing their health check (checkLiquidity) with ease.

Attack Process

This section analyzes the attack transaction with hash 0xc310a0af, with other attack techniques remaining consistent:

1. The attacker borrowed 30,000,000 DAI through a flash loan from Aave and created two sub-attack contracts (0x583c21 and 0xA0b3ee) in preparation for subsequent attacks.

2. The attacker deposited 20,000,000 DAI into Euler Finance through the deposit function and obtained 19,568,124.3 eDAI as collateral tokens.

3. Called the mint function (self-borrow) to borrow 195,681,243 eDAI and 200,000,000 debt tokens (dDAI).

4. Immediately after, the attacker called the repay function to repay the remaining 10,000,000 DAI. This was done to reduce the debt and increase the value of the collateral in preparation for another round of borrowing.

5. The attacker then called the mint function again (self-borrow) for a second round of borrowing, borrowing 195,681,243 eDAI and 200,000,000 dDAI. At this point, the account held approximately 410,930,612 eDAI and 390,000,000 dDAI.

6. The attacker then called the donateToReserves function to donate 100,000,000 eDAI to the reserve address. At this point, the account had 310,930,612 eDAI and 390,000,000 dDAI, placing the account in a liquidation state. However, the donateToReserves function did not check the account’s health factor.

7. Called the liquidation function using another sub-attack contract 0xA0b3ee to liquidate the account 0x583c21, which was in a liquidation state in the previous step.

During the liquidation process, the attacker transferred the debt of 259,319,058 dDAI from account 0x583c21 to 0xA0b3ee and obtained 310,930,612 eDAI from the account.

It is apparent that the liquidator only assumes a small amount of debt but can obtain the vast majority of the collateral. This is because of Euler Finance’s soft liquidation mechanism: when the liquidator begins the liquidation process, a discount is calculated based on the debtor’s health factor. As a result of this mechanism, the lower the health factor, the greater the discount and the more collateral that can be transferred. Ultimately, the liquidator only needs to cover their own debt to complete this attack.

Since the amount of collateral obtained by account 0xA0b3ee after liquidation was greater than the amount of debt, the account was able to pass the liquidation check successfully.

8. Finally, the attacker called the withdraw function to withdraw the funds obtained from the previous liquidation and repay the profit obtained from the flash loan.

MistTrack On-chain Analysis

At the time of writing, 100 ETH has been transferred by the attacker to Tornado Cash.

The remaining funds are held in the attacker’s address.

Here are the details: (Note: Prices are as of 10:00 UTC on March 14, 2023)

It is worth noting that there were a total of 6 attack transactions in this attack, with the first attack transaction initiated by the attacker’s EOA address 1, and all other attack transactions initiated by the attacker’s EOA address 2.

Here is the timeline for the 6 attack transactions:

On March 13, 2023, at 11:38:11 UTC, the attacker’s EOA address 1 withdrew 8,877,507.34 DAI to the attacker’s EOA address 2.

On March 13, 2023, at 12:08:35 UTC, the attacker’s EOA address 1 initiated an on-chain message transaction, claiming to be an MEV bot that outpaced the first attack transaction initiated by the attacker’s EOA address 2, and attempted to outpace other attack transactions but failed. Unfortunately, the attack contract created by the bot could only withdraw to the profit address of the attacker’s EOA address 2.

According to the on-chain analysis team at MistTrack, the source of the fees used by the attacker’s EOA address 1 was traced back to a hacker address that had previously carried out a flash loan attack on the EPMAX project on the Binance Smart Chain, stealing a total of 346,399.28 USDT.

After the attack, the EPMAX hacker address crossed to the ETH chain via cBridge and transferred the profits to Tornado Cash. The platform tools used by the EPMAX hacker include Multichain, FixedFloat, cBridge, 1inch, and KyberSwap.

The fees used by the attacker’s EOA address 2 were also traced back to Tornado Cash.

Summary

Upon careful analysis, it becomes apparent that there is no issue with examining the “donate” operation in isolation without verifying the donating user’s liquidity. When a user is in a state of liquidation after donating, it is inevitable that arbitrage bots will perform necessary liquidation procedures. Moreover, focusing solely on the characteristics of soft liquidation can serve to alleviate both excessive and insufficient liquidation scenarios. In cases of normal liquidation, the liquidator is required to provide collateral to avoid failing the liquidity check after completing the liquidation process.

However, when the “donate” operation is combined with soft liquidation, a different reaction occurs. Attackers can use leverage (self-borrowing) and the donation feature to lower their health factor to below 1, which directly leads to liquidators being able to cover their debts with profits after completing the liquidation.

The primary reason for this attack is the absence of liquidity checks in critical functions that involve user funds, which, when combined with a liquidation mechanism that dynamically updates discounts, creates lucrative arbitrage opportunities for attackers to siphon off a large amount of collateral without the need for collateral or debt repayment. As a result, the SlowMist Security Team recommends that lending protocols incorporate necessary health checks in functions that involve user funds, while also considering the security risks that can arise from combining different modules. This will allow for the design of secure economic and viable models that effectively mitigate such attacks in the future.

Comments

All Comments

Recommended for you

  • Hong Kong Stock Exchange Collaborates with S&P Dow Jones Indices to Launch Co-Branded Index

    The Hong Kong Stock Exchange has announced a collaboration with S&P Dow Jones Indices to develop and launch the S&P 500 Hong Kong Stock Exchange Technology 100 Index. This index aims to measure the performance of leading companies listed in the United States as well as the largest technology companies by market capitalization listed in Hong Kong. The index is approximately 60% allocated to the Hong Kong Stock Exchange Technology 100 Index and 40% to the S&P 500 Index, with weights adjusted quarterly.

  • LeCun et al. Propose H-JEPA Hierarchical World Model for End-to-End Learning in Visual Planning

    On October 12, according to an arXiv paper, researchers Wancong Zhang, Basile Terver, Michael Rabbat, Yann LeCun, and Randall Balestriero proposed H-JEPA, an end-to-end training scheme for a hierarchical action-conditioned JEPA world model, where each layer predicts further into the future within its learned latent space. Planning is conducted top-down: the top layer optimizes the goal, and each layer's predictions become sub-goals for the layer below. When factors in the data evolve at separate time scales, higher layers discard rapid, unpredictable details while retaining slower, task-relevant states. In four simulated navigation and manipulation environments, hierarchical planning outperformed flat JEPA; in the Visual AntMaze task, a three-layer structure increased the success rate from 18% to 73%, while requiring less computational power for planning. Ablation experiments indicate that the gains come from both temporal decomposition and high-level goal representation. Under inverse dynamics supervision, this method can be scaled to real robot videos in DROID.

  • Anthropic Bans 11.4 Million Accounts in Six Months, 42000 Appeals Overturned

    On October 12, Anthropic's transparency report updated on July 23 revealed that a total of 11.4 million accounts were banned in the first half of 2026. This is significantly higher than the 1.45 million accounts banned in the second half of 2025, marking an increase of approximately 7.9 times. The statistics cover all of Anthropic's products and services without distinguishing between Claude chat and developer products. During the same period, 398,000 appeals against account bans were received, of which 42,000 resulted in overturned decisions. Based on these figures, the number of overturned bans accounts for approximately 10.6% of the total appeals. Anthropic stated that accounts may be banned for violating usage policies, terms of service, or regional support policies.

  • 2026 Nobel Prize in Economic Sciences Announced

    On October 12, the Royal Swedish Academy of Sciences announced that Robert E. Hall and Michael Woodford have been awarded the Nobel Prize in Economic Sciences. They are recognized for developing new macroeconomic models that significantly enhance the ability to implement effective stabilization policies. Based on these models, timely fiscal and monetary policy measures can reduce the peaks and troughs of the economy. Robert E. Hall and Michael Woodford received this year's award for demonstrating how to reconstruct economic models to revitalize stabilization policies. Instead of building models based on statistical relationships among macroeconomic variables such as inflation, production, and consumption, they opted to establish a foundation based on microeconomic principles. This includes understanding how the overall behavior of households and businesses influences the economy. Robert E. Hall was born in 1943 in Palo Alto, California, and earned his Ph.D. from the Massachusetts Institute of Technology in 1967. He is a professor at Stanford University in California. Michael Woodford was born in 1955 in Chicopee, Massachusetts, and earned his Ph.D. from the Massachusetts Institute of Technology in 1983. He is a professor at Columbia University in New York.

  • Amazon Plans $7 Billion Acquisition of AI Company Decart

    According to sources, Amazon is in talks to acquire the AI startup Decart, with the deal potentially valued at around $7 billion. Decart, headquartered in San Francisco, USA, has software that allows developers to switch more easily between different AI chips. As companies compete for greater computing power, this capability is becoming increasingly important. Sources indicate that if negotiations do not break down and no other bidders emerge, the deal could be finalized soon. According to private market data firm PitchBook, Decart has raised over $400 million in venture capital from investors such as Sequoia Capital, Benchmark, and Radical Ventures. In May of this year, the company's valuation was close to $4 billion.

  • Contractor for Supermicro Pleads Guilty to Illegal Transfer of Nvidia Chips to China

    Court documents reveal that a contractor associated with Supermicro has pleaded guilty to participating in a scheme to illegally transfer servers equipped with Nvidia's advanced AI chips to China. The court case records, released on October 9, indicate that external contractor Sun Tingwei (phonetic) pleaded guilty on Thursday in the U.S. District Court in Manhattan. The U.S. Department of Justice charged Supermicro co-founder Liang Yixian, Taiwan area business manager Zhang Ruicang, and Sun Tingwei in March, accusing the three of conspiring to violate U.S. export control regulations by illegally transferring approximately $2.5 billion worth of equipment utilizing U.S. AI technology to mainland China. The indictment states that the scheme began around 2024, with the three allegedly using a Southeast Asian company as a transit entity to conceal the fact that the ultimate customer was located in China.

  • Yixin Issues Apology: May Be Insolvent

    On October 12, Yixin Group published an "Apology Letter to Clients of Fixed-Income-Like Products" on its subsidiaries Ruicheng and Yirenyouxuan App. Yixin Group stated that due to the contraction of its inclusive finance and wealth management business scale and poor earnings, it has decided to completely stop the redemption of fixed-income-like products by May 22, 2026, and will strive to fairly compensate all investors through orderly exit. However, due to significant losses in multiple business areas, coupled with low asset values in market-based disposals and a lack of effective funding sources, the fixed-income-like products have effectively defaulted, for which the company sincerely apologizes to its clients. The letter indicated that after halting the redemption of fixed-income-like products, Yixin Group systematically reviewed the status of various businesses and promptly commissioned third-party institutions to conduct asset verification and financial due diligence. Preliminary findings suggest that Yixin Group may be insolvent, with a significant debt gap. The underlying assets corresponding to the unpaid fixed-income-like products are of poor quality, and efforts to seek market-based overall disposal have been unsuccessful. Legal due diligence institutions stated that they could not independently investigate the compliance of fixed-income-like products based on the transaction channels and models provided by the group. Yixin Group stated that it will further clarify its asset and liability situation, continue to stabilize its lending and other licensed businesses, make every effort to accelerate the recovery of non-performing loans, expedite the disposal and monetization of valuable assets, and communicate sincerely with clients of fixed-income-like products to resolve risks in accordance with laws and regulations, aiming for fair compensation for investors.

  • IMF Warns: AI May Have Disruptive Effects on Employment and Tax Systems

    On October 12, IMF President Kristalina Georgieva warned that AI is having disruptive effects on the labor market and tax systems, and policymakers need to rethink the education system and take immediate action to help society adapt to these changes. Georgieva stated during her debut at the IMF and World Bank Annual Meetings in Bangkok on Monday, "This is a slowly moving tsunami, but it is still a tsunami." In a session discussing the impact of AI on employment, she noted that AI has weakened demand for certain human workers by replacing a large number of repetitive, procedural jobs; at the same time, it is driving an increase in low-wage positions in industries such as construction, which she believes is "not something to celebrate." Georgieva indicated that this transformation will have profound implications for public finances, with the risk that AI may shift the economy from labor to capital, thereby undermining government tax revenues, as labor income has traditionally been a significant basis for taxation.

  • SWI Group Raises $895 Million to Transform Bitcoin Mining Facilities into AI Infrastructure

    On October 12, The Block reported that SWI Group has raised €800 million (approximately $895 million) from institutional investors following its acquisition of Genesis Digital Assets, a Bitcoin miner owned by FTX. The funds will be used to expand its AI data centers and high-performance computing infrastructure in the United States and Europe. As part of its strategic transformation, the company is repurposing suitable Bitcoin mining facilities for AI computing, gradually exiting the cryptocurrency mining business.

  • CSRC: Exploring Systems and Practices More Suitable for Innovative SMEs

    Wang Li, Deputy Director of the General Office of the China Securities Regulatory Commission (CSRC), stated at a press conference for the 2026 Financial Street Forum Annual Meeting on October 12 that over the past five years, the CSRC has solidly promoted high-quality market development. The Beijing Stock Exchange has operated safely and stably, effectively fulfilling its functions, and positive results have been achieved in market construction.