🌍 The largest DEX on the Sui chain--Cetus was hacked due to a vulnerability in this line of code!

🪄 The issue with this line of code is that the hacker carefully crafted an input such that n <= mask, so it entered line 23, and since n >= 2^192, executing n << 64 would exceed the u256 range, resulting in the function ultimately outputting an unexpected value. The hacker successfully stole a huge amount of assets from the pool. The official codebase of Cetus has now fixed this vulnerability.

💰 Before the theft: Decentralized high-performance blockchain

After the theft: Initiated emergency mechanism to freeze 👍

#Sui