You are currently viewing How Balancer V3 turns a critical exploit into a new standard for AMM security

After a November exploit on Composable Stable Pools, the Balancer v3 team used the incident to overhaul defenses and harden protocol-level security.

From the November 3 exploit to a proactive security model

On November 3, an exploit hit Composable Stable Pools on V2, prompting Balancer to act decisively. V3 remained completely unaffected, yet the team saw an opportunity to reinforce its security model and future-proof the protocol against entire classes of attacks.

The CSP exploit exposed an attack vector that had existed for over four years before anyone noticed it. Moreover, similar weaknesses were later exploited on other protocols, showing that the pattern had gone largely unseen across the industry and forcing a broad rethink of defensive assumptions.

Traditional security tends to be reactive: find a bug, patch it, then move on. However, this approach leaves unknown vulnerabilities untouched, including attack vectors that may remain hidden for another four years before they are discovered by adversaries.

Designing V3 to eliminate entire exploit classes

The team concluded that the best response was to remove entire categories of potential exploits by restricting the protocol to legitimate, economically meaningful use cases. If a specific operation has no sound reason to exist, it should not be possible on-chain at all.

The V3 architecture already reflects this philosophy. Its vault-centric architecture centralizes token balances, fee accounting and BPT management into a single, heavily audited system. That said, these choices also strip away many potential attack surfaces that could be abused by hostile actors.

Thanks to this design, the specific rounding vulnerability that enabled the November 3 exploit does not exist in V3. The result is straightforward: zero V3 pools were impacted by the incident, despite the severity of the attack on V2 infrastructure.

Strengthening Balancer V3 through a deep security reassessment

Even with that clean track record, the team went further. In collaboration with Certora, Balancer commissioned an extensive reassessment of many V3 smart contracts, aiming to detect and eliminate any possible attack vector before it could be weaponized by bad actors.

The v3 security audit performed by Certora reported no vulnerabilities across the examined V3 contracts. Moreover, the results highlighted how the simplified architecture, which shifts complexity from individual pools into the vault, produces a protocol that is more secure by design.

For readers interested in technical nuances and formal methods, the full findings are available in Certora’s complete report on the security reassessment. However, the headline outcome is clear: the architectural choices are validated by rigorous external review.

New guardrails for Weighted pools

Beyond the successful audit, Balancer implemented additional security guardrails across both Weighted and Stable pools. These protections further restrict protocol behavior to valid economic scenarios and help neutralize known attack patterns at the pool level.

On V3 Weighted pools, two specific weighted pool guardrails were introduced to remove malicious or pathological use cases. Together, they reinforce the core design goal of limiting operations to realistic and meaningful trade conditions.

Minimum token balance limits

The first measure is a system of minimum token balances that applies consistently across the full spectrum of token decimal configurations. Since reaching extremely low balances typically requires very large swaps, this mechanism indirectly caps maximum effective trade size.

As a result, pool activity is constrained to an economically significant range. Moreover, operations that would otherwise push balances into unrealistic extremes are no longer permitted, shutting down scenarios that could be used to manipulate math or trigger edge-case bugs.

Enhanced balance rounding in the vault

The second guardrail is enhanced balance rounding within the vault and pool math. Under the earlier model, certain liquidity operations in the vault passed a required rounding direction to pools when specific rounding behavior was needed.

In V3, the pools themselves always perform rounding correctly. In particular, the amountIn rounding logic for ExactOut swaps has been fixed compared with V2. Moreover, Balancer now rounds up the tokenIn balance during internal calculations, pushing already correct rounding further toward conservative, safer outcomes.

Stable pool limits and the Maximum Imbalance Ratio

V3 Stable pools also gained an additional protective constraint designed to mirror how these markets should behave in practice. This guardrail focuses on preventing extreme imbalances that have historically characterized exploit attempts.

The new maximum imbalance ratio enforces a hard cap of 10,000:1 between the largest and smallest token balances in a Stable pool. While these pools are intended to remain near a 1:1 balance, this generous ceiling still blocks the extreme skewed states seen in known attacks.

The core idea is to confine Stable pools to an operational zone that remains economically meaningful. There is no valid reason to run a pool with ratios approaching those extremes, so the protocol now forbids such configurations entirely, reinforcing sensible stable pool limits.

Reevaluating flash swaps and impossible scenarios

One key realization shaped these design decisions: flash swaps are fundamentally different from flash loans. While both mechanisms offer temporary access to assets, flash loans remain bounded by a token’s available on-chain liquidity.

Flash swaps, in contrast, are limited primarily by storage, which can theoretically reach 1e128 tokens, far beyond any asset’s actual circulating or total supply. Moreover, this discrepancy opens up room for abuse when protocols fail to recognize how unrealistic such numbers are.

There is no legitimate justification to effectively borrow more tokens than will ever exist. Such a move is either a user error or an outright attack, not a valid use case. Balancer v3 now prevents these impossible scenarios at the pool level through its enhanced guardrails.

Setting a higher bar for AMM security

The November 3 exploit delivered hard but valuable lessons to the broader DeFi ecosystem. Balancer’s response demonstrates a commitment to learning from incidents, even when they do not impact the latest protocol version directly.

By choosing a preventive rather than reactive stance, the project aims to set a new standard for AMM security, embedding robustness into the architecture itself so that threats are blocked before they fully materialize.

Security for Balancer extends beyond smart contract design alone. In partnership with Hypernative, new pools integrate extended pause capabilities supported by 24/7 monitoring, enabling rapid response when on-chain threats arise and moving beyond rigid immutability toward a model of active protection.

Deployment, documentation and the road ahead

New Weighted and Stable pool factories, including Stable Surge pools with expanded guardrails, are now live across all V3-supported networks. Moreover, developers can review technical specifications and examples in the official balancer v3 docs and related repositories.

Balancer’s mission remains to accelerate DeFi innovation by delivering secure, production-ready infrastructure for liquidity applications. Projects choose the protocol as a foundation to design novel pool types and build advanced financial dApps on top of hardened, audited infrastructure.

In summary, the combination of architectural choices, external audits, new guardrails and real-time monitoring reflects a security-first mindset. The evolution of V3 shows how a single exploit can drive the ecosystem toward stronger, more resilient automated market makers.