|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Cryptocurrency News Articles
Flash Loan Attack Drains 500K USD From CloberDEX on Base
Dec 26, 2024 at 09:05 am

Recently, an on-chain attack was detected against CloberDEX, a project on Base. The attacker gained about 133 ETH, or about 500,000 USD, through this attack.
The attacked project is CloberDEX, and its main functions are as follows: open a new trading pool containing trading pairs A to B and B to A, and each trading pair also contains a preset trading strategy; mint is to add liquidity to the trading pair and obtain LP Token; burn is to destroy LP Token to obtain the corresponding currency.
Let's take a look at the attack process:
First, the attacker borrowed 267 WETH from Morpho Blue using flashloan.
Then, the attacker used open to open two trading pairs on CloberDEX, namely Token/WETH and WETH/Token, where Token is a contract deployed by the attacker himself.
Then, the attacker used mint to transfer 267 WETH and 267 Token to the newly opened trading pair to add liquidity and obtain LP Token.
So far, there is no problem. Finally, the attacker uses burn to destroy the LP Token just obtained. Let's take a look at the specific implementation of burn;
The control flow goes to the lock function. Similarly, let's take a look at the specific implementation of lock;
As you can see, the lock function passes bytes caldata data to the lockAcquired function. Let's continue to look at the implementation of this function.
We found this line of code
We can see that the function called by the code is determined by data. The first four bytes of data are the signature of _burn, so burn essentially calls _burn.
We can see that _burn calls pool.strategy.burnHook(msg.sender, key, burnAmount,supply) again, and the processing of the pool's reserver comes after this code. So, the problem lies here. The address of the strategy contract of the pool corresponding to the trading pair can be controlled by the attacker. In this attack, the attacker wrote the address as his own attack contract address: 0x32fb1bedd95bf78ca2c6943ae5aeaeaafc0d97c1 .
When the contract process reaches the BurnHook of the attacking contract, burn is called again to complete the reentrancy attack.
The attacker took out 264 WETH and 133 WETH from the CloberDEX contract through this vulnerability, and made a profit of 133.7 ETH after repaying the flashloan loan, which is about 500,000 USD.
The main cause of this vulnerability is that the CloberDEX project contract did not perform reentrancy detection and protection in the code for obtaining and destroying LP Tokens, and the state variables were updated after the contract was called, which eventually led to the attacker using the reentry vulnerability to empty the project's WETH. It is recommended that the project party should conduct multi-party verification when designing the economic model, price calculation mechanism and code operation logic, and try to select multiple audit companies for cross-audit when auditing the contract before it goes online.
Disclaimer:info@kdj.com
The information provided is not trading advice. kdj.com does not assume any responsibility for any investments made based on the information provided in this article. Cryptocurrencies are highly volatile and it is highly recommended that you invest with caution after thorough research!
If you believe that the content used on this website infringes your copyright, please contact us immediately (info@kdj.com) and we will delete it promptly.
-
- Morgan Stanley's Bitcoin ETF Holdings Soar Past 10,500 BTC, Signaling Wall Street's Deepening Crypto Embrace
- Oct 06, 2026 at 08:05 am
- Morgan Stanley's Bitcoin ETF now holds over 10,500 BTC, a significant milestone showcasing growing institutional demand for Bitcoin exposure through regulated channels, amidst broader market volatility.
-
-
- Crypto PACs Flex Muscle in US Midterms: Fairshake Backs House Candidates, Eyes Ohio Senate
- Oct 06, 2026 at 07:55 am
- Crypto PACs are making big moves in the 2026 US midterms, with Fairshake allocating millions to House candidates and eyeing a significant spend in Ohio's Senate race, signaling a bipartisan push for digital asset clarity.
-
- Strategy Stock Surges as Bitcoin Holdings Hit Record High; MSTR Stock Shows Resilience Amidst Strategic Capital Allocation
- Oct 06, 2026 at 07:45 am
- Strategy stock gains traction following a significant Bitcoin purchase, expanding its crypto treasury to a new peak. MSTR stock and preferred shares exhibit volatility.
-
-
-
-
- Zcash Finds Its Voice in Washington Amidst Rising AI Fraud Concerns
- Oct 05, 2026 at 03:55 pm
- Zcash's advocacy group, PGPZ, establishes a lobbying presence in Washington to champion privacy-preserving digital cash, while the financial world grapples with a €95 million AI voice scam, highlighting the dual nature of emerging tech.
-
- Silver Price Prediction: Market Brace for Volatility Amidst Wild Forecasts and Key Support Levels
- Oct 05, 2026 at 12:05 am
- Silver is navigating a volatile landscape, with an analyst predicting an audacious climb to $1,100 by 2031 while near-term focus remains on critical support at $46-$50 and resistance at $67.543, following recent weak US jobs data and a reported $850 billion precious metals sell-off.
































