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,79 rb
0
Konten pada halaman ini disediakan oleh pihak ketiga. Kecuali dinyatakan lain, OKX bukanlah penulis artikel yang dikutip dan tidak mengklaim hak cipta atas materi tersebut. Konten ini disediakan hanya untuk tujuan informasi dan tidak mewakili pandangan OKX. Konten ini tidak dimaksudkan sebagai dukungan dalam bentuk apa pun dan tidak dapat dianggap sebagai nasihat investasi atau ajakan untuk membeli atau menjual aset digital. Sejauh AI generatif digunakan untuk menyediakan ringkasan atau informasi lainnya, konten yang dihasilkan AI mungkin tidak akurat atau tidak konsisten. Silakan baca artikel yang terkait untuk informasi lebih lanjut. OKX tidak bertanggung jawab atas konten yang dihosting di situs pihak ketiga. Kepemilikan aset digital, termasuk stablecoin dan NFT, melibatkan risiko tinggi dan dapat berfluktuasi secara signifikan. Anda perlu mempertimbangkan dengan hati-hati apakah trading atau menyimpan aset digital sesuai untuk Anda dengan mempertimbangkan kondisi keuangan Anda.


