Algo Stablecoin Protocol Beanstalk Cut Down by Governance Hijack

A giant ‘flash-loan’ of over $1 billion in stablecoins befell the Beanstalk DeFi experiment

article-image

Source: Shutterstock and Beanstalk

share

key takeaways

  • An attacker drained 24,830 ether and 36 million BEAN tokens worth about $180 million
  • The attacker exploited a loophole in the protocol’s governance process to push through a malicious “improvement proposal”

Beanstalk Farms, billed as “a decentralized credit based stablecoin protocol,” was exploited on Sunday for paper losses of about $180 million — the year’s latest DeFi hack.

That pegs it as the fifth-largest protocol exploit on the tracking site Rekt Leaderboard and the second largest this year after the massive Ronin Bridge hack in March. Security firm PeckShield first reported the news.

Like the Ronin exploit, most of the stolen funds consist of ether, which the attacker quickly began funneling into privacy protocol Tornado Cash in an effort to obscure the tokens’ origin.

The group confirmed the exploit on Twitter Sunday and is now considering a path forward.

Beanstalk had recently celebrated a milestone, reaching $100 million in BEAN tokens minted. One BEAN was meant to be equal to one US dollar, but unlike stablecoins backed by fiat or crypto collateral, Beanstalk used a novel system of financial incentives to maintain its peg using credit rather than overcollateralization, according to its whitepaper.

The protocol had undergone one audit from blockchain security expert Omniscia, but the firm indicated in a post-mortem analysis that the production code which suffered the exploit differed from what the firm had audited.

The developers disputed that account during a live town hall meeting Sunday.

“We’re not in the business of pointing fingers [but] we did take a look at the report they published and didn’t feel that it was a genuine account of what occurred,” the lead developer said.

Omniscia pointed to a “flash-loan susceptible governance flaw” as the culprit, allowing the attacker to propose and then force through a malicious governance proposal that effectively withdrew all the protocol’s assets to the attacker’s wallet.

The trick was to use a massive flash-loan — borrowing vast sums that must be repaid within the same transaction — and circumvent the usual life cycle of a governance proposal. In a bit of DeFi magic using $1.04 billion in borrowed stablecoins, the attacker briefly acquired a supermajority of the protocol’s voting power, which was directed to immediately execute malicious code.

“The Beanstalk Protocol supported protocol upgrades via its Beanstalk-Improvement-Proposal (BIP) governance mechanism and as such, it was possible for an upgrade to perform arbitrary code execution thus allowing the attacker to retrieve their locked funds as part of their malicious update,” Omniscia wrote.

A 24-hour waiting period was in effect, but the offending BIP was disguised as a bid to donate funds to support Ukraine and passed the delay period before a supermajority vote would be effective.

“We thought it was very strange, but we obviously were not aware of what was going on, what attack was in progress,” the developers explained during the town hall.

“We’re going to do everything we can to find out who did this and bring them to justice.”

Following the exploit, the protocol‘s BEAN tokens immediately dropped in value by 90% and effectively all its other assets, including those deployed by the attacker, were liquidated, resulting in a net profit of about $75 million in ether and other tokens.

According to Beanstalk’s developers, “the existing [BEAN] should not be bought or traded as >33% of Beans are still in the exploiter’s custody. Given that the Bean token is not upgradable and has no blacklist capabilities, there is no way to remove these Beans from the exploiter’s custody. Thus, a new Bean ERC-20 token will need to be issued during a restart.”

According to PeckShield, the hacker sent $250,000 of USDC to an address in support of Ukraine.

Loading Tweet..

Seeds of hope

Despite the catastrophe, the protocol’s developers have pledged to continue work on the project.

Loading Tweet..

During the town hall and on the group’s Discord, the pseudonymous team took the extraordinary step of revealing their identities and explained their intention to cooperate with law enforcement in the hope of identifying the attacker and recovering funds.

This is not the first time flash-loans have been deployed in a DeFi exploit. Last year, Cream Finance was robbed of $130 million. That led its governance token CREAM to plummet by 70% — from which it has never recovered.

Unlike other high-value hacks, such as the Solana Wormhole bridge exploit, Beanstalk has no venture capital backing that could potentially provide a bailout to recapitalize the system.

The Beanstalk team did not immediately return a request for comment Monday.

In a follow-up blog post on Tuesday, the Beanstalk Farms team identified four “primary goals” for the project: “securing the enduring success of Beanstalk’s economic model; attracting sufficient capital to restart Beanstalk; preserving as much of each Farmers’ Stalk, Seed and Pod positions as possible, and; aligning new capital with previous Stalk and Pod holders.”

This story was updated on April 19 and 5:00 am ET.


Start your day with top crypto insights from David Canellis and Katherine Ross. Subscribe to the Empire newsletter.

Explore the growing intersection between crypto, macroeconomics, policy and finance with Ben Strack, Casey Wagner and Felix Jauvin. Subscribe to the On the Margin newsletter.

The Lightspeed newsletter is all things Solana, in your inbox, every day. Subscribe to daily Solana news from Jack Kubinec and Jeff Albus.

Tags

Upcoming Events

Salt Lake City, UT

MON - TUES, OCT. 7 - 8, 2024

Blockworks and Bankless in collaboration with buidlbox are excited to announce the second installment of the Permissionless Hackathon – taking place October 7-8 in Salt Lake City, Utah. We’ve partnered with buidlbox to bring together the brightest minds in crypto for […]

Salt Lake City, UT

WED - FRI, OCTOBER 9 - 11, 2024

Permissionless is a conference for founders, application developers, and users. Come meet the next generation of people building and using crypto.

recent research

Research Report Templates (1).png

Research

Solana Mobile is a highly ambitious foray into the mobile consumer hardware market, seeking to open up a crypto-native distribution channel for mobile-first applications. The market for Solana Mobile devices has demonstrated a phenomenon whereby external market actors (e.g. Solana-native projects) continuously underwrite subsidies to Mobile consumers. The value of these subsidies, coming in the form of airdrops, trial programs, and exclusive NFT mints, have consistently covered the cost of the phone and generated positive returns for consumers. Given this trend in subsidies, the unit economics in the market for Mobile devices, and the initial growth rate and trajectory of sales, it should be expected that Solana mobile can clear 1M to 10M units over the coming years. As more devices circulate amongst users, Solana Mobile presents a promising venue for the emergence of killer-applications uniquely enabled by this mobile-first, crypto-native distribution channel.

article-image

Plus, a look at the top asset-gathering ETH ETFs after two days of trading

article-image

Plus, celebrity memecoins are plummeting from their early price runs

article-image

The FCA claims that CBPL provided e-money services to roughly 13,000 “high-risk” customers

article-image

Plus, breaking down Donald Trump’s shifting crypto stance

article-image

Markets are holding relatively steady despite the supply shock

article-image

Analysts are looking ahead to August, a historically volatile month made more interesting this year by the US presidential election