InvertopediaThe encyclopedia of how things fail

Beanstalk

From Invertopedia, the encyclopedia of how things fail

Entry 019. An analysis built from the public record, not an insider account. Spot an error? Tell us.

Beanstalk was an Ethereum stablecoin protocol run by on-chain votes of its depositors[1][4]. On April 17, 2022, an attacker borrowed about $1 billion in flash loans, used it to buy more than two-thirds of the voting power, and passed a proposal that sent the protocol's funds to the attacker, all in a single transaction[2][3]. About $182 million in collateral was drained, and the attacker kept roughly $76–80 million after repaying the loans[1][2][3].

Contents
  1. 1The bet
  2. 2What happened
  3. 3The kill shot
  4. 4Red flags ignored
  5. 5The cost
  6. 6The inversion
  7. 7What survived
  8. 8References

The bet

Beanstalk let its depositors govern it directly, with votes weighted by what they had deposited[3][4]. To move fast in a crisis, it had an emergencyCommit function: once a proposal had been up for 24 hours, a two-thirds supermajority could execute it at once, skipping the normal voting period[1][3]. The bet was that nobody could gather two-thirds of the votes without being a real, long-term stakeholder.

What happened

Apr 16, 2022The attacker deposits BEAN and submits two proposals, BIP-18 and BIP-19. One drains the funds; the other sends $250,000 to a Ukraine donation address.[1][2]
Apr 17, 2022, 12:24 p.m. UTCIn one transaction the attacker flash-borrows 350 million DAI, 500 million USDC, 150 million USDT, 32 million BEAN and 11.6 million LUSD.[2][3]
Apr 17, 2022The borrowed money buys more than 78% of the votes, over the two-thirds threshold. emergencyCommit runs BIP-18 at once, and the protocol's funds move to the attacker. The loans are repaid in the same transaction.[1][3]
Apr 17, 2022, 12:41 p.m. UTCThe security firm PeckShield raises the alarm, too late.[2]
Apr 17, 2022Nearly 25,000 ETH goes to the attacker, who sends 250,000 USDC to the Ukraine Crypto Donation wallet and moves ETH to Tornado Cash.[1][3]
Apr 17, 2022, 11:49 p.m. UTCBeanstalk's pseudonymous lead, Publius, says the project is likely lost, having no venture backing. BEAN falls about 83% to $0.17.[2]
May 2022With on-chain governance removed, a community multisig, expected to have at least nine holders, is to own the protocol, and proposals move to Snapshot votes.[6]
Jun 6, 2022The "Barn Raise" starts, selling a debt token called Fertilizer to refill the stolen funds.[4]
Aug 2022Beanstalk is unpaused on the anniversary of its first deployment.[5]

The kill shot

Votes could be borrowed, and a decision could be executed in the same transaction that the votes were borrowed in.

Nothing was hacked in the usual sense. Cointelegraph noted that the contracts and governance worked as designed[2]. Publius put it plainly: "It's unfortunate that the same governance procedure that put beanstalk in a position to succeed was ultimately its undoing."[2]

The 24-hour wait before emergencyCommit was the only brake, and it applied to the proposal, not to the voters[3]. The attacker filed the proposal a day early, then showed up with votes that existed for a few seconds, used them, and gave them back[1][3].

Red flags ignored

  • Voting power you could rent. Deposits counted as votes the moment they arrived, so flash-loaned money voted like real money.[1][3]
  • An emergency switch anyone could flip. A two-thirds vote could skip the normal process and execute instantly.[1]
  • A proposal that looked harmless. The attacker paired the drain with a $250,000 donation to Ukraine.[1][2]
  • No backstop. Publius said the team had no venture backing to cover the loss.[2]

The cost

About $182 million in collateral left the protocol[2][3]. Beanstalk's own figure for what was stolen is about $77 million in non-Bean assets[3][4], and estimates of the attacker's profit run from $76 million to $80 million[1][2][3]. Beanstalk's figure leaves out BEAN, which fell about 83% after the attacker dumped it[2][4].

Depositors did not get their money back at once. The recovery plan paid them back slowly, as Fertilizer was sold and its debt repaid[6]. By January 2023 the Barn Raise had brought in over $17 million, about 22% of the way to full recapitalization[4].

The inversion

Any decision that can be bought in one transaction will be. Make voting power take time to earn, and make a vote wait before it can act.

What survived

The protocol. Holders approved a no-haircut recovery plan, and control passed from on-chain governance to a community multisig[4][6]. Beanstalk was unpaused in August 2022[5], and under BIP-50 it later moved from Ethereum mainnet to Arbitrum One[7]. Publius named the three developers, Benjamin Weintraub, Brendan Sanderson and Michael Montoya, and the team said it had contacted the FBI[2].

References

  1. ^ “Hack Track: Analysis of Beanstalk Flash Loan Attack”. Merkle Science, April 19, 2022. $1 billion from Aave, two-thirds emergency threshold, emergencyCommit skipping the proposal lifecycle, ~$80 million profit, Tornado Cash, the Ukraine donation.
  2. ^ “Beanstalk Farms loses $182M in DeFi governance exploit”. Cointelegraph, April 18, 2022. $182 million in collateral, ~$80 million to the exploiter, $1 billion of Aave flash loans, BIP-18 and BIP-19 on the Saturday, PeckShield alert, BEAN down 83%, Publius quotes, named developers, FBI contact.
  3. ^ “Revisiting Beanstalk Farms Exploit”. CertiK, July 28, 2022. Date and time, flash-loan amounts, the BIP-18 proposal filed a day early, the 24-hour wait, the 78% vote over two-thirds, emergencyCommit, ~$182 million lost, $76 million profit, ~24,849 ETH sent to Tornado Cash, Tornado Cash, the 250,000 USDC donation, Beanstalk's ~$77 million figure.
  4. ^ “Beanstalk Farms 2022 Roundup”. Beanstalk Farms, January 1, 2023. Beanstalk's account: the $77 million theft, removal of on-chain governance, the Barn Raise from June 6, BIP-21 and over $17 million raised (22.26% of recapitalization).
  5. ^ “Beanstalk Farms team restarts DeFi protocol four months after the hack”. ForkLog, August 8, 2022. Unpaused in August 2022, on the anniversary of its first deployment.
  6. ^ “The Path Forward FAQ”. Beanstalk Farms, May 25, 2022. On-chain governance removed, the community multisig of at least nine holders, Snapshot votes, depositors repaid as Fertilizer is sold.
  7. ^ “Migrate to Arbitrum”. Beanstalk Farmers' Almanac (docs.bean.money), accessed October 2026. BIP-50 moved Beanstalk from Ethereum mainnet to Arbitrum One.