{"id":2049,"date":"2017-11-08T23:27:42","date_gmt":"2017-11-08T23:27:42","guid":{"rendered":"https:\/\/davidgerard.co.uk\/blockchain\/?p=2049"},"modified":"2018-04-26T21:09:04","modified_gmt":"2018-04-26T21:09:04","slug":"the-ethereum-parity-wallet-disaster-play-by-play","status":"publish","type":"post","link":"https:\/\/davidgerard.co.uk\/blockchain\/2017\/11\/08\/the-ethereum-parity-wallet-disaster-play-by-play\/","title":{"rendered":"The latest Ethereum Parity wallet disaster, play by play"},"content":{"rendered":"<blockquote><p>&#8220;I accidentally e-mailed my bank &#8216;delete&#8217; and they lost everybody&#8217;s accounts. I&#8217;m sorry i&#8217;m just learning banking.&#8221; (Powershift)<\/p><\/blockquote>\n<p>I spent yesterday afternoon on Twitter and <a href=\"https:\/\/www.reddit.com\/r\/Buttcoin\/\">\/r\/buttcoin<\/a>, giggling. It was a<span class=\" UFICommentActorAndBody\"><span data-ft=\"{&quot;tn&quot;:&quot;K&quot;}\"><span class=\"UFICommentBody _1n4g\"> popcorn overload moment for every acerbic cryptocurrency sceptic who ever thought that immutable, unfixable smart contracts were an obviously stupid idea that would continue to end in tears and <a href=\"https:\/\/davidgerard.co.uk\/blockchain\/the-dao\/\">massive losses<\/a>, as they <a href=\"https:\/\/davidgerard.co.uk\/blockchain\/ethereum-smart-contracts-in-practice\/\">so often had<\/a> previously.<br \/>\n<\/span><\/span><\/span><\/p>\n<p>Someone decided to access a &#8220;kill&#8221; function on various smart contracts on the public Ethereum blockchain, to see what would happen\u00a0\u2014 just <a href=\"http:\/\/www.trustnodes.com\/2017\/11\/07\/exclusive-parity-hacker-claims-ethereum-newbie-interview\">experimenting:<\/a><\/p>\n<blockquote><p>\u201cWill i get arrested for this?\u201d So asks a user called devops199 on parity\u2019s developers real time public chat room, before confirming he called the \u201ckill\u201d transaction which wiped out the code library and <a href=\"http:\/\/www.trustnodes.com\/2017\/11\/07\/ethereums-parity-hacked-half-million-eth-frozen\">froze some 500,000 eth<\/a>, currently worth $150 million.<\/p>\n<p>\u201cI\u2019m eth newbie\u2026 just learning\u2026 sending kill() destroy() to random contracts you can see my history\u201d he publicly said.<\/p><\/blockquote>\n<p><a href=\"https:\/\/davidgerard.co.uk\/blockchain\/2017\/11\/08\/the-ethereum-parity-wallet-disaster-play-by-play\/parity-logo\/\" rel=\"attachment wp-att-2071\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2071\" src=\"https:\/\/davidgerard.co.uk\/blockchain\/wp-content\/uploads\/2017\/11\/parity-logo.png\" alt=\"\" width=\"308\" height=\"226\" srcset=\"https:\/\/davidgerard.co.uk\/blockchain\/wp-content\/uploads\/2017\/11\/parity-logo.png 308w, https:\/\/davidgerard.co.uk\/blockchain\/wp-content\/uploads\/2017\/11\/parity-logo-300x220.png 300w\" sizes=\"auto, (max-width: 308px) 100vw, 308px\" \/><\/a><\/p>\n<p>Devops199 was researching the <a href=\"https:\/\/paritytech.io\/blog\/security-alert-high-2.html\">July 2017 vulnerability<\/a> in the <a href=\"https:\/\/parity.io\/\">Parity<\/a> Ethereum wallet software which had led to <a href=\"https:\/\/www.coindesk.com\/30-million-ether-reported-stolen-parity-wallet-breach\/\">$30 million being stolen<\/a>. Unfortunately, in following the logic of that bug, they discovered that the fix for that problem had a new bug, which they duly <a href=\"https:\/\/github.com\/paritytech\/parity\/issues\/6995\">reported<\/a> to the Parity project:<\/p>\n<blockquote>\n<p class=\"gh-header-title\"><span class=\"js-issue-title\">anyone can kill your contract <\/span> <span class=\"gh-header-number\">#6995<\/span><\/p>\n<p>I accidentally killed it.<\/p>\n<p><a href=\"https:\/\/etherscan.io\/address\/0x863df6bfa4469f3ead0be8f9f2aae51c91a907b4\">https:\/\/etherscan.io\/address\/0x863df6bfa4469f3ead0be8f9f2aae51c91a907b4<\/a><\/p>\n<p>I was able to make myself the owner of that contract because its uninitialized.<\/p>\n<p>I made myself the owner of &#8220;0x863df6bfa4469f3ead0be8f9f2aae51c91a907b4&#8221; contract and killed it and now when i query the dependent contracts &#8220;isowner(&lt;any_addr&gt;)&#8221; they all return TRUE because the delegate call made to a died contract.<\/p>\n<p>I believe some one might exploit.<\/p><\/blockquote>\n<p>Devops199 took ownership of the contract at that address, because ownership had not been initialised, then turned it into a regular wallet address. They tried to back out by sending it a &#8220;kill&#8221;, which would normally be fine &#8230; but the contract in question was a &#8220;library&#8221; function \u2014 a function designed for other programs to use \u2014 that turned out to be essential to Parity wallets. With this library function disabled, all the contracts depending on it couldn&#8217;t work any more. An accidental <a href=\"https:\/\/www.theregister.co.uk\/2016\/03\/23\/npm_left_pad_chaos\/\">left-pad incident<\/a> in production, where a minor function that was deleted turned out to be a dependency of much more important things.<\/p>\n<p><a href=\"https:\/\/davidgerard.co.uk\/blockchain\/2017\/11\/08\/the-ethereum-parity-wallet-disaster-play-by-play\/devops199-chat\/\" rel=\"attachment wp-att-2063\"><img decoding=\"async\" class=\"aligncenter wp-image-2063 size-full\" src=\"https:\/\/davidgerard.co.uk\/blockchain\/wp-content\/uploads\/2017\/11\/devops199-chat.jpg\" alt=\"\" width=\"90%\" srcset=\"https:\/\/davidgerard.co.uk\/blockchain\/wp-content\/uploads\/2017\/11\/devops199-chat.jpg 1002w, https:\/\/davidgerard.co.uk\/blockchain\/wp-content\/uploads\/2017\/11\/devops199-chat-269x300.jpg 269w, https:\/\/davidgerard.co.uk\/blockchain\/wp-content\/uploads\/2017\/11\/devops199-chat-768x857.jpg 768w, https:\/\/davidgerard.co.uk\/blockchain\/wp-content\/uploads\/2017\/11\/devops199-chat-918x1024.jpg 918w\" sizes=\"(max-width: 1002px) 100vw, 1002px\" \/><\/a><\/p>\n<p>The Parity project has a <a href=\"https:\/\/paritytech.io\/blog\/security-alert.html\">detailed post<\/a> on what happened. &#8220;This means that currently no funds can be moved out of the multi-sig wallets.&#8221; The total of locked-up funds appears to be on the order of 1 million ETH, or about $300 million. Parity&#8217;s <a href=\"https:\/\/affected.parity.io\/\">MultiSig Freeze<\/a> page currently says 584 wallets are affected.<\/p>\n<p>Parity was founded by Gavin Wood, who is more or less the second-lead developer of Ethereum itself, and author of the <a href=\"https:\/\/github.com\/ethereum\/yellowpaper\">&#8220;yellow paper&#8221;<\/a>, the Ethereum protocol specification. Wood also runs Polkadot, whose ICO was <a href=\"http:\/\/www.trustnodes.com\/2017\/10\/15\/polkadot-ico-raises-130-million-just-begun\">very successful<\/a>; the Ether raised in the ICO appears to be stuck in the locked wallet.<\/p>\n<p>To emphasise that point: smart contract coding is so difficult and unforgiving that even one of the primary developers of Ethereum can&#8217;t do it without losing hundreds of millions of dollars to human error.<\/p>\n<p><a href=\"https:\/\/davidgerard.co.uk\/blockchain\/2017\/11\/08\/the-ethereum-parity-wallet-disaster-play-by-play\/artists-impression-of-ethereum-tue-7-nov-2017\/\" rel=\"attachment wp-att-2065\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-2065\" src=\"https:\/\/davidgerard.co.uk\/blockchain\/wp-content\/uploads\/2017\/11\/artists-impression-of-ethereum-tue-7-nov-2017.jpeg\" alt=\"\" width=\"90%\" srcset=\"https:\/\/davidgerard.co.uk\/blockchain\/wp-content\/uploads\/2017\/11\/artists-impression-of-ethereum-tue-7-nov-2017.jpeg 800w, https:\/\/davidgerard.co.uk\/blockchain\/wp-content\/uploads\/2017\/11\/artists-impression-of-ethereum-tue-7-nov-2017-300x169.jpeg 300w, https:\/\/davidgerard.co.uk\/blockchain\/wp-content\/uploads\/2017\/11\/artists-impression-of-ethereum-tue-7-nov-2017-768x432.jpeg 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n<p style=\"text-align: center;\">Artist&#8217;s impression of Ethereum, Tuesday 7 November 2017.<\/p>\n<p>Some crypto advocates who&#8217;ve been mainlining <a href=\"https:\/\/davidgerard.co.uk\/blockchain\/the-conspiracist-gold-bug-economics-of-bitcoin\/\">cryptocurrency ideology<\/a>\u00a0\u2014 including ones who really should know better, like <a href=\"https:\/\/twitter.com\/el33th4xor\/status\/927924088500310018\">Emin G\u00fcn Sirer<\/a>\u00a0\u2014 think that this drop in supply will <em>obviously<\/em> lead to an increase in price, because Austrian bitcoin economics holds this as an article of faith. In real economics, this isn&#8217;t how the purchasing power of money works. It might apply if Ether was a highly liquid commodity whose demand was comparable to the supply; in practice, it&#8217;s very thinly traded, the total supply is vastly greater than the demand (so\u00a0<em>hold!<\/em>) and the price is pretty much made of exuberance.<\/p>\n<p>Some have seriously advocated a <a href=\"https:\/\/www.coindesk.com\/ethereum-security-lead-hard-fork-required-to-release-frozen-parity-funds\/\">rescue fork<\/a> of Ethereum, though Vitalik Buterin remains <a href=\"https:\/\/twitter.com\/VitalikButerin\/status\/928172344631115776\">carefully noncommittal<\/a> on the idea. There is a <a href=\"https:\/\/github.com\/ethereum\/EIPs\/issues\/156\">proposal<\/a> to make smart contracts and locked wallets like this recoverable, though that would require another hard fork <a href=\"https:\/\/en.wikipedia.org\/wiki\/Flag_day_(computing)\">flag day<\/a>, and Ethereum is just stabilising after the <a href=\"https:\/\/www.coindesk.com\/ethereums-byzantium-hard-fork-is-running-smoothly-developers-say\/\">last one<\/a>.<\/p>\n<p>Crypto advocates need to take the next logical step, and admit the possibility that irreversibility, an essential design feature of cryptocurrency blockchains, is the fatal flaw of cryptocurrency that is responsible for <em>most<\/em> cryptocurrency and smart contract disasters. Pervasive irreversibility has turned out to be a bad and stupid idea.<\/p>\n<blockquote class=\"twitter-tweet\" data-width=\"550\" data-dnt=\"true\">\n<p lang=\"en\" dir=\"ltr\">I just finished <a href=\"https:\/\/twitter.com\/davidgerard?ref_src=twsrc%5Etfw\">@davidgerard<\/a> \u2018s \u201cAttack of the 50 Foot Blockchain\u201d last night so part of me feels like this happened to provide a practical example of everything he was predicting just for my benefit. <a href=\"https:\/\/t.co\/jCrqIJsrSD\">https:\/\/t.co\/jCrqIJsrSD<\/a><\/p>\n<p>&mdash; Justin (@SetOfJacks) <a href=\"https:\/\/twitter.com\/SetOfJacks\/status\/927958106042195969?ref_src=twsrc%5Etfw\">November 7, 2017<\/a><\/p><\/blockquote>\n<p><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n<p>Did I tell you so? I do believe I spent <a href=\"https:\/\/davidgerard.co.uk\/blockchain\/table-of-contents\/\">the entirety of chapter 10<\/a> telling you so!<\/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>Why cryptocurrency skeptics were overdosing on popcorn yesterday afternoon. &#8220;I accidentally the whole ICO.&#8221;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","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":[230,215,82,231,229,83],"class_list":["post-2049","post","type-post","status-publish","format-standard","hentry","category-uncategorised","tag-devops199","tag-emin-gun-sirer","tag-ethereum","tag-gavin-wood","tag-parity","tag-smart-contract"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/davidgerard.co.uk\/blockchain\/wp-json\/wp\/v2\/posts\/2049","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=2049"}],"version-history":[{"count":36,"href":"https:\/\/davidgerard.co.uk\/blockchain\/wp-json\/wp\/v2\/posts\/2049\/revisions"}],"predecessor-version":[{"id":6651,"href":"https:\/\/davidgerard.co.uk\/blockchain\/wp-json\/wp\/v2\/posts\/2049\/revisions\/6651"}],"wp:attachment":[{"href":"https:\/\/davidgerard.co.uk\/blockchain\/wp-json\/wp\/v2\/media?parent=2049"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/davidgerard.co.uk\/blockchain\/wp-json\/wp\/v2\/categories?post=2049"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/davidgerard.co.uk\/blockchain\/wp-json\/wp\/v2\/tags?post=2049"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}