How Flash Loans Amplified a Rounding Error into a $100+ Million Loss
On November 3, 2025, Balancer, a decentralized-finance (DeFi) exchange, disclosed that a hacker had exploited a small rounding issue in Balancer’s older architecture to drain more than $100 million from the exchange.[1] The Balancer exploit was the third largest DeFi hack of 2025, behind the $1.4 billion ByBit and $223 Cetus exploits, and it underscores how subtle technical vulnerabilities continue to expose DeFi protocols to substantial losses.[2]
Indeed, while the rounding issue itself was overlooked by many, the hacker used a DeFi innovation known as flash loans—a particular form of uncollateralized short-term funding—to magnify the rounding issue in Balancer’s legacy code into a nine-figure exploit. In connection with this exploit, Rosen Law Firm, a global investor rights firm, has announced an investigation into potential securities claims on behalf of Balancer investors; the investigation will focus on allegations that the company may have provided materially misleading information to the public.[3]
In this article, we examine how the incident occurred and explain how undetected risks can lurk even in seemingly innocuous technical features of decentralized protocols. While exploits often exhibit novel features, protocols may face legal risk via class action lawsuits and heightened regulatory scrutiny, despite disclosing risks and employing extensive efforts to prevent exploits.
What is Balancer?
Balancer is a decentralized exchange that allows users to trade cryptocurrencies directly on a blockchain via smart contracts.[4] It operates within the broader DeFi ecosystem, which offers financial services on public blockchains without relying on traditional intermediaries such as banks.
To facilitate trading of two cryptocurrencies—say cryptocurrencies A and B—Balancer maintains a reserve (or pool) of both cryptocurrencies. Users can trade directly with this pool via a smart contract (i.e., a program that automatically executes transactions on a blockchain), which automatically adjusts the exchange rate between the two cryptocurrencies. The price of each cryptocurrency is determined by a mathematical formula based on its relative quantity in the pool. As users buy cryptocurrency A using cryptocurrency B, the pool’s supply of cryptocurrency A becomes scarcer, causing its price to increase relative to cryptocurrency B. This type of self-adjusting, algorithmic pricing system automates the entire trading process, thereby functioning as an automated market maker (AMM).[5] Balancer, like many DeFi protocols, relies on this AMM mechanism to allow prices to adjust dynamically and to facilitate continuous, on-chain liquidity for users.
How the exploit unfolded
As reported by Balancer, the first signal of an exploit appeared on November 3 at 07:46 UTC, when the Balancer exploiter transferred a large volume of cryptocurrencies to a newly created wallet. Balancer posted an initial official statement at 09:50 formally acknowledging the incident and identifying affected pools: “[we’re] aware of a potential exploit impacting Balancer v2 pools.”[6]
The cryptocurrency community’s attention quickly turned to other DeFi protocols that relied on Balancer’s codebase. By 10:08, warnings of vulnerabilities throughout the DeFi ecosystem linked to the exploit were circulating on X: “Balancer got exploited with funds stolen of over $116M now. The cascading is really bad overall, as many projects have integrated/forked Balancer.”[7]
In the hours that followed, downstream impacts became visible. Blockchains Berachain and Sonic paused certain operations and implemented security patches to address vulnerabilities directly linked to the situation on Balancer.[8] Protocols such as BEX and Beets later reported related exploits that resulted in losses of more than $10 million.[9]
Two days later, on November 5 at 16:12 UTC, Balancer published a post-incident report confirming the mechanics of the exploit and the approximately $116 million in losses.[10]
Once the vulnerability became public, pool balances fell as users withdrew funds. Balancer also deployed various measures to prevent further losses and to recover funds for affected users.[11] Although the vulnerability affected only a subset of pools and was resolved within days, user activity declined sharply on Balancer’s platform. The total dollar value of digital assets stored on the platform (total value locked, or TVL) fell by nearly 75% from more than $400 million to about $100 million, as liquidity providers rapidly withdrew capital.
Balancer had launched a newer platform, Balancer v3, almost a year prior to the exploit, which was not affected by the same vulnerability. However, Balancer v2 was designed using immutable smart contracts (i.e., code that cannot be modified once deployed) and therefore continued to operate alongside v3, as some users had not yet migrated to the newer platform.[12]

Figure 1. Balancer’s TVL before and after the November 3, 2025 exploit
The cascade effect: Liquidity withdrawal and market response
The effects of the Balancer exploit rippled throughout the DeFi ecosystem, as many protocols had reused Balancer’s codebase. Several protocols had deployed smart contracts built on the same underlying logic and therefore inherited the same vulnerability, which led to a broader contraction in DeFi TVL as users withdrew liquidity and prompted precautionary pauses and defensive measures at related protocols. The result was a cascading market response driven less by direct exposure to Balancer’s pools than by shared technical dependencies across ostensibly separate platforms. For example, BEX, a copy (or fork) of Balancer that is deployed on the Berachain blockchain, immediately paused various operations following the Balancer exploit to prevent losses. In the process, the Berachain team became aware of a $12 million exploit of BEX but recovered the funds and patched the vulnerabilities.[13]
The cascading impact of the Balancer exploit highlights the challenges crypto protocols face in identifying and preventing exploit-driven losses, concerns that have also been raised by federal agencies. For example, in a 2022 Consumer Financial Protection Bureau report, the agency identified “fraud or scam” as the top issue across crypto-asset complaints and noted that the prevalence of related complaints “raises the question of whether crypto-asset platforms are effectively identifying and stopping fraudulent transactions.”[14]
Balancer’s rounding error
The exploit was driven by a technical rounding error in Balancer’s legacy (i.e., v2) accounting code. Rounding is common in software applications because computer systems and blockchains cannot represent infinite decimal places. When users executed trades involving small fractions of cryptocurrencies, the AMM’s rounding mechanism could produce slightly inaccurate results, as illustrated in the following example.
Suppose Alice wants to buy cryptocurrency A from a DeFi exchange such as Balancer. The price of 1 unit of cryptocurrency A is 1/3 that of cryptocurrency B. Consider a computer system, which rounds all prices to the nearest decimal place. In that system, the price of cryptocurrency A in terms of cryptocurrency B, or 1/3 B, would be rounded from the decimal representation of 1/3, an endless string of threes (or 0.3333…), to 0.3.
Alice can choose to buy 3 A by paying 1 B. However, Alice knows that the system rounds to the nearest decimal place, so she intentionally buys 1 cryptocurrency A instead by paying 0.3 cryptocurrency B. By repeating this operation three times, Alice pays 0.9 cryptocurrency B for assets that she can immediately resell for 1 cryptocurrency B, thereby capturing a 0.1 cryptocurrency B profit.
DeFi protocols typically implement internal safeguards and controls to minimize the impact of such rounding errors. These entities also submit their code to thorough review and audits to prevent such rounding errors from compounding into economically meaningful errors for users. Balancer had undergone multiple reviews by major cryptocurrency auditing firms. However, despite more than ten audits since 2021, this specific vulnerability on Balancer’s older v2 architecture went unnoticed.[15] Other DeFi protocols have experienced flash-loan-based exploits, such as the 2021 incident involving Cream Finance, which put auditors on notice of this specific type of exploit mechanism.[16] As noted in a 2025 joint report by the European Banking Authority and European Securities and Markets Authority, “[F]lash loans have also consistently been a source for hacks and attacks on DeFi protocols. According to evidence, approx. 20% of value theft from DeFi protocols corresponds to flash loan attacks.”[17] Moreover, prior to the exploit, Balancer itself had disclosed flash loan risk and how it mitigates that and other risks.[18]
Cryptocurrency firms have increasingly bolstered efforts to prevent fraud and recover stolen funds when such incidents occur. For example, “white-hat hackers” helped recover $20 million of the funds stolen in the Balancer exploit,[19] and AI technology such as EVMbench is also being deployed to bolster smart contract security.[20]
Unexplored territory remains, and audits that focus on a particular flash loan attack method may provide a false sense of security. Hackers continue to successfully use flash loans in innovative ways, which underscores a broader reality of complex smart contract systems: while audits can reduce risk, they do not guarantee safety, particularly when vulnerabilities arise from subtle interactions within sophisticated smart contracts.
Flash loans: Amplifying Balancer’s rounding error
As discussed above, a flash loan typically facilitates borrowing a large sum of cryptocurrency without collateral, provided the borrowed amount is repaid within the same blockchain transaction.
Flash loans bundle multiple transactions into a single blockchain transaction that executes them as a whole. In this manner, either all transactions within one blockchain transaction are executed together, or none are executed.
When the borrowing and repayment of a flash loan occurs within the same blockchain transaction, the lender can safely provide a loan without collateral, knowing that if the borrower cannot repay the loan within the same blockchain transaction, the entire blockchain transaction will fail.
DeFi market participants commonly use flash loans for the same types of activities as loans in traditional financial markets, including exploiting arbitrage opportunities and liquidating overleveraged positions. However, with few constraints on what a user can do with funds borrowed via a flash loan, users can devise creative strategies to capitalize on access to large amounts of uncollateralized funds. In Balancer’s case, the exploiter used flash loans to exploit the AMM’s rounding error, compounding small pricing discrepancies into a significant exploit.
Balancer’s design also allowed users to execute multiple cryptocurrency trades on an internal account before settling the resulting transaction to the blockchain. This feature is designed to reduce transaction costs and improve protocol efficiency, but it also creates a vulnerability.
Using this feature, the Balancer hacker did not withdraw the exploited profits immediately; instead, they accumulated profits on Balancer’s internal ledger before settling the result to the blockchain.[21] By separating the trades that amplified the rounding error from the actual withdrawal of accumulated profits from the pools at the end of the exploit, the small rounding errors were not immediately reflected in Balancer’s pools and did not trigger any safeguards.
Conclusion
The Balancer incident illustrates how minor technical vulnerabilities can expose users to outsized financial consequences.
Recent regulatory developments related to cryptocurrency have focused on establishing an appropriate legal framework and market structure for the industry, including through legislation such as the Genius Act and proposed Clarity Act. The Balancer exploit highlights that significant and novel risks remain, while the regregulatory and legal environment continues to evolve.
_________
The opinions expressed are those of the authors and do not necessarily reflect the views of Bates White, LLC or of other Bates White employees or affiliates
[1] Balancer (@Balancer), X, November 3, 2025, https://x.com/Balancer/status/1985283356582453588.
[2] Rob Behnke, “Year in Review: The Biggest DeFi Hacks of 2025,” Halborn, January 7, 2026, https://www.halborn.com/blog/post/year-in-review-the-biggest-defi-hacks-of-2025.
[3] “Balancer,” The Rosen Law Firm, https://rosenlegal.com/case/balancer/.
[4] Daniel Phillips, “What Is Balancer?” CoinMarketCap, https://coinmarketcap.com/academy/article/what-is-balancer.
[5] Uniswap, “What Is an Automated Market Maker?” May 1, 2025, https://blog.uniswap.org/what-is-an-automated-market-maker.
[6] Balancer (@Balancer), https://x.com/Balancer/status/1985283356582453588.
[7] ddimitrov22 (@ddimitrovv22), https://x.com/ddimitrovv22/status/1985288084905201742.
[8] “Balancer and the $120 Million Hack in November 2025,” DappRadar, November 6, 2025, https://dappradar.com/blog/balancer-exploit-november-2025.
[9] “Balancer Incident Analysis,” CertiK, November 25, 2025, https://www.certik.com/resources/blog/balancer-incident-analysis.
[10] Balancer (@Balancer), https://x.com/Balancer/status/1986104426667401241.
[11] Id.
[12] “Breaking Down the Balancer Hack,” Certora, November 6, 2025, https://www.certora.com/blog/breaking-down-the-balancer-hack.
[13] Berachain Foundation (@berachain), “BEX Incident Post-Mortem,” https://x.com/berachain/status/1986952318068146323.
[14] Complaint Bulletin, Consumer Financial Protection Bureau, November 2022, https://files.consumerfinance.gov/f/documents/cfpb_complaint-bulletin_crypto-assets_2022-11.pdf.
[15] Oluwapelumi Adejumo, “How 11 Audits Couldn’t Stop Balancer’s $128 Million Hack Redefining DeFi Risks,” CryptoSlate, November 3, 2025, https://cryptoslate.com/how-11-audits-couldnt-stop-balancers-128-million-hack-redefining-defi-risks/; Balancer Docs, Balancer, https://docs-v2.balancer.fi/reference/contracts/security.html.
[16] Sam Reynolds, “Flash Loan Exploit Whips Cream Finance For $130 Million,” Blockworks, October 28, 2021, https://blockworks.co/news/flash-loan-exploit-whips-cream-finance-for-130-million.
[17] “Joint Report: Recent developments in crypto-assets (Article 142 of MiCAR)”, January 13, 2025, Joint Report on recent developments in crypto-assets (Art 142 MiCAR).pdf, 69.
[18] “Risks of Using Balancer,” May 2025, https://balancer.fi/risks.
[19] “Incredible Recovery: White Hats Rescue $20M from Devastating Balancer Hack,” CryptoRank, November 12, 2025, https://cryptorank.io/news/feed/afe80-white-hats-recover-balancer-hack.
[20] “Introducing EVMbench,” OpenAI, February 18, 2026, https://openai.com/index/introducing-evmbench/.
[21] “Nov 3 Exploit Post-Mortem,” Balancer Protocol, Medium, November 18, 2025, Nov 3 Exploit Post-Mortem. Introduction | by Joao | Balancer Protocol | Medium. See also “Breaking Down the Balancer Hack,” Certora, November 6, 2025, https://www.certora.com/blog/breaking-down-the-balancer-hack.
- Principal, Lead Data Scientist
- Principal