← Lab /Security & privacy

Rounding direction bug let attackers drain over $100 M from Balancer pools

A rounding direction error in Balancer v2 caused a $100 M loss across nine blockchain networks.

Security & privacy Trail of Bits 7 Nov 2025 Incident analysis Real-world evidence

Published as “Balancer hack analysis and guidance for the DeFi ecosystem”

Why it matters

Rounding bugs can lead to multi-hundred-million losses, so precise arithmetic invariants are essential for DeFi security.

Summary

The writeup explains that on November 3, 2025 attackers exploited a rounding direction error in Balancer v2, draining more than $100 M from pools on nine networks. Trail of Bits traced the bug to code that had contained the rounding issue for years and confirmed that Balancer v3 was not affected. The authors argue that arithmetic edge cases have become a prominent attack vector and recommend invariant documentation, comprehensive fuzzing, and formal verification to prevent similar exploits.

What they found 2

  1. Attackers exploited a rounding direction error to drain more than $100 M across nine blockchain networks.

    “On November 3, 2025, attackers exploited a vulnerability in Balancer v2 to drain more than $100M across nine blockchain networks.”

  2. The root cause of the hack was a rounding direction issue that had been present in the code for many years.

    “The root cause of the hack was a rounding direction issue that had been present in the code for many years.”

Caveats 4

  • At the time of the audit, we couldn’t definitively determine whether the identified rounding behavior was exploitable in the Linear Pools as they were configured.
  • The Stable Math library was explicitly out of scope in the 2022 security review.
  • The 2021 finding TOB-BALANCER-004 was marked as “undetermined severity”.
  • A precision loss of 1 wei may appear insignificant but can be profitable in low-liquidity pools.

What’s new here 4

  • Identifies a long-standing rounding direction bug as the root cause of a $100 M multi-chain hack.
  • Shows how the threat landscape has shifted toward arithmetic exploits in DeFi.
  • Provides concrete mitigation guidance: invariant documentation, full-coverage testing, mutation testing, and formal verification.
  • Open-sources the roundme tool for human-assisted rounding direction analysis.