The resilience of the SUI ecosystem is evident, showing long-term rise potential even after security crises.

Firm Belief After the Security Crisis: Why SUI Still Has Long-Term Rise Potential?

1. A chain reaction triggered by an attack

On May 22, 2023, the leading AMM protocol Cetus deployed on the SUI network suffered a hacker attack. The attacker exploited a logical vulnerability related to an "integer overflow issue" to launch a precise manipulation, resulting in a loss of over 200 million dollars in assets. This incident is not only one of the largest security incidents in the DeFi space so far this year but also the most destructive hacker attack since the launch of the SUI mainnet.

According to DefiLlama data, the total TVL of the SUI chain plummeted by more than $330 million on the day of the attack, with the locked amount of the Cetus protocol evaporating by 84% in an instant, falling to $38 million. As a result, several popular tokens on SUI (including Lofi, Sudeng, Squirtle, etc.) experienced a drop of 76% to 97% within just one hour, triggering widespread concerns in the market about the security and ecological stability of SUI.

However, after this shockwave, the SUI ecosystem has demonstrated strong resilience and recovery ability. Although the Cetus incident caused short-term fluctuations in confidence, the on-chain funds and user activity did not experience a sustained decline; instead, it significantly heightened the entire ecosystem's focus on security, infrastructure development, and project quality.

This article will focus on the reasons for this attack incident, the node consensus mechanism of SUI, the security of the MOVE language, and the ecological development of SUI. It will outline the current ecological landscape of this public chain, which is still in the early stages of development, and discuss its future development potential.

Steadfast Belief After the Security Crisis: Why SUI Still Has Long-Term Rise Potential?

2. Analysis of the Causes of the Cetus Incident Attack

2.1 Attack Implementation Process

According to the technical analysis of the Cetus attack incident by the Slow Mist team, the hacker successfully exploited a critical arithmetic overflow vulnerability in the protocol, using flash loans, precise price manipulation, and contract flaws to steal over $200 million in digital assets in a short period of time. The attack path can be roughly divided into the following three stages:

①Initiate flash loans to manipulate prices

Hackers first used a maximum slippage flash swap of 10 billion haSUI flash loans to borrow a large amount of funds for price manipulation.

Flash loans allow users to borrow and repay funds within the same transaction, requiring only a fee, and feature high leverage, low risk, and low cost. Hackers exploited this mechanism to temporarily drive down market prices and precisely control them within a very narrow range.

The attacker then prepares to create an extremely narrow liquidity position, setting the price range precisely between the lowest quote of 300,000 and the highest price of 300,200, with a price width of only 1.00496621%.

By using the above methods, hackers successfully manipulated the haSUI price with a sufficient amount of tokens and massive liquidity. Subsequently, they also targeted several tokens without actual value for manipulation.

②Add liquidity

The attacker creates a narrow liquidity position, claims to add liquidity, but due to a vulnerability in the checked_shlw function, ultimately only receives 1 token.

This is essentially due to two reasons:

  1. The mask setting is too wide: equivalent to a huge liquidity addition limit, resulting in the verification of user input in the contract being virtually nonexistent. Hackers bypassed the overflow detection by setting abnormal parameters, constructing inputs that are always less than this limit.

  2. Data overflow is truncated: When performing the shift operation n << 64 on the numeric value n, a data truncation occurs due to the shift exceeding the effective bit width of the uint256 data type (256 bits). The overflow part in the high bits is automatically discarded, resulting in the computation falling far below expectations, which causes the system to underestimate the amount of haSUI required for the exchange. The final calculation result is approximately less than 1, but since it is rounded up, the final result is equal to 1, meaning the hacker only needs to add 1 token to exchange for a large amount of liquidity.

③Withdraw liquidity

Repay the flash loan while keeping massive profits. Ultimately withdraw token assets worth hundreds of millions of dollars from multiple liquidity pools.

The situation of capital loss is serious, and the attack has resulted in the following assets being stolen:

  • 12.9 million SUI (approximately 54 million USD)

  • 60 million USDC

  • 4.9 million USD Haedal Staked SUI

  • 19.5 million US dollars TOILET

  • Other tokens like HIPPO and LOFI have dropped 75--80%, with liquidity exhausted.

Steadfast Belief After the Security Crisis: Why SUI Still Has Long-term rise Potential?

2.2 Causes and Characteristics of the Vulnerability

The Cetus vulnerability has three characteristics:

  1. Extremely low repair costs: On one hand, the fundamental cause of the Cetus incident was a flaw in the Cetus mathematical library, not an error in the protocol's pricing mechanism or underlying architecture. On the other hand, the vulnerability was limited to Cetus itself and had nothing to do with SUI's code. The root of the vulnerability lay in a boundary condition check, and it could be completely eliminated by modifying just two lines of code; once the repair is completed, it can be immediately deployed to the mainnet to ensure that the subsequent contract logic is complete and to eliminate this vulnerability.

  2. High concealment: The contract has been operating smoothly for two years with zero faults. The Cetus Protocol has undergone multiple audits, but no vulnerabilities were found, primarily because the Integer_Mate library used for mathematical calculations was not included in the audit scope.

Hackers exploit extreme values to precisely construct trading intervals, creating extremely rare scenarios with exceptionally high liquidity, which triggers abnormal logic, indicating that such issues are difficult to detect through regular testing. These issues often lie in blind spots within people's perception, hence they remain hidden for a long time before being discovered.

  1. Not a problem unique to Move:

Move excels in resource safety and type checking over various smart contract languages, with built-in native detection for integer overflow issues in common scenarios. This overflow occurred because an incorrect value was first used for the upper limit check when calculating the required token amount during liquidity addition, and a bitwise operation was used instead of the conventional multiplication operation. If conventional addition, subtraction, multiplication, and division operations were used in Move, it would automatically check for overflow situations, preventing such high-order truncation issues.

Similar vulnerabilities have also appeared in other languages (such as Solidity and Rust), and they are even more easily exploited due to the lack of integer overflow protection; before the updates in the Solidity version, overflow checks were very weak. Historically, there have been addition overflows, subtraction overflows, multiplication overflows, etc., all directly caused by the calculation results exceeding the range. For example, the vulnerabilities in the BEC and SMT smart contracts written in Solidity bypassed the detection statements in the contracts through carefully constructed parameters, enabling excessive transfers to execute attacks.

Steadfast Belief After the Security Crisis: Why SUI Still Has Long-Term Rise Potential?

3. The consensus mechanism of SUI

3.1 Introduction to the SUI Consensus Mechanism

Overview:

SUI adopts a Delegated Proof of Stake framework (DeleGated Proof of Stake, abbreviated as DPoS)). Although the DPoS mechanism can improve transaction throughput, it cannot provide the extremely high level of decentralization that PoW (Proof of Work) can. Therefore, the level of decentralization in SUI is relatively low, and the governance threshold is relatively high, making it difficult for ordinary users to directly influence network governance.

  • Average number of validators: 106

  • Average Epoch cycle: 24 hours

Mechanism process:

  • Equity Delegation: Ordinary users do not need to run nodes themselves; they can participate in network security assurance and reward distribution by staking SUI and delegating it to candidate validators. This mechanism lowers the participation threshold for ordinary users, allowing them to engage in network consensus by "hiring" trusted validators. This is also a significant advantage of DPoS over traditional PoS.

  • Representative round of block production: A small number of selected validators produce blocks in a fixed or random order, which improves confirmation speed and increases TPS.

  • Dynamic Election: After each voting cycle ends, a dynamic rotation is conducted based on voting weight to re-elect the Validator set, ensuring node vitality, interest consistency, and decentralization.

Advantages of DPoS:

  • High efficiency: Due to the controllable number of block-producing nodes, the network can complete confirmations in milliseconds, meeting high TPS requirements.

  • Low cost: Fewer nodes participate in the consensus, significantly reducing the network bandwidth and computing resources required for information synchronization and signature aggregation. As a result, hardware and operational costs decrease, the requirements for computing power decrease, and costs are lower. Ultimately achieving lower user transaction fees.

  • High security: The staking and delegation mechanisms synchronize the cost and risk of attacks; combined with the on-chain confiscation mechanism, effectively suppress malicious behavior.

At the same time, in the consensus mechanism of SUI, an algorithm based on BFT (Byzantine Fault Tolerance) is employed, requiring more than two-thirds of the votes among validators to reach a consensus in order to confirm transactions. This mechanism ensures that even if a minority of nodes act maliciously, the network can still maintain secure and efficient operation. Any upgrades or major decisions also require more than two-thirds of the votes to be implemented.

Essentially, DPoS is a compromise solution to the impossible triangle, balancing decentralization and efficiency. In the "impossible triangle" of security-decentralization-scalability, DPoS chooses to reduce the number of active block-producing nodes in exchange for higher performance, sacrificing a certain degree of complete decentralization compared to pure PoS or PoW, but significantly improving network throughput and transaction speed.

Steadfast Belief After the Security Crisis: Why SUI Still Has Long-Term Rise Potential?

3.2 The performance of SUI in this attack

The operation of the 3.2.1 freeze mechanism

In this incident, SUI rapidly froze the addresses related to the attacker.

From a code perspective, it prevents transfer transactions from being packaged on-chain. Validator nodes are the core components of the SUI blockchain, responsible for validating transactions and executing protocol rules. By collectively ignoring transactions related to the attacker, these validators effectively implement a mechanism similar to 'account freezing' in traditional finance at the consensus level.

SUI itself has a built-in deny list mechanism, which is a blacklist feature that can prevent any transactions involving listed addresses. Since this feature is already present in the client, when an attack occurs,

SUI can immediately freeze the hacker's address. Without this feature, even if SUI has only 113 validators, it would be difficult for Cetus to coordinate all validators to respond one by one in a short period of time.

3.2.2 Who has the authority to change the blacklist?

TransactionDenyConfig is a YAML/TOML configuration file loaded locally by each validator. Anyone running a node can edit this file, hot reload, or restart the node, and update the list. On the surface, each validator appears to be freely expressing their own values.

In fact, for consistency and effectiveness of security policies, updates to this critical configuration are usually coordinated. Since this is an "urgent update driven by the SUI team," it is essentially the SUI Foundation (or its authorized developers) that sets and updates this denial list.

SUI has released a blacklist, and in theory, validators can choose whether to adopt it------but in practice, most people will automatically adopt it by default. Therefore, although this feature protects user funds, it does have a certain degree of centralization in essence.

3.2.3 The Essence of the Blacklist Function

The blacklist feature is not actually a logic at the protocol level; it is more like an additional layer of security to respond to emergencies and ensure the safety of user funds.

Essentially a security guarantee mechanism. Similar to a "security chain" tied to the door, it is only activated for those who want to break into the house, that is, for those who intend to act maliciously against the protocol. For users:

  • For large users, the main providers of liquidity, the protocol aims to ensure the safety of funds, because in reality, the on-chain data TVL is contributed entirely by the major large users. To ensure the long-term development of the protocol, safety will undoubtedly be prioritized.

  • For retail investors, contributors to ecological activity, and strong supporters of technology and community co-construction. The project party also hopes that it can be...

SUI5.53%
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
  • 4
  • Share
Comment
0/400
GetRichLeekvip
· 7h ago
I got wrecked, but I still can't help but buy the dip on sui.
View OriginalReply0
ShadowStakervip
· 07-26 06:40
network resilience being tested fr... but these integer overflow exploits are getting old smh. where's the proper validation?
Reply0
NFTRegrettervip
· 07-26 06:32
What to buy, I lost badly.
View OriginalReply0
VitaliksTwinvip
· 07-26 06:17
go-with-the-flow killer
View OriginalReply0
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)