Balancer Hack

TOTAL LOST $1.9M
Medium Flash Loan Attack

Summarize with AI

Affected Chain 2023 Incident surface
Recovered - No recovery reported
All-Time Rank #681 By amount stolen
Protocol Type Dexs Target category

Incident Overview

Balancer V2 liquidity pools were exploited via a flash loan attack resulting in a loss of 1,898,586 USD worth of stablecoins.

Balancer, an AMM-based DEX running on multiple chains including Ethereum, Optimism, and Fantom, was exploited on August 27, 2023. The attacker exploited the Balancer V2 liquidity pools in multiple transactions via a flashloan attack. They took a flash loan from Aave and used the loaned funds to exploit Balancer's smart contracts.

Balancer had made their users aware of the vulnerability on January 6, 2023, and mentioned that they started the mitigation process. On August 22, 2023, they disclosed that they had mitigated over 80% of the funds, while 4% of Balancer's TVL was still at risk. Users were advised to withdraw affected LPs immediately.

The stolen funds in all three affected chains were swapped for DAI and then bridged to the mainnet. The funds were transferred to other EOAs that are currently holding the funds as of August 29, 2023. The total loss was 1,898,586 USD worth of stablecoins such as USDT, USDC, and DAI.

This included 1,000,377 USD from Ethereum, 221,855 USD from the Optimism chain, and 676,354 USD from the Fantom chain.

Attackers:

- https://etherscan.io/address/0xEd187F37…2b7a9B

- https://optimistic.etherscan.io/address/0xbc794f1f…b8fd3c

- https://ftmscan.com/address/0x64e08fa8…c86760

Funds Holders as of Aug 28, 2023:

- https://etherscan.io/address/0xb23711b9…df38c1

- https://etherscan.io/address/0x429313e5…b5762f

- https://etherscan.io/address/0xbc794f1f…b8fd3c

Malicious Transactions:

- https://etherscan.io/tx/0x2a027c8b…606c2d

- https://etherscan.io/tx/0x773fa597…0bfa4a

- https://etherscan.io/tx/0x42441d8e…80daa4

- https://etherscan.io/tx/0x72a655ce…64686e

- https://etherscan.io/tx/0x85d7aec3…b3c2df

Malicious Contracts:

- https://etherscan.io/address/0x2100dCd8…2944f0

- https://etherscan.io/address/0x48567fb8…af103b

- https://etherscan.io/address/0x7bceff0a…b3ccca

- https://etherscan.io/address/0x254c36e9…A1eE14

- https://etherscan.io/address/0x561b6b0d…647a1d

Funds Transfer Transactions:

- https://etherscan.io/tx/0x549e2865…ce616a

- https://etherscan.io/tx/0xa2b6caf2…495c44

- https://etherscan.io/tx/0x3e4bcdc3…58f1c4

Incident Report

Protocol / Project Balancer
Date of Incident
Attack Technique Flash Loan Attack
Classification Exchange (DEX)

Protocol Information

Protocol Type Dexs
Affected Token BAL
Official Website balancer.fi/
Protocol Twitter/X @Balancer
Team Anonymous
Source Code Verified On-Chain

Market Context at Time of Hack

Token Categories
Decentralized Exchange (DEX) Token DeFi DAO Ethereum Ecosystem Yield Farming AMM Three Arrows Capital Portfolio Governance

What the Attacker Needed to Succeed

Understanding the prerequisites for this type of attack helps auditors identify protocols that are most at risk and helps developers build better defenses.

Technical Knowledge Deep understanding of flash loan attack and Solidity and EVM internals
Capital Required Flash loan capital (borrowed atomically, zero upfront cost)
On-Chain Access Ability to interact with smart contracts and deploy a custom exploit contract
Protocol Analysis Identification of the exploitable vulnerability in Balancer's contract logic - root cause: exchange (dex)
Execution Speed Precise transaction ordering and timing to exploit the vulnerability within a single atomic block
Obfuscation Plan A strategy to launder and move stolen funds - typically through mixers, cross-chain bridges, or decentralized DEX swaps to resist tracing

What Auditors Should Check

Could this have been caught in audit? Yes β€” skilled auditors routinely flag Flash Loan Attack vulnerabilities in code review

If you're auditing a protocol with similar architecture to Balancer, these are the critical security checks that could have prevented this incident (August 2023).

  • Verify all logic paths related to Flash Loan Attack are guarded by proper access controls and input validation - see the Flash Loans Attacks attack class for patterns
  • Review privileged functions (owner, admin, governance) for potential abuse vectors - centralization risks should be documented and bounded with timelocks or multi-sigs

Master these auditing techniques with hands-on labs and real exploit scenarios in the Smart Contract Hacking course.

Free Trial

Related Attack Classes

The technique used in this hack maps to these vulnerability classes in our security curriculum:

See all Flash Loans Attacks examples β†’

Sources & References

Learn to Prevent the Next Balancer

The Balancer hack is one of many attacks that skilled auditors are trained to detect before deployment. Master real exploit patterns and defense techniques with hands-on Web3 security training.

Recreate exploit patterns safely Free Trial