📈 Get daily crypto insights that make you smarter about your money

How a Single Integer Overflow in Cetus Protocol Drained $223 Million From Sui Liquidity Pools

The decentralized finance ecosystem suffered one of its most technically sophisticated exploits when Cetus Protocol, the largest concentrated liquidity DEX on the Sui blockchain, lost approximately $223 million to a vulnerability hidden in a widely-used math library. The attack demonstrated how a single flawed overflow check in low-level arithmetic can cascade through an entire protocol, emptying liquidity pools and destabilizing an entire blockchain ecosystem within minutes.

The Exploit Mechanics

The root cause traced back to a faulty function called checked_shlw in the open-source integer-mate u256 math library that Cetus relied upon for its Concentrated Liquidity Market Maker calculations. The function was designed to safely shift a 256-bit value left by 64 bits — a critical scaling operation used when converting between token amounts and liquidity positions in CLMM pools. However, the overflow condition was implemented incorrectly. Instead of rejecting any value with non-zero bits in the top 64 positions, the function used a comparison threshold that allowed certain values to pass through and get truncated during the shift operation.

The attacker exploited this with surgical precision. First, they used flash swaps to source temporary balances, executing the entire sequence atomically. They opened a concentrated liquidity position in an extremely narrow tick range — roughly 200 ticks wide — then triggered the add-liquidity path in a way that forced execution through the vulnerable u256 scaling branch. Because the overflow check failed, the protocol undercharged the required token deposit while simultaneously crediting a massively inflated liquidity amount. The attacker then called remove-liquidity, withdrawing real reserves against the artificially inflated position, repaid the flash swap component, and kept the remainder as profit. This sequence was repeated across multiple pools.

Affected Systems

The impact extended well beyond Cetus itself. Approximately $60 million was quickly bridged to Ethereum, while $162 million remained on Sui and was frozen through emergency validator coordination. The resulting liquidity vacuum was devastating: USDC liquidity practically disappeared, routing across the entire Sui ecosystem degraded, and token prices experienced extreme drawdowns within minutes. Protocols that depended on Cetus for price feeds and swap routing were effectively paralyzed.

Critically, the vulnerable integer-mate library was shared across multiple Sui ecosystem projects. Kriya, Momentum, and Bluefin were all reported as having related exposure to the same flawed math primitive, forcing emergency audits and patches across the ecosystem. This was not a single-protocol failure — it was a shared-library vulnerability that threatened every project using the same code.

The Mitigation Strategy

Cetus paused affected contracts immediately to prevent further extraction. In parallel, Sui validators coordinated an unprecedented emergency action to block attacker-controlled addresses at the network level. This on-chain intervention preserved the majority of stolen funds that had not yet been bridged out. The Sui community then conducted an on-chain governance vote to reclaim the frozen assets, with validators representing 90.9% of stake voting in favor. Recovered funds were moved to a multisig trust account for redistribution to affected users.

The incident prompted a broader ecosystem hardening effort. Shared math libraries across the Move ecosystem received emergency audits, and protocols were advised to implement independent verification of critical arithmetic operations rather than relying solely on shared dependencies.

Lessons Learned

First, shared library vulnerabilities represent systemic risk that multiplies damage exponentially. A single flawed function in integer-mate threatened every protocol using it, not just Cetus. Second, overflow checks in fixed-point arithmetic require extreme scrutiny — the difference between a correct and incorrect threshold check is the difference between a secure protocol and a nine-figure loss. Third, the speed of response matters enormously. Sui validators freezing funds within hours prevented the attacker from bridging out the full amount. Fourth, concentrated liquidity designs amplify the impact of arithmetic bugs because of the complex math involved in tick-based position management.

User Action Required

Users who held positions in Cetus Protocol pools should verify whether they are eligible for reimbursement through the community recovery process. Developers building on any blockchain should audit all shared math libraries in their dependency tree, paying particular attention to fixed-point scaling operations and overflow guards. Projects using the integer-mate library or similar u256 utilities should implement independent mathematical verification of critical code paths. With Bitcoin trading around $77,800 and the broader crypto market holding significant value, the incentive for sophisticated attacks continues to grow, making rigorous security practices non-negotiable.

Disclaimer: This article is for informational purposes only and does not constitute financial advice. Always conduct your own research before engaging with any DeFi protocol.

🌱 FOR BUSINESSES BitcoinsNews.com
Reach 100K+ Crypto Readers
Sponsored content, press releases, banner ads, and newsletter placements. Put your brand in front of Bitcoin's most engaged audience.

26 thoughts on “How a Single Integer Overflow in Cetus Protocol Drained $223 Million From Sui Liquidity Pools”

  1. u256_tragedy_

    223M because someone used <= instead of < in a 64-bit shift comparison. formal verification on math libraries isnt optional anymore

    1. real yield protocols still depend on the same math libraries. the cetus bug was in integer-mate which is used across multiple Sui defi projects. one bug, cascading risk

      1. a 64-bit left shift with a broken threshold check. 223M gone because someone used <= instead of < in a comparison

      2. sui_watcher integer-mate is used across Sui defi. the contagion risk from one library bug is insane. every project depending on it was exposed whether they knew it or not

        1. Pavel H. contagion from shared libraries is why every sui defi project should run their own fork tests against integer-mate. trusting upstream is how you get rekt

          1. Yumin K. running fork tests against integer-mate should be standard. every Sui DeFi project trusted the same upstream library and nobody checked the shift logic

        2. Pavel H. contagion risk from one shared library is the real story. every Sui DeFi project was exposed and most didnt even know

  2. one left shift by 64 bits with a broken threshold. 223M gone because of a comparison operator. this is why formal verification on math libraries isnt optional

    1. insurance protocols wouldnt have covered this. the loss was instantaneous across multiple pools. by the time humans noticed the transaction was already mined

  3. one faulty left shift by 64 bits and 223M vanishes. the fragility of CLMM math is terrifying when you think about it

    1. Dario G. CLMM scaling math is genuinely hard. concentrated liquidity positions need u256 precision and one bad shift function takes everything. uniswap v3 had similar near-misses early on

  4. overflow_catch

    checked_shlw doing a left shift by 64 bits with a broken overflow check. such a small function took down 223M. this is why dependency auditing matters more than your own code audits

    1. shift_left_tears

      overflow_catch a single checked_shlw function in a dependency library took down 223M. your audit means nothing if you dont audit your imports

  5. checked_twice_

    checked_shlw was supposed to prevent overflow but the threshold comparison was wrong. one function in a dependency library and 223M gone in minutes

    1. import_blind_

      checked_twice_ npm audit culture but for move libraries. everyone trusts upstream until it blows up. integer-mate had the bug in plain sight

    2. shift_register

      checked_twice_ the fact that integer-mate was open source and nobody caught it tells you everything about how import auditing works in practice. it doesnt

    3. checked_twice_ the worst part is integer-mate was open source. anyone could have caught this with a proper review but nobody audits their imports

  6. CLMM pools are inherently more complex math than standard AMMs. the scaling operations between token amounts and liquidity positions create way more edge cases for overflow bugs

Leave a Comment

Your email address will not be published. Required fields are marked *

BTC$65,350.00+1.5%ETH$1,957.57+3.8%SOL$76.34+1.8%BNB$574.06+0.5%XRP$1.11+0.7%ADA$0.1655+0.1%DOGE$0.0728-0.8%DOT$0.8165-0.8%AVAX$6.68-1.4%LINK$8.79+4.1%UNI$3.88+5.9%ATOM$1.39+0.1%LTC$47.61+1.8%ARB$0.0820-0.8%NEAR$1.85+3.1%FIL$0.7465+0.7%SUI$0.7175-0.3%BTC$65,350.00+1.5%ETH$1,957.57+3.8%SOL$76.34+1.8%BNB$574.06+0.5%XRP$1.11+0.7%ADA$0.1655+0.1%DOGE$0.0728-0.8%DOT$0.8165-0.8%AVAX$6.68-1.4%LINK$8.79+4.1%UNI$3.88+5.9%ATOM$1.39+0.1%LTC$47.61+1.8%ARB$0.0820-0.8%NEAR$1.85+3.1%FIL$0.7465+0.7%SUI$0.7175-0.3%
Scroll to Top