Join Waiting List

    Manu Naik

    April 17, 2023

    The Noob’s Guide to zk-Everything

    Noobs guide to ZK everything

    Ethereum, the world’s second-most popular blockchain network, has been trying to solve the issue of scalability for over half a decade now. From Layer-2 networks to Optimistic Rollups, progress has been slow but steady. However, with the introduction of ZK-Rollups and the zkEVM, things are about to get interesting.

    If you didn’t already know, Zero-Knowledge Proofs (ZKPs) are a way to prove that you know something without giving away what you know. This is best explained by using the popular browser game ‘Wordle’.

    In Wordle, once you’ve got the correct answer, you get the option to share a graph of your attempts at guessing the correct answer. This graph is a form of Zero Knowledge proof, since it allows you to share that you got the right answer, and how many steps you took, without giving away what the word is.

    That being said, your friend who got the word in one attempt may have tampered with the graph, making this type of ZKP practically useless for financial applications. However, done right, Zero Knowledge proofs can be incredibly useful, especially in cryptographic systems like blockchains.

    Related: How to set up crypto hardware wallet?

    Scaling Ethereum

    The most widely adopted method for scaling Ethereum is using a Layer-2 (L2) network. These networks are built atop the base-layer blockchain, batching transactions to help the network run faster, and cheaper, but without compromising its security.

    Broadly, there are two types of Layer-2 networks:

    1. State Channels
    2. Optimistic Rollups

    State Channels allow users to make an unlimited number of transactions off-chain, while posting only two transactions to the blockchain. The first transactions opens a channel and locks its state, after which users can perform any number of transactions off-chain. The second transaction records the channel’s state after all off-chain transactions are conducted, and closes the channel.

    This adds strong privacy properties to transactions compared to sidechain scaling solutions while ensuring instant finality. However, state channels need participants to be available all the time, and are best used for applications where the participants are predefined.

    Optimistic Rollups are similar, in that they process transactions and handle computation off-chain, but they roll these transactions up into a single transaction pushed to the  Ethereum execution layer. They are called ‘optimistic’ because transactions are considered valid unless proven otherwise, giving the network some time to dispute potentially fraudulent transactions.

    The Age of ZK

    Now that we’ve spoken about ZKPs and Layer-2 networks, it’s time to talk about the elephant in the room – ZK Rollups. Like Optimistic Rollups, ZK Rollups also combine many transactions into a single one on the Ethereum layer. 

    However, unlike Optimistic Rollups, which requires some time for fraud appeals, ZK Rollups bundle transactions into a form of validity proof known as a SNARK (succinct non-interactive argument of knowledge).

    The receiving smart contract can quickly and easily verify a SNARK without any transaction data being revealed, making the network faster by removing the need to appeal fraudulent transactions.

    Since the network has to validate just a single transaction, ZK Rollups also make transacting incredibly cheap. Additionally, disputes against transaction made through Optimistic Rollups can last days, even weeks, while funds sent through ZK Rollups can be used near-instantly.

    Also Read: Why Crypto Payment Gateway Market is Rapidly Growing?

    zkEVM – Making Smart Contracts Smarter

    Before going into zkEVMs, we need to talk about the EVM, or the Ethereum Virtual Machine. In a nutshell, the EVM is where code deployed to the blockchain gets executed. If a virtual machine is deemed ‘EVM-compatible’ it means that apps designed to run on the EVM can be executed on it without making changes to its code.

    The problem is, the EVM was never built with using ZK Rollups in mind. However, blockchain developers have recently figured out a way to wrap EVM computations within Zero Knowledge proofs. Enter zkEVMs.

    A zkEVM produces ZKPs to verify the correctness of all aspects of computation, using various mechanisms to ensure code executions adhere to certain rules. This allows zkEVMs to support smart contracts built for Ethereum. To put it simply, zkEVMs are Ethereum L2 scaling solutions that improve the network’s scalability through ZK Rollups, transferring computation off-chain, and using Zero Knowledge proofs to verify the authenticity of off-chain transactions.

    Before this, ZK Rollups were only compatible with smart contracts that performed simple actions like payments and token swaps. Now, ZK Rollups can be used across Ethereum applications, since zkEVMs are EVM-compatible. This also encourages developers to build EVM-compatible applications that support ZK Rollups, bringing greater scalability, cheaper execution, faster finality, and increased capital efficiency to the Ethereum DApp ecosystem.

    This is a huge development, enabling frictionless movement of assets for power users like DeFi investors, arbitrage traders and NFT flippers.

    The Future of zkEVMs

    Some of the most high-profile projects in the Web3 space are building zkEVMs. 

    Polygon recently launched its zkEVM, on which Ethereum founder Vitalik Buterin made the first transaction during a livestream coupled with the message, “A few million constraints for man, unconstrained scalability for mankind.”

    The Ethereum Foundation has also funded AppliedZKP to build its own zkEVM. Other projects include Matter Labs, building the zkSync L2, which recently launched their alpha mainnet, and Scroll, a team of researchers and hackers working alongside AppliedZKP.

    zkEVMs are solving the blockchain trilemma, making blockchains scalable, secure, and decentralized. This is a massive development for the Web3 space, enabling developers to explore new utilities, and redefining what Ethereum is capable of.

    Read More: Jobs That Pay in Cryptocurrency and Bitcoin