On Nov 3, 2025, Balancer V2 suffered a $100M+ exploit. It wasn’t the new V3 code, but "battle-tested" legacy pools that failed. Here is what happened, how a latent arithmetic bug was amplified, and what the industry can learn about the fragility of legacy code.👇
DeFi Rule #1: Rounding must always favour the Protocol. Balancer’s _upscale function violated this by rounding down, favouring the user. Harmless in standard pools, this became fatal when "Composable Pools" introduced complex exchange rates that exposed the gap.
The Amplification: The bug was tiny, but two features turned it into a $100M drain. batchSwap: Allowed them to borrow assets without collateral. Composability: The pool’s own LP token was treated as a swappable asset, allowing the attacker to manipulate its price directly.
The Attack: Using batchSwap, the attacker "borrowed" BPT and swapped it to create a low-liquidity state. They executed a "long, alternating batch-swap sequence," magnifying the rounding error to deflate the pool’s invariant (D) mathematically.
The Payoff: With the invariant crushed, the BPT price artificially crashed. The attacker swapped assets back into the now-cheap BPT to settle their loan and pocket the difference. They used a two-stage attack (manipulation vs. withdrawal) to evade detection.
Contagion & Fallout: Berachain validators forced a chain halt to hard fork the exploit away. Sonic Labs and Monerium froze assets. It has been proven that decentralised failures often require highly centralised, coordinated interventions to rectify.
The Audit Blind Spot: OpenZeppelin audited V2 before the vulnerable code was added. Trail of Bits audited the pool later but had the specific math library "out of scope." The industry suffered from "battle-tested bias," assuming legacy code was safe.
Regulatory Takeaway 1: Audit Scope." Audited" is not a monolithic status. Supervisors must scrutinise which components were reviewed and when. Post-audit features (like the scaling override) can introduce systemic risks not covered by prior reports.
Regulatory Takeaway 2: The Legacy Liability. Code in "maintenance mode" is a prime target. While teams focus on V3, attackers hunt for complex math edge cases in V2 that were ignored years ago.
Regulatory Takeaway 3: The Centralisation Reality. When core protocols break, the only safety nets are centralised (chain halts, asset freezes). We must confront the tension between ideological decentralisation and the practical actions required to protect users.
808
0
本頁面內容由第三方提供。除非另有說明,OKX 不是所引用文章的作者,也不對此類材料主張任何版權。該內容僅供參考,並不代表 OKX 觀點,不作為任何形式的認可,也不應被視為投資建議或購買或出售數字資產的招攬。在使用生成式人工智能提供摘要或其他信息的情況下,此類人工智能生成的內容可能不準確或不一致。請閱讀鏈接文章,瞭解更多詳情和信息。OKX 不對第三方網站上的內容負責。包含穩定幣、NFTs 等在內的數字資產涉及較高程度的風險,其價值可能會產生較大波動。請根據自身財務狀況,仔細考慮交易或持有數字資產是否適合您。