The SUI ecosystem project Cetus was attacked for $230 million, with an overflow vulnerability leading to massive losses.

robot
Abstract generation in progress

SUI ecosystem project Cetus suffered a $230 million attack, detailed methods and flow of funds.

On May 22, the liquidity provider Cetus on the SUI ecosystem was allegedly attacked, resulting in a significant decrease in liquidity pool depth and a drop in several token trading pairs, with estimated losses exceeding $230 million. Cetus subsequently announced that it has suspended the smart contract and is investigating the incident.

A certain security team quickly intervened to analyze and issued a security alert. Below is a detailed analysis of the attack methods and the funds transfer situation.

Attack Analysis

The core of this attack lies in the attackers carefully constructing parameters, allowing the overflow to occur while bypassing detection, ultimately exchanging a minimal amount of tokens for a substantial amount of liquidity assets. The specific steps are as follows:

  1. The attacker first borrowed a large amount of haSUI through a flash loan, causing the pool price to plummet by 99.90%.

  2. The attacker chose a very narrow price range to establish a liquidity position, with a range width of only 1.00496621%.

  3. Attack Core: The attacker claims to add a huge amount of liquidity, but the system actually only received 1 token A. This is due to an overflow detection bypass vulnerability in the checked_shlw function within the get_delta_a function.

  4. The attacker removes liquidity and gains huge token profits.

  5. The attacker returned the flash loan, netting approximately 10,024,321.28 haSUI and 5,765,124.79 SUI.

Slow Fog: Cetus was hacked for $230 million, analyzing the attack method and fund transfer situation

Project Party Fix

Cetus has released a patch that primarily fixes the implementation of the checked_shlw function:

  • Correct the incorrect mask to the correct threshold
  • Correct judgment conditions
  • Ensure that the overflow flag can be correctly detected and returned.

Slow Mist: Cetus was hacked for $230 million, analyzing the attack methods and fund transfer situation

Capital Flow Analysis

The attacker profited approximately $230 million, including various assets such as SUI, vSUI, and USDC. The attacker transferred part of the funds to EVM addresses via cross-chain bridges. Specific actions include:

  • Cross-chain some assets like USDC, SOL, suiETH to EVM addresses
  • Transfer approximately 5.2341 WBNB across chains to BSC address
  • Deposit assets worth $10 million into Suilend.
  • Transfer 24,022,896 SUI to the new address

According to Cetus, a total of $162 million in stolen funds has been successfully frozen on SUI.

Slow Mist: Cetus was hacked for 230 million USD, analysis of attack methods and fund transfer situation

On EVM chains, the actions of attackers include:

  • Received and held approximately 5.2319 BNB on BSC
  • Receive and exchange multiple tokens for ETH on Ethereum
  • Transfer 20,000 ETH to the new address
  • The current balance on Ethereum is 3,244 ETH

Slow Fog: Cetus was hacked for $230 million, analyzing attack methods and fund transfer situation

Summary

This attack demonstrates the dangers of mathematical overflow vulnerabilities. The attacker exploited the flaw in the checked_shlw function by making precise calculations and choosing specific parameters, obtaining massive liquidity at a very low cost. Developers should strictly validate the boundary conditions of all mathematical functions in smart contract development to prevent similar vulnerabilities.

Slow Mist: Cetus was hacked for $230 million, analyzing the attack methods and fund transfer situation

Slow Fog: Cetus was hacked for $230 million, analyzing the attack method and fund transfer situation

Slow Mist: Cetus hacked $230 million, analysis of attack methods and fund transfer situation

Slow Fog: Cetus was stolen 230 million USD, analyzing the attack methods and fund transfer situation

Slow Fog: Cetus was hacked for $230 million, analyzing the attack method and fund transfer situation

Slow Mist: Cetus was stolen $230 million, analyzing the attack method and fund transfer situation

Slow Fog: Cetus was hacked for $230 million, analyzing the attack method and fund transfer situation

Slow Mist: Cetus was hacked for $230 million, analyzing the attack methods and fund transfer situation

Slow Mist: Cetus was hacked for $230 million, analyzing the attack method and fund transfer situation

Slow Fog: Cetus was hacked for 230 million dollars, analyzing the attack method and fund transfer situation

Slow Mist: Cetus was hacked for $230 million, analyzing the attack methods and the situation of fund transfer

Slow Mist: Cetus stolen 230 million USD, analysis of attack methods and fund transfer situation

Slow Mist: Cetus was hacked for $230 million, analyzing the attack method and fund transfer situation

Slow Fog: Cetus was hacked for $230 million, analysis of the attack method and fund transfer situation

Slow Fog: Cetus was hacked for $230 million, analyzing the attack methods and fund transfer situation

Slow Mist: Cetus was hacked for $230 million, analyzing the attack method and fund transfer situation

Slow Fog: Cetus was hacked for $230 million, analyzing the attack methods and fund transfer situation

SUI3.97%
CETUS2.77%
View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • 9
  • Repost
  • Share
Comment
0/400
SandwichTradervip
· 3h ago
Such a big loophole, there's no face left.
View OriginalReply0
NotSatoshivip
· 08-12 14:28
Pulling off such a big rug and still claiming it's not an inside job?
View OriginalReply0
BtcDailyResearchervip
· 08-11 11:45
Be Played for Suckers is here, this play is really big.
View OriginalReply0
TokenCreatorOPvip
· 08-10 21:48
Another vulnerability in smart contracts. Babes, remember: never be the first to eat the crab.
View OriginalReply0
WhaleSurfervip
· 08-10 21:46
SUI's father is here to collect rent!
View OriginalReply0
NotGonnaMakeItvip
· 08-10 21:43
He is here... another sucker is gone.
View OriginalReply0
LonelyAnchormanvip
· 08-10 21:43
Two hundred million just disappeared like that, can't open the champagne.
View OriginalReply0
MevShadowrangervip
· 08-10 21:23
Another new project has fallen. Sigh.
View OriginalReply0
ZKProofstervip
· 08-10 21:19
technically speaking, another overflow exploit... amateurs never learn to handle edge cases smh
Reply0
View More
Trade Crypto Anywhere Anytime
qrCode
Scan to download Gate app
Community
English
  • 简体中文
  • English
  • Tiếng Việt
  • 繁體中文
  • Español
  • Русский
  • Français (Afrique)
  • Português (Portugal)
  • Bahasa Indonesia
  • 日本語
  • بالعربية
  • Українська
  • Português (Brasil)