Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

How an Attacker Drained $128M from Balancer Through Rounding Error Exploitation

0
Medium
Exploit
Published: Wed Nov 05 2025 (11/05/2025, 12:04:59 UTC)
Source: Check Point Research

Description

By: Dikla Barda, Roaman Zaikin & Oded Vanunu On November 3, 2025, Check Point Research’s blockchain monitoring systems detected a sophisticated exploit targeting Balancer V2’s ComposableStablePool contracts. The attacker exploited arithmetic precision loss in pool invariant calculations to drain $128.64 million across six blockchain networks in under 30 minutes. The attack leveraged a rounding error […] The post How an Attacker Drained $128M from Balancer Through Rounding Error Exploitation appeared first on Check Point Research .

AI-Powered Analysis

AILast updated: 12/04/2025, 06:37:47 UTC

Technical Analysis

The Balancer V2 exploit detected on November 3, 2025, involved a critical vulnerability in the ComposableStablePool contracts related to arithmetic precision loss during pool invariant calculations. Balancer V2 uses a centralized Vault contract that holds tokens for all pools, separating token storage from pool logic. The vulnerability lies in the _upscaleArray function, which scales token balances using integer multiplication and division (mulDown), causing rounding down errors especially when token balances approach small values (8-9 wei). These rounding errors accumulate significantly during batchSwap transactions containing many micro-swaps (65+), artificially lowering the calculated invariant D, which represents the total pool value. Since the Balancer Pool Token (BPT) price is derived from D divided by total supply, this leads to an artificially suppressed BPT price. The attacker exploited this by performing a three-phase swap sequence within atomic batchSwap transactions: first pushing token balances to critical rounding boundaries, then triggering precision loss through small swaps, and finally extracting value by minting or purchasing BPT at the suppressed price and redeeming it at full value. This cycle repeated multiple times, compounding the precision loss and enabling the attacker to drain $128.64 million across six blockchain networks in under 30 minutes. The exploit contract accumulated stolen funds in the Vault's internal balance during constructor execution and later withdrew them to a recipient address. The attack demonstrates how small rounding errors, when compounded through adversarial batch operations, can lead to catastrophic financial loss in DeFi protocols. Despite audits, the vulnerability persisted due to insufficient testing of cumulative effects in atomic transactions. This incident underscores the need for continuous security validation, economic attack modeling, and adversarial testing in blockchain smart contracts.

Potential Impact

The exploit resulted in a direct financial loss of approximately $128.64 million drained from Balancer V2 liquidity pools across six blockchain networks. For European organizations involved in DeFi, blockchain asset management, or liquidity provision on Balancer or similar protocols, the impact includes significant financial losses, erosion of trust in DeFi platforms, and potential regulatory scrutiny. The exploit undermines confidence in the security of smart contract arithmetic and invariant calculations, potentially affecting investor sentiment and adoption of DeFi services in Europe. Additionally, organizations providing blockchain infrastructure or custodial services may face reputational damage and increased operational risks. The attack's rapid execution and automation highlight the challenges of defending against complex, multi-step exploits that leverage subtle mathematical vulnerabilities. This could lead to increased costs for security audits, insurance, and compliance for European blockchain firms. Furthermore, the exploit may encourage threat actors to seek similar rounding or precision loss vulnerabilities in other DeFi protocols, increasing the overall threat landscape.

Mitigation Recommendations

1. Patch the vulnerable _upscaleArray function and related math operations to use higher-precision arithmetic or safe rounding methods that prevent cumulative precision loss, such as fixed-point libraries with rounding up or stochastic rounding. 2. Implement invariant change validation checks that detect abnormal invariant reductions during batchSwap operations and reject suspicious transactions. 3. Introduce limits on batchSwap transaction complexity and number of micro-swaps to reduce attack surface for compounding rounding errors. 4. Enhance smart contract testing frameworks to include adversarial testing simulating cumulative rounding errors and economic attack scenarios, not just individual operation correctness. 5. Monitor internal balance changes and unusual swap patterns in real-time with automated alerting to detect potential exploitation attempts early. 6. Encourage DeFi protocols to adopt continuous security validation and economic modeling to anticipate and mitigate complex multi-step exploits. 7. For users and liquidity providers, diversify exposure across multiple protocols and pools to reduce risk concentration. 8. Engage with blockchain security firms for regular audits focusing on arithmetic precision and invariant integrity. 9. Consider deploying circuit breakers or emergency pause functions in smart contracts to halt operations if suspicious invariant deviations are detected. 10. Educate developers on the risks of integer division rounding in Solidity and promote best practices for financial calculations in smart contracts.

Need more detailed analysis?Get Pro

Technical Details

Article Source
{"url":"https://research.checkpoint.com/2025/how-an-attacker-drained-128m-from-balancer-through-rounding-error-exploitation/","fetched":true,"fetchedAt":"2025-11-05T12:14:04.783Z","wordCount":1415}

Threat ID: 690b3f8ceb4434bb4f895c1c

Added to database: 11/5/2025, 12:14:04 PM

Last enriched: 12/4/2025, 6:37:47 AM

Last updated: 12/20/2025, 5:57:29 PM

Views: 205

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats