Balancer Finally Explains the $128M Hack: A Hidden Rounding Error in Code

Balancer has confirmed that a subtle rounding error buried deep in its V2 smart contract logic was the root cause of a devastating multi-chain exploit on November 3, 2025. The vulnerability, which went undetected for years despite multiple audits, allowed an attacker to siphon roughly $128 million worth of assets across seven blockchain networks.

How a Tiny Error Became a Massive Breach

The issue stemmed from a precision loss in the swap calculation logic of Balancer’s V2 Composable Stable Pools, specifically in the _upscaleArray and mulDown functions. These functions, responsible for token scaling during pool swaps, introduced downward rounding errors when processing extremely small balances, sometimes as low as 8–9 wei, or a billionth of a billionth of an ether.

While each rounding event created only a minuscule discrepancy, the attacker weaponized the flaw through repeated batch swaps. By chaining hundreds of such micro-swaps into single flash-loan transactions, the exploiter amplified those minor deviations into massive distortions in the pool’s internal balance.

This precision error propagated through the pool’s invariant calculation (D), a key variable that maintains equilibrium between tokens. As the invariant value fell artificially, the price of the Balancer Pool Tokens (BPT) plummeted. The hacker then withdrew assets at deflated valuations, effectively draining the affected pools.

The Multi-Chain Fallout

The exploit targeted Balancer’s deployments on Ethereum, Base, Polygon, Arbitrum, Avalanche, Gnosis, and Berachain, with combined estimated losses of $128.64 million. Only V2 Composable Stable Pools were impacted, newer versions, including V3, remain unaffected.

Balancer’s response was swift. The team paused all vulnerable pools, halted the creation of new ones, and launched a safe withdrawal interface to help users recover remaining funds. The protocol is now working with blockchain forensic specialists to track the stolen tokens and coordinate cross-chain recovery efforts.

Gemini Expands in Europe with 100x Leveraged XRP Perpetual Contracts

Audits, Accountability, and Lessons Learned

Perhaps most troubling for DeFi observers is that Balancer’s V2 code had undergone multiple security audits by reputable firms since 2021. None identified this rounding-based economic logic flaw. The incident has reignited debate over whether traditional code audits can effectively anticipate non-linear economic exploits, those that exploit mathematical edge cases rather than coding oversights.

Balancer’s engineering team described the event as “a precision vulnerability that eluded static analysis,” adding that additional economic stress testing frameworks will be implemented before reactivating affected pools.

The breach underscores a recurring truth in decentralized finance: even a rounding difference of a few wei can become a multimillion-dollar exploit when paired with leverage, composability, and code operating at global scale.

The post Balancer Finally Explains the $128M Hack: A Hidden Rounding Error in Code appeared first on ETHNews.

2,983
0
本页面内容由第三方提供。除非另有说明,欧易不是所引用文章的作者,也不对此类材料主张任何版权。该内容仅供参考,并不代表欧易观点,不作为任何形式的认可,也不应被视为投资建议或购买或出售数字资产的招揽。在使用生成式人工智能提供摘要或其他信息的情况下,此类人工智能生成的内容可能不准确或不一致。请阅读链接文章,了解更多详情和信息。欧易不对第三方网站上的内容负责。包含稳定币、NFTs 等在内的数字资产涉及较高程度的风险,其价值可能会产生较大波动。请根据自身财务状况,仔细考虑交易或持有数字资产是否适合您。