Worth noting this is the exact same library that @CetusProtocol built, which literally EVERY CLAMM on Sui relies upon.
The fix transforms this rather dodgy bit:
public fun sub(arg0: I128, arg1: I128) : I128 {
let v0 = I128{bits: u128_neg(arg1.bits)};
add(arg0, wrapping_add(v0, from(1)))
}
Into proper overflow protection:
public fun sub(arg0: I128, arg1: I128) : I128 {
let v0 = wrapping_sub(arg0, arg1);
let v1 = sign(arg0) != sign(arg1) && sign(arg0) != sign(v0);
assert!(!v1, 0);
v0
}
Massive kudos to @bluefinapp for securing the entire Sui CLAMM ecosystem! This is precisely the sort of rigorous security work that benefits everyone.
During our ongoing formal verification with our partners at @AsymptoticTech, of integer-mate – a core math library used across many Sui protocols – we identified an edge case where signed subtraction could behave incorrectly when the second operand reached its minimum possible value.
While the bug had no impact on Bluefin’s systems, the uncertainty around how others might use the library prompted us to act quickly - preparing an improved implementation with our security partners and working closely with Sui Foundation to spread the word to affected DEXs so they could fix this bug.
Thank you to everyone involved: @AsymptoticTech for the deep dive and spotting the edge case, @osec_io’s @NotDeGhost for jumping in on verification, and @SuiNetwork for leading a swift and coordinated response.
This is the kind of collaboration that sets Sui apart. Security is an ongoing commitment, and this quick identification and solve shows we're in this together.
We’ll continue investing in formal verification, architecture reviews, and ecosystem-wide coordination to raise the bar for secure and verifiable DeFi.
7,78 t.
0
Tällä sivulla näytettävä sisältö on kolmansien osapuolten tarjoamaa. Ellei toisin mainita, OKX ei ole lainatun artikkelin / lainattujen artikkelien kirjoittaja, eikä OKX väitä olevansa materiaalin tekijänoikeuksien haltija. Sisältö on tarkoitettu vain tiedoksi, eikä se edusta OKX:n näkemyksiä. Sitä ei ole tarkoitettu minkäänlaiseksi suositukseksi, eikä sitä tule pitää sijoitusneuvontana tai kehotuksena ostaa tai myydä digitaalisia varoja. Siltä osin kuin yhteenvetojen tai muiden tietojen tuottamiseen käytetään generatiivista tekoälyä, tällainen tekoälyn tuottama sisältö voi olla epätarkkaa tai epäjohdonmukaista. Lue aiheesta lisätietoa linkitetystä artikkelista. OKX ei ole vastuussa kolmansien osapuolten sivustojen sisällöstä. Digitaalisten varojen, kuten vakaakolikoiden ja NFT:iden, omistukseen liittyy suuri riski, ja niiden arvo voi vaihdella merkittävästi. Sinun tulee huolellisesti harkita, sopiiko digitaalisten varojen treidaus tai omistus sinulle taloudellisessa tilanteessasi.


