
Briefing
A catastrophic exploit has drained approximately $128.64 million from Balancer V2’s ComposableStablePools across six distinct blockchain networks. The incident represents a sophisticated attack that leveraged a subtle flaw in the protocol’s core mathematical logic, not an external compromise. This systemic failure in invariant accounting allowed the attacker to artificially suppress the Balancer Pool Token (BPT) price and execute arbitrage operations that systematically extracted liquidity. The total financial impact of the breach is quantified at $128.64 million, underscoring the extreme risk posed by micro-level arithmetic precision errors in high-value DeFi primitives.

Context
The prevailing attack surface for complex Automated Market Makers (AMMs) has shifted from simple reentrancy to highly calibrated economic and logic-based exploits. Despite Balancer V2’s battle-tested status and eleven prior security audits, the vulnerability was a subtle mathematical edge case inherent in Solidity’s integer division and downward rounding. This class of flaw, which only becomes exploitable when token balances are driven to specific, microscopic wei-level boundaries, was previously underestimated in its potential for catastrophic, compounded value extraction.

Analysis
The attack vector targeted the _upscaleArray function within the ComposableStablePools, which utilizes downward rounding ( mulDown ) during invariant calculation. The attacker first conditioned the pools by executing micro-swaps to push token balances to the precise 8-9 wei rounding boundary. This setup systematically triggered a precision loss in the invariant (D value) calculation, causing it to contract artificially. The attacker then leveraged an atomic, 65-step batchSwap sequence to exploit this suppressed BPT price, minting undervalued BPT and immediately redeeming them for full-value underlying assets, thereby draining the liquidity pools across all affected chains.

Parameters
- Total Funds Lost → $128.64 Million – The estimated dollar value drained from ComposableStablePools across all networks.
- Affected Protocol Version → Balancer V2 ComposableStablePools – The specific contract type containing the arithmetic precision flaw.
- Attack Duration → Under 30 Minutes – The time required for the attacker to execute the multi-chain exploitation sequence.
- Vulnerability Type → Arithmetic Precision Loss – The core technical flaw rooted in Solidity’s integer division and downward rounding logic.

Outlook
Immediate mitigation requires all protocols forked from or integrating Balancer V2’s Composable Stable Pool code to conduct an emergency review and implement patching or pool pausing. This incident establishes a new security best practice, mandating that audits move beyond traditional bug hunting to incorporate adversarial simulation focused on compounded precision and boundary-condition manipulation. The contagion risk is high for any AMM utilizing similar downward-rounding logic in its invariant calculations, necessitating a systemic review of all stable pool mathematics across the DeFi ecosystem.
