BTC
ETH
HTX
SOL
BNB
View Market
简中
繁中
English
日本語
한국어
ภาษาไทย
Tiếng Việt

Beosin: zkSync ecological DEX Merlin security incident analysis

星球君的朋友们
Odaily资深作者
This article is about 695 words, reading the full article takes about 1 minutes
All the funds in the USDC-WETH liquidity pool have been withdrawn, and the attacker has made a total profit of about 1.8 million US dollars.
AI Summary
Expand
All the funds in the USDC-WETH liquidity pool have been withdrawn, and the attacker has made a total profit of about 1.8 million US dollars.

Original source:Beosin

Original source:On April 26, 2023, according to the Beosin-Eagle Eye situational awareness platform, a security incident occurred at Merlin Dex.All the funds in the USDC-WETH liquidity pool have been withdrawn, and the attacker has made a total profit of about 1.8 million US dollars.

It is understood that Merlin Dex is a decentralized exchange. Regarding this security incident, the Beosin security team analyzed the incident for the first time, and the results are as follows.

Event related information

Let's take one of the transactions as an example for analysis

0xf21bedfb0e40bc4e98fd89d6b2bdaf82f0c452039452ca71f2cac9d8fea29ab2

attack transaction

0xc0D6987d10430292A3ca994dd7A31E461eb28182

0x2744d62a1e9ab975f4d77fe52e16206464ea79b7

attacker address

Attacked contract

0x82cf66e9a45Df1CD3837cF623F7E73C1Ae6DFf1e (USDC-WETH pool)

attack process

1. In the first step, the pool creator (0xc0D6987d10430292A3ca994dd7A31E461eb28182) created the factory contract (0x63E6fdAdb86Ea26f917496bEEEAEa4efb319229F), and the Feeto address has been set to (0xc0D6987d104302 92A3ca994dd7A31E461eb28182).2. The attacker deploys the USDC-WETH pool (0x82cf66e9a45Df1CD3837cF623F7E73C1Ae6DFf1e) through the factory contract,

When the pool was initialized, the USDC and WETH in the pool were maximally authorized to the Feeto address of the contract factory. It can be seen that there is an obvious risk of centralization.

3. So with the maximum authorization, the attacker transfers all the tokens in the pool.

4. It is worth noting that before the attack, the Owner and Feeto addresses of the factory contract have been changed, but this step is not necessary for the attack. It is guessed that it may be an operation done by the attacker to confuse others.

Finally, it can be seen that all the funds in the USDC-WETH liquidity pool have been withdrawn, and the attacker has made a total profit of about 1.8 million US dollars.

Vulnerability analysisThe Beosin security team analyzed that this attack mainly used

The centralization problem of the pair contract maximizes the authorization of the Feeto address in the factory contract at the time of initialization, and the funds in the pool may be withdrawn at any time by the Feeto address set at the time of initialization.

Funds Tracking

The attacker called the transferFrom function to transfer 811 K USDC from the pool to the attacker address 1 (0x2744d62a1e9ab975f4d77fe52e16206464ea79b7). The attacker address 2 (0xcE4ee0E01bb729C1c5d6D2327BB0F036fA2cE7E2) extracted 435.2 eth from the token 1 contract (WETH), and transferred it to the Ethereum address (0xa7D481944730a88B862eB57248Cb1B2C 8aa358Ad) and address (0x0b8a3ef6307049aa0ff215720ab1fc885007393d), making a total profit of about $1.8 million.The Beosin KYT anti-money laundering analysis platform found that the stolen funds are still stored on the two Ethereum mainnet addresses of the above-mentioned attackers, and the Beosin security team will continue to monitor and track the stolen funds.

Summarize

SummarizeIn response to this incident, the Beosin security team recommends,

0x
Safety
ETH
USDC
DEX
zkSync
Welcome to Join Odaily Official Community