{"id":22577,"date":"2022-04-18T20:53:43","date_gmt":"2022-04-18T20:53:43","guid":{"rendered":"https:\/\/davidgerard.co.uk\/blockchain\/?p=22577"},"modified":"2022-04-19T10:57:31","modified_gmt":"2022-04-19T10:57:31","slug":"beanstalk-dao-falls-to-a-corporate-raid-funded-by-flash-loan-junk-bonds","status":"publish","type":"post","link":"https:\/\/davidgerard.co.uk\/blockchain\/2022\/04\/18\/beanstalk-dao-falls-to-a-corporate-raid-funded-by-flash-loan-junk-bonds\/","title":{"rendered":"Beanstalk DAO falls to a corporate raid, funded by flash loan junk bonds"},"content":{"rendered":"<p>Beanstalk DAO is a DeFi lender running on the Ethereum blockchain. It was raided just before 12:30 UTC on Sunday 17 April for 24,830 ETH.<\/p>\n<p>Smart contracts are <a href=\"https:\/\/davidgerard.co.uk\/blockchain\/2020\/04\/26\/the-dforce-and-hegic-defi-exploits-and-why-smart-contracts-are-bad\/\">famously prone to hacks.<\/a> But this wasn\u2019t a hack at all \u2014 this was a corporate raid. Even the project concedes that everything worked according to the rules of the project.<\/p>\n<p>The story of the Beanstalk raid is the end of a long chain of slapdash and incompetent financial engineering, by people who just found out why regulations evolved.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-22578\" src=\"https:\/\/davidgerard.co.uk\/blockchain\/wp-content\/uploads\/2022\/04\/beanstalk.png\" alt=\"\" width=\"340\" height=\"210\" srcset=\"https:\/\/davidgerard.co.uk\/blockchain\/wp-content\/uploads\/2022\/04\/beanstalk.png 680w, https:\/\/davidgerard.co.uk\/blockchain\/wp-content\/uploads\/2022\/04\/beanstalk-300x185.png 300w, https:\/\/davidgerard.co.uk\/blockchain\/wp-content\/uploads\/2022\/04\/beanstalk-348x215.png 348w\" sizes=\"auto, (max-width: 340px) 100vw, 340px\" \/><\/p>\n<h3>How Beanstalk worked<\/h3>\n<p>Beanstalk worked like an unlicensed bank paying interest, or perhaps an unlicensed investment contract. We don\u2019t need rules in DeFi!<\/p>\n<p>Beanstalk had an algorithmic stablecoin called BEAN. When BEAN went over $1, Beanstalk would mint fresh BEAN coins. When BEAN went under $1, the project would create incentives to exchange BEAN for one of Beanstalk\u2019s several other tokens. [<a href=\"https:\/\/bean.money\/docs\/beanstalk.pdf\"><i>white paper<\/i><\/a><i>; <\/i><a href=\"https:\/\/medium.com\/beanstalkfarms\/earn-interest-from-beanstalk-just-the-basics-165a8cc5fecd\"><i>blog post<\/i><\/a><i>; <\/i><a href=\"https:\/\/bowtiedisland.com\/beanstalk-dao-exploited-for-75-million\/\"><i>BowTied Island<\/i><\/a>]<\/p>\n<p>The financial engineering was elaborate \u2014 but ultimately pointless.<\/p>\n<p>Beanstalk was offering interest on locked-in BEAN tokens on the order of 2,000% to 4,000% annual percentage rate. Those numbers are enough to tell you straight away that this is not a sustainable scheme.<\/p>\n<p>Beanstalk offered depositors SILO, the Beanstalk governance token. If you had over 0.1% of all the SILO, you could make governance proposals in the Beanstalk DAO.<\/p>\n<h3>The raid<\/h3>\n<p>In regulated markets, we have laws and regulations on how you can take over a company and drain it. A private equity corporate raider can borrow money to take over a company, by issuing \u201cjunk bonds.\u201d<\/p>\n<p>A lot of people consider private equity raids odious \u2014 but they&#8217;re not <em>illegal.<\/em><\/p>\n<p>Beanstalk built a system to let someone do a private equity corporate raid on them with junk bonds, in ten seconds, by computer.<\/p>\n<p>BlockSec, BowTied Island and Omniscia outline the raid. [<a href=\"https:\/\/twitter.com\/BlockSecTeam\/status\/1515732238612430849\"><i>Twitter<\/i><\/a><i>; <\/i><a href=\"https:\/\/bowtiedisland.com\/beanstalk-dao-exploited-for-75-million\/\"><i>BowTied Island<\/i><\/a><i>; <\/i><a href=\"https:\/\/scribe.rip\/@omniscia.io\/beanstalk-farms-post-mortem-analysis-a0667ee0ca9d\"><i>Ominscia<\/i><\/a>]<\/p>\n<p>The raider issued a proposal to donate $250,000 in ether to Ukraine for the war effort. This was proposed as a smart contract on Ethereum. [<a href=\"https:\/\/etherscan.io\/address\/0x259a2795624b8a17bc7eb312a94504ad0f615d1e#code\"><i>Etherscan<\/i><\/a>]<\/p>\n<p>The code for the proposal included a donation to Ukraine \u2014 but also a routine for the raider to take all the funds.<\/p>\n<p>The raider needed two-thirds of governance votes to pass the proposal. How to get this many votes?<\/p>\n<p>A flash loan lets you borrow cryptos and return them as part of the same transaction. Beanstalk had recently introduced two new crypto-assets that could be created using a flash loan.<\/p>\n<p>The raider took out a flash loan to buy lots of the governance token, put through the vote, and then returned the loaned funds in an instant.<\/p>\n<p>The raider did, in fact, send some ETH to Ukraine. The rest, they put through the Tornado Cash mixer.<\/p>\n<h3>The aftermath<\/h3>\n<p>Beanstalk is probably screwed, and BEAN\u2019s dollar peg has been broken utterly.<\/p>\n<p>The Beanstalk project has gone to exchanges asking them to block the ether from the transaction \u2014 and even to the FBI. The project\u2019s anonymous founder, \u201cPublius,\u201d did not clarify to CoinTelegraph under just what law the FBI would have recourse to help them. [<a href=\"https:\/\/cointelegraph.com\/news\/beanstalk-farms-loses-182m-in-defi-governance-exploit\"><i>CoinTelegraph<\/i><\/a>]<\/p>\n<p>This was an outrageous shenanigan. But it&#8217;s not clear that it was any more illegal than the securities law violations that Beanstalk was already committing. The raider completely obeyed the project\u2019s rules.<\/p>\n<p>Publius said on the project Discord: \u201cIt\u2019s unfortunate that the same governance procedure that put beanstalk in a position to succeed was ultimately its undoing.\u201d<\/p>\n<p>It\u2019s also not absolutely clear that the raider had nothing to do with the project. The project founder is an anonymous person known only as \u201cPublius.\u201d Did the raider just duck in with a rugpull before the founders could?<\/p>\n<p><b>Update:<\/b> &#8220;Publius&#8221; revealed themselves: &#8220;I am Benjamin Weintraub, and I am here with Brendan Sanderson and Michael Montoya. We are Publius. We are the individuals who created Beanstalk.&#8221; They say they had no prior knowledge of the raid. [<i><a href=\"https:\/\/cryptonews.com\/news\/beanstalk-hacker-drains-usd-182m-from-project-but-nets-only-usd-80m.htm\">Crypto News<\/a><\/i>]<\/p>\n<p>This is what happens when crypto guys decide they don&#8217;t need regulations, and they&#8217;ll build corporate governance themselves from paperclips and string.<\/p>\n<p>It turns out that rules, regulations, laws, and not having drastic things happen in ten seconds by computer can be a good idea in practice. Also, LOL.<\/p>\n<hr>\n<p>I was also quoted in the Guardian about the raid. [<i><a href=\"https:\/\/www.theguardian.com\/technology\/2022\/apr\/18\/beanstalk-cryptocurrency-loses-182m-of-reserves-in-flash-attack\">The Guardian<\/a><\/i>]<\/p>\n<p>&nbsp;<\/p>\n<br><br><div align=\"center\"><p><a href=\"https:\/\/www.patreon.com\/bePatron?u=8420236\"><img src=\"https:\/\/davidgerard.co.uk\/blockchain\/wp-content\/uploads\/2021\/10\/become_a_patron_button.svg\" alt=\"Become a Patron!\" title=\"Become a Patron!\" width=217 height=51><\/a><br><p style=\"align:center;\" class=\"patreon-badge\"><i>Your subscriptions keep this site going. <a href=\"https:\/\/www.patreon.com\/bePatron?u=8420236\">Sign up today!<\/a><\/i><\/p><\/div>","protected":false},"excerpt":{"rendered":"<p>The end of a long chain of slapdash and incompetent financial engineering, by people who just found out why regulations evolved. Also, LOL.<\/p>\n","protected":false},"author":1,"featured_media":22578,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[2919,479,1552],"class_list":["post-22577","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorised","tag-beanstalk","tag-dao","tag-defi"],"jetpack_featured_media_url":"https:\/\/davidgerard.co.uk\/blockchain\/wp-content\/uploads\/2022\/04\/beanstalk.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/davidgerard.co.uk\/blockchain\/wp-json\/wp\/v2\/posts\/22577","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/davidgerard.co.uk\/blockchain\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/davidgerard.co.uk\/blockchain\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/davidgerard.co.uk\/blockchain\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/davidgerard.co.uk\/blockchain\/wp-json\/wp\/v2\/comments?post=22577"}],"version-history":[{"count":18,"href":"https:\/\/davidgerard.co.uk\/blockchain\/wp-json\/wp\/v2\/posts\/22577\/revisions"}],"predecessor-version":[{"id":22596,"href":"https:\/\/davidgerard.co.uk\/blockchain\/wp-json\/wp\/v2\/posts\/22577\/revisions\/22596"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/davidgerard.co.uk\/blockchain\/wp-json\/wp\/v2\/media\/22578"}],"wp:attachment":[{"href":"https:\/\/davidgerard.co.uk\/blockchain\/wp-json\/wp\/v2\/media?parent=22577"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/davidgerard.co.uk\/blockchain\/wp-json\/wp\/v2\/categories?post=22577"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/davidgerard.co.uk\/blockchain\/wp-json\/wp\/v2\/tags?post=22577"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}