{"id":63612,"date":"2023-11-04T12:25:55","date_gmt":"2023-11-04T16:25:55","guid":{"rendered":"https:\/\/coinscreed.com\/staging\/?p=63612"},"modified":"2023-11-04T12:25:57","modified_gmt":"2023-11-04T16:25:57","slug":"chainlight-averts-1-9b-exploit-in-zksync-era-protocol","status":"publish","type":"post","link":"https:\/\/coinscreed.com\/staging\/chainlight-averts-1-9b-exploit-in-zksync-era-protocol\/","title":{"rendered":"ChainLight Averts $1.9B Exploit in zkSync Era Protocol"},"content":{"rendered":"\n<p>ChainLight, a blockchain security audit firm, discovered and reported a critical bug in the <a href=\"https:\/\/coinscreed.com\/staging\/zksync-launches-new-stark-based-proof-system.html\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">zkSync Era protocol<\/a> that could have allowed an attacker to steal up to 100,000 ETH. Matter Labs fixed the bug, and the developers of zkSync Era and ChainLight were rewarded 50,000 USDC for their vigilance.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"512\" src=\"https:\/\/coinscreed.com\/staging\/wp-content\/uploads\/2023\/11\/Chainlight-1024x512.png\" alt=\"ChainLight Averts $1.9B Exploit in zkSync Era Protocol\" class=\"wp-image-63616\" srcset=\"https:\/\/coinscreed.com\/staging\/wp-content\/uploads\/2023\/11\/Chainlight-1024x512.png 1024w, https:\/\/coinscreed.com\/staging\/wp-content\/uploads\/2023\/11\/Chainlight-300x150.png 300w, https:\/\/coinscreed.com\/staging\/wp-content\/uploads\/2023\/11\/Chainlight-768x384.png 768w, https:\/\/coinscreed.com\/staging\/wp-content\/uploads\/2023\/11\/Chainlight-18x9.png 18w, https:\/\/coinscreed.com\/staging\/wp-content\/uploads\/2023\/11\/Chainlight-360x180.png 360w, https:\/\/coinscreed.com\/staging\/wp-content\/uploads\/2023\/11\/Chainlight-750x375.png 750w, https:\/\/coinscreed.com\/staging\/wp-content\/uploads\/2023\/11\/Chainlight-1140x570.png 1140w, https:\/\/coinscreed.com\/staging\/wp-content\/uploads\/2023\/11\/Chainlight.png 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-chainlight-found-the-bug\">How ChainLight found the bug<\/h2>\n\n\n\n<p>The bug was hidden in the zk-circuits of zkSync Era, which are used to verify transactions on the layer-2 scaling solution without revealing sensitive information. <\/p>\n\n\n\n<p><a href=\"https:\/\/medium.com\/chainlight\/uncovering-a-zk-evm-soundness-bug-in-zksync-era-f3bc1b2a66d8\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">ChainLight realized that this bug <span class=\"wpil-link-icon\" title=\"Link goes to external site.\" style=\"margin: 0 0 0 5px;\"><svg width=\"24\" height=\"24\" style=\"height:16px; width:16px; fill:#000000; stroke:#000000; display:inline-block;\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" xmlns:svg=\"http:\/\/www.w3.org\/2000\/svg\"><g id=\"wpil-svg-outbound-7-icon-path\" fill=\"none\" clip-path=\"url(#clip0_31_188)\">\r\n                            <path d=\"M9.16724 14.8891L20.1672 3.88908\" stroke-linecap=\"round\"\/>\r\n                            <path d=\"M13.4497 3.53554L20.5208 3.53554L20.5208 10.6066\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\/>\r\n                            <path d=\"M17.5 13.5L17.5 16.26C17.5 17.4179 17.5 17.9968 17.2675 18.4359C17.0799 18.7902 16.7902 19.0799 16.4359 19.2675C15.9968 19.5 15.4179 19.5 14.26 19.5L7.74 19.5C6.58213 19.5 6.0032 19.5 5.56414 19.2675C5.20983 19.0799 4.92007 18.7902 4.73247 18.4359C4.5 17.9968 4.5 17.4179 4.5 16.26L4.5 9.74C4.5 8.58213 4.5 8.0032 4.73247 7.56414C4.92007 7.20983 5.20982 6.92007 5.56414 6.73247C6.0032 6.5 6.58213 6.5 7.74 6.5L11 6.5\" stroke-linecap=\"round\"\/>\r\n                        <\/g>\r\n                        <defs>\r\n                            <clipPath id=\"clip0_31_188\">\r\n                                <rect fill=\"white\" height=\"24\" width=\"24\"\/>\r\n                            <\/clipPath>\r\n                        <\/defs><\/svg><\/span><\/a>could enable a malicious actor to alter the transaction details within a block while still passing the verification. <\/p>\n\n\n\n<p>This could result in the layer-1 smart contracts on Ethereum accepting the falsified proofs without noticing the tampered transaction data.<\/p>\n\n\n\n<p>If this bug had not been detected in time and exploited by an attacker, they could have potentially drained<strong> 100,000 ETH<\/strong> from the zkSync Era protocol, which was worth about <strong>$1.9 billion<\/strong> at the time of the disclosure.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-rich is-provider-twitter wp-block-embed-twitter\"><div class=\"wp-block-embed__wrapper\">\n<div class=\"embed-twitter\"><blockquote class=\"twitter-tweet\" data-width=\"550\" data-dnt=\"true\"><p lang=\"en\" dir=\"ltr\">Saving $1.9B.<br><br>On September 15th, we discovered and reported a critical bug in <a href=\"https:\/\/twitter.com\/zksync?ref_src=twsrc%5Etfw\" target=\"_blank\" rel=\"noopener\">@zkSync<span class=\"wpil-link-icon\" title=\"Link goes to external site.\" style=\"margin: 0 0 0 5px;\"><svg width=\"24\" height=\"24\" style=\"height:16px; width:16px; fill:#000000; stroke:#000000; display:inline-block;\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" xmlns:svg=\"http:\/\/www.w3.org\/2000\/svg\"><use href=\"#wpil-svg-outbound-7-icon-path\"><\/use><\/svg><\/span><\/a> Era&#39;s ZK-Circuits that could have drained all the tokens passing through the bridge.<br><br>This bug allows a malicious prover to produce &quot;proofs&quot; for invalidly executed blocks, which the verifier\u2026 <a href=\"https:\/\/t.co\/GH8ZD0fqhv\" target=\"_blank\">pic.twitter.com\/GH8ZD0fqhv<span class=\"wpil-link-icon\" title=\"Link goes to external site.\" style=\"margin: 0 0 0 5px;\"><svg width=\"24\" height=\"24\" style=\"height:16px; width:16px; fill:#000000; stroke:#000000; display:inline-block;\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" xmlns:svg=\"http:\/\/www.w3.org\/2000\/svg\"><use href=\"#wpil-svg-outbound-7-icon-path\"><\/use><\/svg><\/span><\/a><\/p>&mdash; ChainLight (@ChainLight_io) <a href=\"https:\/\/twitter.com\/ChainLight_io\/status\/1720109308015485194?ref_src=twsrc%5Etfw\" target=\"_blank\" rel=\"noopener\">November 2, 2023<span class=\"wpil-link-icon\" title=\"Link goes to external site.\" style=\"margin: 0 0 0 5px;\"><svg width=\"24\" height=\"24\" style=\"height:16px; width:16px; fill:#000000; stroke:#000000; display:inline-block;\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" xmlns:svg=\"http:\/\/www.w3.org\/2000\/svg\"><use href=\"#wpil-svg-outbound-7-icon-path\"><\/use><\/svg><\/span><\/a><\/blockquote><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/div>\n<\/div><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">The security measures that saved zkSync Era<\/h3>\n\n\n\n<p>However, exploiting this bug was not an easy task, as zkSync Era had multiple layers of security in place. <\/p>\n\n\n\n<p>According to Anton Astafiev, the head of security at <a href=\"https:\/\/coinscreed.com\/staging\/matter-labs-nets-200m-to-build-zksync-ethereum-scaling-platform.html\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Matter Labs,<\/a> an attacker would need to gain the highest level of access to the protocol\u2019s backend or its validator private key, which is used to sign blocks. <\/p>\n\n\n\n<p>Moreover, an attacker would have to wait for 21 hours before claiming any stolen funds due to a built-in execution delay. Astafiev also noted that the bug was related to the old prover of zkSync Era, which was soon to be replaced by the new Boojum prover.<\/p>\n\n\n\n<p>As soon as ChainLight reported the bug, Matter Labs acted swiftly and fixed the issue. They also rewarded ChainLight with <strong>50,000 USDC<\/strong> for their discovery. <\/p>\n\n\n\n<p>Astafiev expressed his gratitude to ChainLight and his vision of collaborating with more security experts in the future. <\/p>\n\n\n\n<p>He said, <\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u201cSuch findings remind us of the importance of layered defense mechanisms, like the ones Matter Labs designed for zkSync. No security system is perfect, and we need to work together to make zkSync Era as secure as possible.\u201d<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">The Role and Importance of zkSync Era in Scaling Ethereum<\/h3>\n\n\n\n<p>zkSync Era is a layer-2 protocol that scales Ethereum with zero-knowledge proofs. It aims to provide fast, cheap, and secure transactions on Ethereum without compromising its decentralization or security. <\/p>\n\n\n\n<p>zkSync Era supports smart contracts written in Solidity or Vyper and is compatible with the <a href=\"https:\/\/coinscreed.com\/staging\/ethereum-virtual-machine-aurora-raises-12m-in-its-first-funding-round.html\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Ethereum Virtual Machine.<\/a> zkSync Era is developed by Matter Labs, a team of engineers passionate about liberty, blockchain, and math.<\/p>\n\n\n\n<p>The Layer 2 protocol is one of the leading solutions to address the scalability challenges of Ethereum, which has been suffering from high gas fees and network congestion. <\/p>\n\n\n\n<p>By moving most of the computation and data off-chain, zkSync Era can process thousands of transactions per second while still ensuring their validity on the main chain. <\/p>\n\n\n\n<p>zkSync Era is used by over 150 projects, including <strong>Chainlink, Uniswap, SushiSwap, Aave, Argent, Gnosis, Curve,<\/strong> and many others.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ChainLight, a blockchain security audit firm, discovered and reported a critical bug in the zkSync Era protocol that could have allowed an attacker to steal up to 100,000 ETH. Matter Labs fixed the bug, and the developers of zkSync Era and ChainLight were rewarded 50,000 USDC for their vigilance. How ChainLight found the bug The [&hellip;]<\/p>\n","protected":false},"author":44,"featured_media":63616,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[130],"tags":[17072,2156,17073,14233],"class_list":["post-63612","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blockchain-news","tag-chainlight","tag-exploit","tag-matter-labs","tag-zksync-era"],"jetpack_featured_media_url":"https:\/\/coinscreed.com\/staging\/wp-content\/uploads\/2023\/11\/Chainlight.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/coinscreed.com\/staging\/wp-json\/wp\/v2\/posts\/63612","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/coinscreed.com\/staging\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/coinscreed.com\/staging\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/coinscreed.com\/staging\/wp-json\/wp\/v2\/users\/44"}],"replies":[{"embeddable":true,"href":"https:\/\/coinscreed.com\/staging\/wp-json\/wp\/v2\/comments?post=63612"}],"version-history":[{"count":0,"href":"https:\/\/coinscreed.com\/staging\/wp-json\/wp\/v2\/posts\/63612\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/coinscreed.com\/staging\/wp-json\/wp\/v2\/media\/63616"}],"wp:attachment":[{"href":"https:\/\/coinscreed.com\/staging\/wp-json\/wp\/v2\/media?parent=63612"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/coinscreed.com\/staging\/wp-json\/wp\/v2\/categories?post=63612"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/coinscreed.com\/staging\/wp-json\/wp\/v2\/tags?post=63612"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}