{"id":3825,"date":"2022-12-16T13:57:19","date_gmt":"2022-12-16T13:57:19","guid":{"rendered":"https:\/\/metaschool.so\/articles\/?p=3825"},"modified":"2023-01-03T11:28:09","modified_gmt":"2023-01-03T11:28:09","slug":"what-is-zkevm","status":"publish","type":"post","link":"https:\/\/metaschool.so\/articles\/what-is-zkevm\/","title":{"rendered":"What is a zkEVM? The zero-knowledge Ethereum Virtual Machine"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_56_1 ez-toc-wrap-left counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title \" >Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/metaschool.so\/articles\/what-is-zkevm\/#What_is_it\" title=\"What is it?\">What is it?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/metaschool.so\/articles\/what-is-zkevm\/#How_does_zkEVM_work\" title=\"How does zkEVM work?\">How does zkEVM work?<\/a><ul class='ez-toc-list-level-3'><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/metaschool.so\/articles\/what-is-zkevm\/#1_Define_the_computation_to_be_performed\" title=\"1) Define the computation to be performed\">1) Define the computation to be performed<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/metaschool.so\/articles\/what-is-zkevm\/#2_Create_a_zkSNARK\" title=\"2) Create a zkSNARK\">2) Create a zkSNARK<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/metaschool.so\/articles\/what-is-zkevm\/#3_Generate_a_proof\" title=\"3) Generate a proof\">3) Generate a proof<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/metaschool.so\/articles\/what-is-zkevm\/#4_Submit_the_proof_to_the_network\" title=\"4) Submit the proof to the network\">4) Submit the proof to the network<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/metaschool.so\/articles\/what-is-zkevm\/#5_Verify_the_proof\" title=\"5) Verify the proof\">5) Verify the proof<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/metaschool.so\/articles\/what-is-zkevm\/#Types_of_zkEVMS\" title=\"Types of zkEVMS\">Types of zkEVMS<\/a><ul class='ez-toc-list-level-3'><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/metaschool.so\/articles\/what-is-zkevm\/#1_Zether\" title=\"1) Zether\">1) Zether<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/metaschool.so\/articles\/what-is-zkevm\/#2_Zk-Starks\" title=\"2) Zk-Starks\">2) Zk-Starks<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/metaschool.so\/articles\/what-is-zkevm\/#3_Zk-Rollup\" title=\"3) Zk-Rollup\">3) Zk-Rollup<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/metaschool.so\/articles\/what-is-zkevm\/#4_Zk-Sync\" title=\"4) Zk-Sync\">4) Zk-Sync<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/metaschool.so\/articles\/what-is-zkevm\/#The_importance_of_zkEVM\" title=\"The importance of zkEVM\">The importance of zkEVM<\/a><\/li><\/ul><\/nav><\/div>\n\n<p>zkEVM is an implementation of the <a href=\"https:\/\/metaschool.so\/articles\/ethereum-virtual-machine-evm-meaning\/\">Ethereum Virtual Machine (EVM)<\/a> that allows for the execution of Ethereum <a href=\"https:\/\/metaschool.so\/courses\/writing-your-first-hello-world-contract-in-solidity?ref=Articles&amp;utm_source=Blog_Organic\" target=\"_blank\" rel=\"noreferrer noopener\">smart contracts<\/a> in a zero-knowledge (private) manner. It was developed as part of the Zokrates project, which is a toolkit for building zero-knowledge proofs.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-is-it\"><span class=\"ez-toc-section\" id=\"What_is_it\"><\/span>What is it?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>It is a modified version of the EVM that allows users to perform certain operations on the blockchain in a private and confidential manner, without revealing the input or output of those operations to the rest of the network. <\/p>\n\n\n\n<p>Users can perform operations on the blockchain using <a href=\"https:\/\/metaschool.so\/articles\/zero-knowledge-proof\/\" target=\"_blank\" rel=\"noreferrer noopener\">zero-knowledge proofs<\/a>, which are mathematical constructs that allow one party (the prover) to prove to another party (the verifier) that they know the value of a certain statement, without revealing the actual value of that statement. This allows users to prove the correctness of their computations without revealing the actual inputs or outputs of those computations to the network.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-does-zkevm-work\"><span class=\"ez-toc-section\" id=\"How_does_zkEVM_work\"><\/span>How does zkEVM work?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>For example, suppose a user wants to perform a computation on the blockchain that involves sensitive data, such as a medical record or a financial transaction. Using zkEVM, the user can create a zero-knowledge proof that demonstrates the correctness of their computation to the network, without revealing the actual data involved in the computation. <\/p>\n\n\n\n<p>This allows the user to maintain the privacy of their data while still allowing the network to validate the correctness of the computation. To create a zero-knowledge proof in zkEVM, a user typically needs to perform the following steps:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1-define-the-computation-to-be-performed\"><span class=\"ez-toc-section\" id=\"1_Define_the_computation_to_be_performed\"><\/span>1) Define the computation to be performed<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The user must define the computation they want to perform on the blockchain, as well as the inputs and outputs of that computation.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"2-create-a-zksnark\"><span class=\"ez-toc-section\" id=\"2_Create_a_zkSNARK\"><\/span>2) Create a zkSNARK<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The user must create a <a href=\"https:\/\/z.cash\/technology\/zksnarks\/\" target=\"_blank\" rel=\"noreferrer noopener\">zkSNARK<\/a> (Zero-Knowledge Succinct Non-Interactive Argument of Knowledge), which is a type of zero-knowledge proof that can be used to prove the correctness of a computation. This involves generating a proving key and a verification key, which are used to create and verify the zero-knowledge proof, respectively.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"3-generate-a-proof\"><span class=\"ez-toc-section\" id=\"3_Generate_a_proof\"><\/span>3) Generate a proof<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Using the proving key, the user generates a proof that demonstrates the correctness of their computation to the network. This proof can be verified using the verification key.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"4-submit-the-proof-to-the-network\"><span class=\"ez-toc-section\" id=\"4_Submit_the_proof_to_the_network\"><\/span>4) Submit the proof to the network<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The user submits the proof to the Ethereum blockchain, along with the inputs and outputs of their computation.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"5-verify-the-proof\"><span class=\"ez-toc-section\" id=\"5_Verify_the_proof\"><\/span>5) Verify the proof<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The network verifies the proof using the verification key to ensure that the computation is correct. If the proof is valid, the computation is executed and the results are recorded on the blockchain.<\/p>\n\n\n\n<p>Overall, zkEVM allows users to perform private and confidential computations on the <a href=\"https:\/\/metaschool.so\/courses\/how-does-ethereum-work-a-deepdive?ref=Articles&amp;utm_source=Blog_Organic\" target=\"_blank\" rel=\"noreferrer noopener\">Ethereum blockchain<\/a>, while still allowing the network to verify the correctness of those computations. This has the potential to enable a wide range of new use cases on the Ethereum blockchain, such as private financial transactions, confidential medical records, and more.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"types-of-zkevms\"><span class=\"ez-toc-section\" id=\"Types_of_zkEVMS\"><\/span>Types of zkEVMS<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1-zether\"><span class=\"ez-toc-section\" id=\"1_Zether\"><\/span>1) Zether<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>This is a zero-knowledge protocol that allows users to send transactions to each other privately, without revealing their identities or the amounts being transferred.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"2-zk-starks\"><span class=\"ez-toc-section\" id=\"2_Zk-Starks\"><\/span>2) Zk-Starks<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>This is a zero-knowledge proof system that allows users to prove the correctness of computations without revealing the inputs or outputs of the computation.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"3-zk-rollup\"><span class=\"ez-toc-section\" id=\"3_Zk-Rollup\"><\/span>3) Zk-Rollup<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p><a href=\"https:\/\/metaschool.so\/articles\/zk-rollups-zero-knowledge-rollups\/\">Zk-rollup<\/a> is a layer-2 scalability solution that allows users to perform transactions off-chain, while still being secured by the main Ethereum blockchain.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"4-zk-sync\"><span class=\"ez-toc-section\" id=\"4_Zk-Sync\"><\/span>4) Zk-Sync<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>This is a zero-knowledge proof system that allows users to perform fast, low-cost transactions on the Ethereum network without revealing the details of the transaction.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"the-importance-of-zkevm\"><span class=\"ez-toc-section\" id=\"The_importance_of_zkEVM\"><\/span>The importance of zkEVM<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>A zk-EVM (Zero-Knowledge Ethereum Virtual Machine) is important because it allows users to conduct transactions on the Ethereum blockchain with privacy and anonymity. In a traditional blockchain, all transactions are publicly recorded and can be traced back to the sender and recipient. This can be problematic for users who want to keep their financial activity private, or for businesses that want to protect sensitive data.<\/p>\n\n\n\n<p>By using a zk-EVM, users can prove that a transaction has taken place without revealing any information about the transaction itself, such as the identity of the sender or recipient, or the amount being transferred. This can help to protect the privacy and anonymity of users, and can also help to prevent fraud and identity theft.<\/p>\n\n\n\n<p>&#8212; <\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":3828,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","footnotes":""},"categories":[292,17],"tags":[31],"class_list":["post-3825","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-answers","category-blockchain","tag-ethereum-blockchain"],"_links":{"self":[{"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/posts\/3825","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/comments?post=3825"}],"version-history":[{"count":4,"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/posts\/3825\/revisions"}],"predecessor-version":[{"id":4244,"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/posts\/3825\/revisions\/4244"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/media\/3828"}],"wp:attachment":[{"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/media?parent=3825"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/categories?post=3825"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/tags?post=3825"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}