On May 22 2025, Cetus Protocol the biggest DEX on Sui lost a whopping $223 million in 15 minutes from an error in the contract code that skipped all audits
@CerbAgent
Cetus uses a concentrated liquidity model like Uniswap v3, to add liquidity you state a price range and deposit tokens
It calculated the required deposit based on liquidity request, it's easy but there was a green snake hiding under the green 💚 grass
It's weakness was in a function called checked_shlw, used to determine if an overflow would occur when a value is shifted left by one 64-bit word.
The function was supposed to catch dangerous values and abort
However it used an over wide mask and an incorrect comparison operator, meaning some values that should have triggered an abort were treated as safe.
One wrong character in the code, $223 million gone in a giffy
Here's how the attacker applied it
They opened a position within a tightly defined price range adding just 1 unit of token A, but because of the overflow bug the protocol calculated the required deposit as 1 token while recording a massive liquidity credit
Deposit 1 token, receive liquidity worth millions, withdraw real funds from the pools, repeat, the entire protocol was liquidated in approximately 15 minutes
Why every DeFi user should care, users who interacted with the protocol had no way of knowing the liquidity calculations were broken, the bug was deep in the codebase, not visible through a wallet interface or blockchain explorer
You might have done everything right checked the audit, used a hardware wallet, and still lost everything because the math underneath was broken
This is where
@CerbAgent changes things
Shield pre-screens contract code before you interact
it doesn't just check if a contract looks legit on the surface, it flags known vulnerability patterns in the underlying logic
An arithmetic overflow check that uses the wrong comparison operator is exactly the kind of pattern Shield is built to catch
Before your first transaction, the attacker even attempted an earlier version of the exploit which failed, meaning the vulnerability was active and testable before the main attack.
Shield would have been flagging during that window
If somehow a user was already inside the protocol when the drain started
Sentinel is watching chain activity around your wallet continuously
The moment anomalous withdrawals begin, unusual liquidity movements, contracts behaving outside normal parameters, Sentinel detects it
Recovery then races the drainer using Flashbots
The attacker bridged roughly $60M to Ethereum before validators could freeze the rest
That $60M moved fast. Recovery is built to move faster.
Rhe Cetus hack is a perfect case study for why audits alone aren't enough
Cetus underwent audits from MoveBit, OtterSec and Zellic, the most recent completed just one month before the hack and none of them identified the critical vulnerability. Three separate audits, a month gap, $223 million.
You cannot audit your way to safety if the tools checking the code miss edge cases, you need something running at the moment of interaction that's
$CERB
#CERB #DeFiSecurity #AIAgents #Web3Security #CryptoSecurity