Article Highlights

  • The Hack: Details of the Balancer V2 exploit that led to a $128 million loss.
  • The Cause: Analysis of the "faulty access-control check" and how the attackers exploited it.
  • The Fallout: Impact on Balancer and its forked protocols, and the emergency measures taken.
  • The Challenges: Questions about the effectiveness of audits, the risks of forked protocols, and the balance between decentralization and centralized interventions.
  • The Future: The need for simpler and more robust protocol designs in DeFi.

Introduction

In the dynamic landscape of Decentralized Finance (DeFi), a jarring disruption occurred on November 3rd when the esteemed Balancer V2 protocol suffered a hack, resulting in a staggering loss of $128.64 million. This incident was not merely a setback for Balancer but served as a wake-up call for the entire DeFi industry, underscoring the inherent vulnerabilities within complex, interconnected protocols.

The Anatomy of the Hack

The debacle began when on-chain security firm PeckShield detected unusual transfers from Balancer V2 vaults. Significant amounts of Wrapped Ether (WETH), Wrapped Staked ETH (wstETH), and osETH were being funneled into a new wallet. The Balancer team quickly confirmed the attack, and subsequent investigations revealed the staggering scope of the losses.

The Root Cause: A Flawed Access Control

According to initial analyses by security firms and on-chain analysts, the hack stemmed from a "faulty access-control check." Attackers exploited the `manageUserBalance` function in Balancer V2, sending malicious code that tricked the protocol's internal ledgers into believing a substantial fee had been collected and that the attackers owned this fee. They then initiated withdrawals, effectively draining the vaults.

The Impact on Forked Protocols

One of the most concerning aspects of this hack is its impact on forked protocols. Balancer V2 had approximately 27 forked protocols that inherited the same vulnerability. This rendered attackers capable of exploiting numerous other, equally vulnerable, protocols. Several chains were affected, including Ethereum (Balancer V2's mainnet), Berachain (the BEX protocol), Arbitrum, Base, and Sonic.

Emergency Measures and Responses

In the wake of the hack, the industry faced a difficult dilemma: adhere to the decentralized "code is law" ethos or intervene to protect user funds. Berachain took drastic action by coordinating validator nodes to temporarily halt the network and revert transactions, thereby saving over $12 million in threatened assets on BEX. This move sparked controversy, with some arguing that it undermined the chain's finality and security. Sonic took a different approach, activating an "on-chain account freeze mechanism" to freeze the attacker's wallet and over $3.4 million in funds. Polygon validators also began proactively "censoring" transactions from the attacker's addresses.

A History of Vulnerabilities and a Crisis of Trust

This was not Balancer's first brush with such attacks. Over the years, the protocol had suffered several vulnerabilities, but this latest hack was by far the most devastating. It led to a significant erosion of trust in Balancer, with its Total Value Locked (TVL) plummeting from $776 million to $345 million. Forked protocols also pulled funds from Balancer V2. Lido also announced that, although unaffected, it would cautiously withdraw its Balancer positions.

Lessons Learned and Hard Questions

The Balancer V2 hack raises three critical questions:
  1. What is the value of audits if 11 audits by different security firms could not detect a fatal vulnerability?
  2. Is composability in DeFi a blessing or a curse when a single vulnerability can cripple numerous forked protocols?
  3. Should "code is law" be the absolute rule when emerging chains are forced to choose between decentralization and rescuing user funds?

The Future of DeFi Security

This incident suggests that DeFi security may need to shift away from numerous audits and toward simpler, more robust protocol designs that fundamentally reduce the attack surface. For the users who lost trust and capital, these lessons are learned at a steep price.

Risk Warning: this article represents only the author’s views and is for reference only. It does not constitute investment advice or financial guidance, nor does it represent the stance of the Markets.com platform.When considering shares, indices, forex (foreign exchange) and commodities for trading and price predictions, remember that trading CFDs involves a significant degree of risk and could result in capital loss.Past performance is not indicative of any future results. This information is provided for informative purposes only and should not be construed to be investment advice. Trading cryptocurrency CFDs and spread bets is restricted for all UK retail clients. 

Latest news