Beanstalk Hack

TOTAL LOST $181M
Critical #53 All-Time Flashloan Governance Attack / Flash Loan Attack ethereum

Summarize with AI

Affected Chain ethereum Incident surface
Recovered - No recovery reported
All-Time Rank #53 By amount stolen
Auditors 3 Prior security audits

Incident Overview

A flash loan attack was occurred on Beanstalk Governance resulting in a theft of $77M.

The attacker was initially funded through Synapse bridge at:

https://etherscan.io/tx/0x1fb73ec5…75e101

Since the $BEAN contract’s governance actions have 1 day of delay, the attacker prepared the governance proposal in advance. Proposal #18 takes the whole contract’s value, while Proposal #19 transfers $250k to the Ukraine donation address. BIP18 is the name of this Ukraine proposal (instead of BIP19)

BIP18 proposal transaction:

https://etherscan.io/tx/0x3cb358d4…358967

The attacker’s contract that was used to perform a flash loan:

https://etherscan.io/address/0x1c5dcdd0…a10fb4

The transaction behind the flash loan:

https://etherscan.io/tx/0xcd314668…d33ad7

The flash loan was used to get:

- 350m DAI, 500m USDC and 150m USDT from Aave;

- 32m BEAN from Uniswap;

- 11.6M LUSD from SushiSwap.

These tokens were used to supplement the liquidity in Curve pools with BEAN for governance voting.

At first, the attacker minted 3CRV using DAI, USDC, and USDT. After, he generated the token BEAN3CRV-f using BEANS. This was followed by a deposit of 32 million $BEAN tokens and 25 million $LUSD into yet another contract to create a new token named BEAN3LUSD-f.

BEAN3CRV-f and BEAN3LUSD-f may be transformed straight into Seeds (a special type of asset called which acts like voting power in the system), providing the attacker with sufficient voting power. In reality, the attacker was able to manage more than 70% of the total number of Seeds thanks to the flash loan and $BEAN

The BIP18 triggers the execution of the designed code with the governance privilege to drain the pool fund:

https://etherscan.io/tx/0x68cdec0ac76454c3b0f7af0b8a3895db00adf6daaf3b50a99716858c4fa54c

During the attack transaction, 250,000 USDC was donated to the Ukraine Crypto Donation address.

$181 million was drained from Beanstalk, but the attacker only kept $76M, which were swapped on Ether and deposited into Tornado Cash mixer in a bunch of transactions:

https://bloxy.info/txs/transfers_from/0x1c5dcdd0…a10fb4?currency_id=1

Incident Report

Protocol / Project Beanstalk
Date of Incident
Affected Chain(s) ethereum
Attack Technique Flashloan Governance Attack / Flash Loan Attack
Classification Ecosystem / Stablecoin
Primary Source View Post-Mortem

Protocol Information

Protocol Type Algo-Stables
Affected Token BEAN
Smart Contract Language Solidity
Official Website bean.money/
Protocol Twitter/X @BeanstalkFarms
Team Anonymous
Source Code Unverified

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 flashloan governance attack / 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 ethereum smart contracts and deploy a custom exploit contract
Protocol Analysis Identification of the exploitable vulnerability in Beanstalk's contract logic - root cause: ecosystem / stablecoin
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 Flashloan Governance Attack / Flash Loan Attack vulnerabilities in code review
Audited by Audit Report 1, Audit Report 2, Audit Report 3 — still lost $181M. Prior audits don't guarantee safety, especially after post-audit code changes.

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

  • Verify all logic paths related to Flashloan Governance Attack / 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

Security Audit History

Related Attack Classes

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

See all Flash Loans Attacks examples →

Proof-of-Concept Exploits

1 PoC available
poc-exploits - beanstalk

Sources & References

Learn to Prevent the Next Beanstalk

The Beanstalk 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