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,77 B
0
Bu sayfadaki içerik üçüncü taraflarca sağlanmaktadır. Aksi belirtilmediği sürece, atıfta bulunulan makaleler OKX TR tarafından kaleme alınmamıştır ve OKX TR, bu materyaller üzerinde herhangi bir telif hakkı talebinde bulunmaz. İçerik, yalnızca bilgilendirme amaçlı sağlanmıştır ve OKX TR’nin görüşlerini yansıtmaz. Ayrıca, sunulan içerikler herhangi bir konuya ilişkin onay niteliği taşımaz ve yatırım tavsiyesi veya herhangi bir dijital varlığın alınıp satılmasına yönelik davet olarak değerlendirilmemelidir. Özetler ya da diğer bilgileri sağlamak için üretken yapay zekânın kullanıldığı durumlarda, bu tür yapay zekâ tarafından oluşturulan içerik yanlış veya tutarsız olabilir. Daha fazla ayrıntı ve bilgi için lütfen bağlantıda sunulan makaleyi okuyun. OKX TR, üçüncü taraf sitelerde barındırılan içeriklerden sorumlu değildir. Sabit coinler ve NFT’ler dâhil olmak üzere dijital varlıkları tutmak, yüksek derecede risk içerir ve bu tür varlık fiyatlarında büyük ölçüde dalgalanma yaşanabilir. Dijital varlıkları alıp satmanın veya tutmanın sizin için uygun olup olmadığını finansal durumunuz ışığında dikkatlice değerlendirmelisiniz.


