Share on XShare on LinkedInShare on Telegram
Hack Analysis

The Balancer Hack 2025 (Explained)

A complete technical breakdown of the Balancer Hack 2025, how the attack worked, what was exploited and security takeaways for DeFi teams.

Author
QuillAudits Team
January 23, 2026
The Balancer Hack 2025 (Explained)
Share on XShare on LinkedInShare on Telegram

On November 3, 2025, the Balancer V2 protocol fell victim to a devastating exploit in its Composable Stable Pools, draining approximately $125 million in user assets across Ethereum and multiple L2 chains. The attacker weaponized a subtle rounding inconsistency in the protocol's scaling math, artificially deflating pool invariants and enabling discounted BPT redemptions. This wasn't a brute force drain, it was a precision-engineered heist that exploited DeFi's mathematical underbelly, triggering copycat attacks on forks like Beets and Beethoven X before mitigations could catch up.
 

Hack Analysis

The attacker pulled off a two-stage, first, manipulate without cashing out, second, withdraw clean. All via batchSwap for atomicity, dodging single-swap guards. This execution targeted low-liquidity edges in pools like wstETH/rETH/cbETH, using micro-swaps to erode the invariant without triggering alarms.

In the preparation phase the attacker gathered pool state, token scaling factors, amplification (amp), fees, BPT rate, and current balances and computed a small trick amount tailored to the token decimals. They deployed a contract and repeatedly simulated swaps via a helper function 0x524c9e20 , passing arrays of balances, scaling factors, token indices, desired amountOut, amp and fee. The attacker used large iteration counts (initial value ≈ 100,000,000,000 and 25 loops to refine the swap sequence and find an amount that lands a target token on a wei-level rounding cliff.

Screenshot 2025-11-07 at 1.38.49 PM.pngScreenshot 2025-11-07 at 1.39.07 PM.png

In the atomic batchSwap phase, the attacker executed the calibrated sequence on-chain. First they swapped BPT for underlyings to position one token (e.g., cbETH) at a rounding edge (e.g., balance = 9 wei). Next, they performed a crafted EXACT_OUT hop (e.g., swap amount = 8) that, due to the upscale/downscale rounding asymmetry, produced a smaller computed input/output than expected and silently reduced the pool invariant D

Finally, they swapped the underlyings back into BPT at this deflated virtual price, pocketing excess BPT value. Repeating these swaps inside a single atomic transaction allowed the invariant to erode over many iterations without triggering typical sanity checks.

Screenshot 2025-11-07 at 3.04.01 PM.png

The attacker repeated the technique across multiple pools and chains (Arbitrum, Polygon, Base, Sonic, Opimism and forks), compounding the drain where pauses or protections were absent.

Screenshot 2025-11-07 at 1.51.20 PM.pngScreenshot 2025-11-07 at 1.52.03 PM.pngScreenshot 2025-11-07 at 1.52.38 PM.pngScreenshot 2025-11-07 at 1.53.12 PM.pngScreenshot 2025-11-07 at 1.53.46 PM.png

After accumulating underpriced BPT into the internalBalance the attacker later redeemed through managerUserBalancer to EOA 0xaa760d53541d8390074c61defeaba314675b8e3f

Screenshot 2025-11-07 at 1.30.03 PM.pngScreenshot 2025-11-07 at 1.31.01 PM.png

Root Cause

A rounding direction mismatch in Composable Stable Pools scaling logic allowed systematic precision loss to be weaponized against the pool invariant D. Upscaling used mulDown while downscaling used divUp/divDown, so an EXACT_OUT (_swapGivenOut) path could understate the required amountIn. Repeating carefully tuned micro swaps inside a single batchSwap() compounded tiny wei level truncations, quietly reducing D and thus BPT price ≈ D / totalSupply without triggering reverts or sanity checks. The attacker used simulations and an auxiliary StableMath replica to place swaps on rounding cliffs and maximize the leak, then monetized the depressed BPT in separate withdrawals. The vulnerability is therefore a deterministic precision-loss exploit caused by asymmetric rounding during scaling, amplified by batch atomicity and the protocol’s limited global pause capabilities.

Screenshot 2025-11-07 at 1.05.28 PM.png

Secure Your Protocol Against Precision-Based Exploits

A single rounding cliff drained Balancer across chains. Don’t wait for hidden math edges to get exploited. Get a precision-level security audit before mainnet!

Funds Flow After Attack

Following the withdrawal transaction, funds were forwarded to attacker EOA 0xAa760D53541d8390074c61DEFeaba314675b8e3f A portion remains on that address in ETH, WETH, and synthetic ETH.

Screenshot 2025-11-07 at 12.55.57 PM.png

From Keyber Swap, the attacker converted synthetic ETH into native ETH and funded EOA

0xf19FD5c683a958ce9210948858B80d433F6BfaE2 .
 

Screenshot 2025-11-07 at 12.55.39 PM.png

Meanwhile most of the funds are still siting in the attacker EOAs on different chains

Screenshot 2025-11-07 at 2.01.23 PM.pngScreenshot 2025-11-07 at 2.02.44 PM.png

Post Attack Mitigation

Balancer offers a one-time 20% white-hat bounty for immediate return to the recovery address, warns of active forensics and law-enforcement cooperation, and sets a 48-hour expiry.

Screenshot 2025-11-07 at 12.44.36 PM.png

Several rapid mitigation measures, ranging from automatic CSPv6 pauses, factory shutdowns, and gauge deactivations to coordinated partner freezes and major whitehat recoveries, significantly limited further losses and enabled large-scale asset retrieval across affected networks.

Screenshot 2025-11-07 at 12.48.59 PM.png

Users are advised to withdraw only from Recovery Mode pools, avoid impacted CSPv5 pools, and rely solely on Balancer’s official channels for confirmed guidance.

Relevant Address and Transactions

Conclusion

The Balancer V2 exploit shows how a tiny rounding flaw can cascade into a $125M loss, proving that DeFi math breaks at its weakest decimal. Security now means defending against economic engineering, not just coding bugs. Protocols must enforce biased rounding, strengthen invariant checks, and include emergency pause mechanisms to stop precision-related failures before they spread. Batch swaps and composability amplify rounding risks, and forks inherit every upstream weakness. In short, harden your math, test adversarial edges, and secure your DeFi or your TVL can disappear overnight.

Contents

Tell Us About Your Project
Subscribe to Newsletter
hashing bits image
Loading...
Loading...
newsletter-poster

WE SECURE EVERYTHING YOU BUILD.

From day-zero risk mapping to exchange-ready audits — QuillAudits helps projects grow with confidence. Smart contracts, dApps, infrastructure, compliance — secured end-to-end.

DeFi SecurityplumeUniswap FoundationAethiropt-collectivePolygon SPNBNB Chain Kickstart

Office 104/105 Level 1, Emaar Square, Building 4 Sheikh Mohammed Bin Rashid Boulevard Downtown Dubai, United Arab Emirates P.O box: 416654

[email protected]

All Rights Reserved. © 2026. QuillAudits - LLC

Privacy Policy