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.
1,95 k
0
Le contenu de cette page est fourni par des tiers. Sauf indication contraire, OKX n’est pas l’auteur du ou des articles cités et ne revendique aucun droit d’auteur sur le contenu. Le contenu est fourni à titre d’information uniquement et ne représente pas les opinions d’OKX. Il ne s’agit pas d’une approbation de quelque nature que ce soit et ne doit pas être considéré comme un conseil en investissement ou une sollicitation d’achat ou de vente d’actifs numériques. Dans la mesure où l’IA générative est utilisée pour fournir des résumés ou d’autres informations, ce contenu généré par IA peut être inexact ou incohérent. Veuillez lire l’article associé pour obtenir davantage de détails et d’informations. OKX n’est pas responsable du contenu hébergé sur des sites tiers. La détention d’actifs numériques, y compris les stablecoins et les NFT, implique un niveau de risque élevé et leur valeur peut considérablement fluctuer. Examinez soigneusement votre situation financière pour déterminer si le trading ou la détention d’actifs numériques vous convient.