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,94 N
0
Nội dung trên trang này được cung cấp bởi các bên thứ ba. Trừ khi có quy định khác, OKX không phải là tác giả của bài viết được trích dẫn và không tuyên bố bất kỳ bản quyền nào trong các tài liệu. Nội dung được cung cấp chỉ nhằm mục đích thông tin và không thể hiện quan điểm của OKX. Nội dung này không nhằm chứng thực dưới bất kỳ hình thức nào và không được coi là lời khuyên đầu tư hoặc lời chào mời mua bán tài sản kỹ thuật số. Việc sử dụng AI nhằm cung cấp nội dung tóm tắt hoặc thông tin khác, nội dung do AI tạo ra có thể không chính xác hoặc không nhất quán. Vui lòng đọc bài viết trong liên kết để biết thêm chi tiết và thông tin. OKX không chịu trách nhiệm về nội dung được lưu trữ trên trang web của bên thứ ba. Việc nắm giữ tài sản kỹ thuật số, bao gồm stablecoin và NFT, có độ rủi ro cao và có thể biến động rất lớn. Bạn phải cân nhắc kỹ lưỡng xem việc giao dịch hoặc nắm giữ tài sản kỹ thuật số có phù hợp hay không dựa trên tình hình tài chính của bạn.