Foresight Ventures: Understanding zkEVM Rollup from Polygon zkEVM

Foresight Ventures
2022-09-05 14:45:33
Collection
In the long run, the engineering implementation and optimization of zkEVM is just a matter of time. All solutions have their own value. Vitalik also mentioned that these different solutions may gradually transform over time until they find the one that suits their positioning.

Author: msfew@Foresight Ventures

Source: Foresight Research

The future roadmap of Ethereum is tailor-made for Rollups, and the most promising solution at present is the zk Rollup that employs zero-knowledge proof technology.

In general understanding, zk Rollup requires years of engineering development to truly land, due to the immense difficulty in building zkEVM. To enable developers to seamlessly port and deploy Ethereum smart contracts to zk Rollup, the development team needs to work on the development and performance optimization of the EVM-compatible zkEVM.

Implementing zkEVM has always been a key task for the Ethereum Foundation and other zk Rollup teams like Polygon. From a long-term perspective, the implementation of zkEVM can address various aspects of the Ethereum mainnet's consensus bottleneck:

  • I/O: Through stateless and enshrined zkEVMs
  • Storage: Through stateless and enshrined zkEVMs
  • Computation: Through enshrined zkEVMs

At the same time, with zkEVM as a core component, a truly perfect general Rollup network can be built.

Recently, Polygon has introduced an alpha version of zk Rollup with zkEVM, which has its own merits compared to solutions like Scroll, StarkNet, zkSync, and Sin7Y. The existence of these zkEVMs represents a significant leap for Polygon within the Ethereum ecosystem, indicating that a new and better Rollup user experience is on the horizon.

image

1: zkEVM

a) Introduction to zkEVM

Before understanding how zkEVM Rollup can revolutionize the Ethereum user experience, we need to grasp the concept of zkEVM. If you want to delve deeper into zk, zkVM, and zkEVM, feel free to read our previous research articles.

The concept of zkEVM can be broken down into two parts:

  • zk: Zero-knowledge proof technology, which can prove the validity of a batch of transactions through a concise proof, achieving computational trustworthiness and thereby enabling scalability.
  • EVM: The smart contract executor of the Ethereum ecosystem. It is the existence of EVM that allows Ethereum to run smart contracts, making it a global computing network (in contrast, Bitcoin's functionality might only be considered as a calculator), and EVM has also given rise to concepts like EVM compatibility, EVM equivalence, and EVM superset.

Thus, zkEVM is a zk virtual machine that is at least compatible with EVM at the programming language level. After running smart contracts in zkEVM, a zk proof is generated, which can prove the validity of the state transition, ensuring computational trustworthiness. Verifiers only need to validate the proof (which incurs minimal overhead) without needing to re-execute (which is highly redundant).

image

b) Significance of zkEVM

image

zkEVM holds significant importance at various levels:

  • For Rollup scalability: zkEVM can generate proofs for batch transactions, allowing for rapid verification on the mainnet, achieving computational trustworthiness with complete reliability and without the need for multiple rounds of complex consensus, leveraging the security of the mainnet.
  • For DApp developers: Developers do not need to learn any hardcore knowledge related to zk or new languages beyond Solidity and Vyper; they can use zkEVM to endow any smart contract with zk superpowers.
  • For zkEVM developers: There is no need to write different circuits for the functionalities of smart contracts on the network; they only need to maintain zkEVM.
  • For Layer 3 builders: They can attempt to build Layer 3 Verifiers within zkEVM, allowing Layer 3 batch transactions to be simultaneously proven and packaged into a single transaction for verification on the mainnet (L3: 1000 tx → L2: 10 tx → L1: 1 tx), achieving App-rollup.
  • For Ethereum: The existence of multiple zkEVM solutions will ultimately become important Public Goods, helping Ethereum realize the next stage of its roadmap for Enshrined zkEVM and zk everything.

c) Comparison of zkEVM Solutions and Progress

Recently, zk Rollup projects have been very active. StarkNet announced it will issue tokens in the future, Aztec released privacy DeFi, zkSync announced a countdown to mainnet launch, Scroll released a Pre-Alpha version of zkEVM, and Polygon open-sourced the entire codebase of the zkEVM project…

The Ethereum ecosystem can be seen as a race for zk and zkEVM. As we mentioned in our previous articles on zkVM and zkEVM, the zkEVM solutions each have their own strengths and advantages.

First, there are fundamental differences in the technical direction, which can be broadly divided into two directions:

image

Different players exist in both directions:

  • Native-based: Polygon, AppliedZKP, Scroll, Taiko. The latter three are essentially developed within the same repository and can be regarded as the same type of solution.
  • Compilation-based: StarkNet, zkSync, OlaVM, etc. This track has the most participants, but the differences between different projects are also quite significant.

According to Vitalik's classification comparison method, they can be divided into the following types:

image

  • Type 1: Fully compatible enshrined zkEVM with Ethereum L1. Such as AppliedZKP.
  • Type 2: Fully EVM-equivalent zkEVM, with slight differences in internal structure. Such as the future Scroll and Hermez.
  • Type 2.5: EVM-equivalent zkEVM, differing only in gas costs (which may lead to slight compatibility differences). Such as Scroll and Hermez after adding complex operations with precompiles.
  • Type 3: Almost EVM-equivalent zkEVM. Such as the current Scroll and Hermez.
  • Type 4: zkEVM compatible at the language level, with different features and developer facilities, and developers cannot directly write EVM Bytecode. Such as zkSync and StarkNet.

In terms of trade-offs among solutions, there are actually many variables. Just like allocating points to initial characters in a game, there is a limited number of talent points that can be distributed among each variable, making it a three-way choice:

  • Performance (zk Prover, Verifier, overhead, hardware acceleration)
  • Compatibility (DApp developers, infrastructure, development tools, miners)
  • Development difficulty (maintenance difficulty, development progress, system complexity, engineering implementation complexity)

The differences among typical solutions are:

  • StarkNet: Fully implements a brand new zkVM (CairoVM), with good performance and low development difficulty, but insufficient compatibility (requires a Warp translator to implement EVM), with the biggest highlight being the formation of an ecosystem, along with innovations like storage proof and fractal scaling.
  • zkSync: An IR-level zkEVM (LLVM-IR part). Good compatibility (language-level adaptation), with medium performance and development difficulty, more flexibility, and the biggest highlight being that during the compiler iteration process, it can support other languages besides Solidity through LLVM.
  • Hermez and Scroll: Both are considered Bytecode-level zkEVMs (not necessarily fully reusing EVM Bytecode, but the differences between the two are very subtle). Excellent compatibility, with some performance sacrifices (the original EVM is not zk-friendly, and there are many performance challenges to overcome after circuitization), and high development difficulty, with the biggest highlight being architectural security and being the most native.

2: Polygon zkEVM Rollup

The core component of the Polygon Hermez open-sourced zkEVM Rollup network is zkEVM. Its overall technical solution is fundamentally consistent with the comparisons mentioned earlier.

a) Architecture of Polygon zkEVM Rollup

The overall architecture of Polygon zkEVM Rollup is as follows:

image

The core of the architecture is zkEVM itself. zkEVM will execute L2 transactions, and the off-chain proof network will generate validity proofs for the execution of transactions in zkEVM, with the final state changes and proofs submitted to the Ethereum mainnet.

The key components of Polygon zkEVM Rollup are: PoE consensus algorithm, zkNode, zkProver, STARK and SNARK Proof Builders, and Rollup cross-chain bridges:

  • PoE consensus algorithm: To enhance security, efficiency, and decentralization, the PoE algorithm replaces the PoD algorithm of Hermez 1.0. PoE can be combined with PoS to ensure the decentralization and efficiency of block production in Polygon zkEVM Rollup. Any miner running a zkNode can become a Sequencer, and any miner running both zkNode and zkProver can become an Aggregator. The gas fee for miners' block production rights will be transacted using $MATIC.

image

  • zkNode: zkNode is the software that any miner wishing to participate in the Polygon zkEVM Rollup network needs to run. zkNode will synchronize, order, and verify transactions. Additionally, if one merely wants to understand the operational status of the network without participating, they only need to run a read-only node without running zkNode.
  • zkProver: zkProver is the software that any miner wishing to participate as an Aggregator in the Polygon zkEVM Rollup network needs to run. As the name suggests, zkProver is a prover that generates zk proofs. Essentially, zkEVM is a state transition under polynomial representation, and zkProver contains a Main SM Executor and multiple Secondary State Machines to achieve proof of state transitions.

image

  • STARK and SNARK Proof Builders: The two Proof Builders will generate two different types of proofs: STARK (PIL STARK) generates proofs for the satisfaction of polynomial constraints of state transition batches, while SNARK (SnarkJS) generates constant size proofs for the construction of STARK proofs, thereby publishing them on-chain at a lower cost.

image

Rollup cross-chain bridge: In addition to being a traditional Burn/Mint cross-chain bridge, Polygon zkEVM Rollup can also serve as a bridge for cross-chain interactions with other L2s.

image

b) Design of Polygon zkEVM Rollup

The core design philosophy of Polygon zkEVM Rollup is:

  • Decentralization (anyone can reconstruct the entire Rollup state through DA, with no censorship or centralized control)
  • No admission requirements (anyone can participate in the network as a Sequencer or Aggregator)
  • Security (inherits the security of Ethereum, using the Ethereum network to assist in Rollup state updates and proof verification)

image

  • Performance and efficiency (enhanced performance through PoE, off-chain computation, UTXO model settlement of cross-chain bridge contracts, and various cryptographic optimization schemes)

c) Features of Polygon zkEVM Rollup

There are many advantages that truly make the Polygon solution stand out.

First, the collaboration among the Polygon development teams naturally forms a synergy. The zk universe of Polygon includes Polygon Hermez (the main development team of Polygon zkEVM), Polygon Zero, Polygon Miden, and Polygon Nightfall, with the modular solution also incorporating many other teams. Although the three zk teams have slightly different directions, they are all top teams in the zkVM field, capable of directly collaborating and assisting each other in technical solutions and architecture. For instance, Polygon Hermez's choice to use 64-bit small field STARK proof generation was based on advice from Polygon Zero.

image

Additionally, Polygon zkEVM Rollup has many innovations in zk technology. For example, the creation of two DSLs, zkASM and PIL, can be used to interpret EVM bytecode and encode polynomial commitments; the combination of STARK and SNARK leverages the scalability of STARK and the succinctness of SNARK, making the proofs overall faster while ultimately consuming less on-chain space; in terms of optimization, it employs the highly efficient Goldilocks as the base field, achieving parallel computation of Keccek circuits, and uses Poseidon-hash Merkle trees as the data structure for systematic storage.

In terms of decentralized proof generation and EVM equivalence, both Polygon Hermez and Scroll have made significant efforts in their own ways. To achieve EVM equivalence, it is necessary to write EVM opcodes in the form of zk circuits; Polygon interprets them through zkASM and then executes them in zkExecutor (Geth essentially does the same interpretation), while Scroll can directly generate proofs from the Execution Trace of the Geth client.

In terms of compatibility, there is actually no difference (the interpretation or translation of runtime does not affect compatibility). Comparatively, Polygon's solution is more friendly and efficient for proof nodes in terms of EVM equivalence, while Scroll focuses on fully reusing Geth's security foundation, making it more convenient for audits.

image

I believe that the zkEVM solution of Polygon Hermez strikes a sweet spot between native EVM support and performance, not only interpreting EVM through zkASM, avoiding the extremely high complexity of underlying EVM development, but also innovating and optimizing from different angles to ensure that performance is no longer a fatal issue for zkEVM.

3: Advantages of zkEVM Rollup Solutions

a) Layer 1 and Rollup

Users have long suffered from Layer 1 gas fees, and in our previous research on MEV, we discussed the ideal form of a network.

In an ideal network:

  • Anyone can send transactions (no censorship)
  • No spam (no spam)
  • Very low fees (low fees)

At the same time, in the context of crypto and blockchain, the network also needs to be decentralized and performance scalable. This presents a three-way dilemma for an ideal blockchain network:

  • low fees with no spam
  • decentralized with no permission and no censorship
  • scalable with general computation

A monolithic Layer 1 blockchain cannot achieve all of the above simultaneously, while Rollup achieves high performance, decentralization, and low fees through centralized block production and decentralized verification.

This is also the conclusion we reached in our Rollup article.

b) Optimistic Rollup vs. zk Rollup

From a long-term perspective and practical theoretical performance limits, zk Rollup is more scalable and has stronger security assumptions compared to OP Rollup.

image

The challenge period associated with Optimistic Rollup makes the time for a transaction to be truly finalized particularly long, while once a proof is generated and verified for zk Rollup, the transaction can be completely finalized immediately.

The OP Rollup is akin to Layer 1's PoW and longest chain principle, while zk resembles PoS and its related consensus. For Layer 1, both PoW and PoS mechanisms are viable, but Rollups pursuing performance ultimately require a stronger guarantee (through staking or cryptography) provided by zk mechanisms.

This is also the conclusion we reached in our modular blockchain article.

c) zk Rollup vs. zkEVM Rollup

Since there are zk Rollups, why are Optimistic Rollups currently so popular?

Because the currently operational zk Rollups do not have general computation capabilities, such as Loopring, and are merely at the stage of single operations, making it impossible for developers to deploy and port smart contracts to Rollups.

zk proofs are primarily used to prove the correctness of operations, and the emergence of a zkEVM Rollup can cultivate a smart contract ecosystem similar to Optimistic Rollup, which is far more flexible than ordinary zk Rollup transfer scalability networks, while also being more secure and providing a better user experience than Optimistic Rollup.

4: User Experience of zkEVM Rollup

a) Timing, Location, and People

The emergence of zkEVM Rollup is a result of timing, location, and people:

  • Timing: Layer 1 scalability has encountered bottlenecks, and Optimistic Rollup has explored the path of Rollup.
  • Location: The security and social consensus provided by Ethereum offer perfect soil for the establishment of zkEVM Rollup.
  • People: The EVM ecosystem dominates blockchain development, with countless zk development teams contributing to zkEVM solutions.

So what improvements in user experience does zkEVM Rollup bring to users?

First, we need to define users; I believe users include both developers and ordinary users:

b) Developer User Experience

  • zkEVM ⇒ No need to learn a new language or even write new contracts to develop DApps: Solidity, as the primary language of the blockchain contract world, has countless resources and ecosystems, and is the most suitable language for blockchain scenarios. The combination of these two advantages far surpasses languages like Move or Rust.
  • Rollup ⇒ Unlocks more application scenarios: Using the Ethereum mainnet for payments or gaming applications is not very suitable due to performance and cost issues. zkEVM Rollup allows more Apps to be realized in the form of DApps.

c) User User Experience

  • zk ⇒ Stronger security than PoS networks and faster finality than OP Rollup: Some PoS networks rely on token staking to ensure security, but their capital is relatively small, resulting in weak security guarantees. zk's cryptography ensures absolute security through mathematics. The challenge period of OP Rollup prevents a transaction from being confirmed for a certain time, while zk Rollup confirms the transaction as soon as the proof is generated.
  • EVM ⇒ Completely consistent user flow and infrastructure: Aside from needing to switch networks in wallets and applications, all user processes will be identical to those on the mainnet, with no additional learning costs; users can use applications as they did before.
  • Rollup ⇒ Both OP and zk Rollup can provide L2 instant finality: From a user experience perspective, the transaction is executed before the user even realizes it. Therefore, users do not need to wait for several seconds or minutes to continue sending the next transaction. In application usage, users can engage in on-chain activities more freely, conducting high-frequency transactions or on-chain gaming, etc.

d) User Experience of Polygon zkEVM Rollup

In the future, the experience for users and developers on zkEVM Rollup will be infinitely closer to that of the Ethereum mainnet, while the experience will be even faster and smoother under the advantages of low gas fees and quick confirmations.

image

In the plans for Polygon zkEVM Rollup, ETH will always be used as the gas fee unit for the Rollup, while MATIC will serve as the token required for staking, which is an excellent decision:

  • Better value capture: Polygon's experience in operating a PoS network has concluded that the value capture from staking is superior to using tokens directly as gas.
  • Better user experience: Using ETH as the Rollup token allows L1 users or cross-chain bridge projects to avoid additional swap steps during the process (most people will directly cross ETH). At the same time, using ETH as gas is more legitimate.
  • More significant differentiation: Polygon zkEVM Rollup will have a more apparent distinction from Polygon PoS, and the differences in mechanisms indeed require such differentiation to allow users to choose the solution that best suits them.

Additionally, Polygon's zkEVM Rollup brings:

  • A familiar "environment": Users do not need to worry about underlying technical changes; everything will be very similar to Polygon PoS, but zkEVM Rollup will be faster, safer, and easier to use in all aspects. Developers can also participate in familiar hackathons, enjoying the rich development ecosystem and community that Polygon has accumulated.

5: The Future of zkEVM Rollup

For the future of zkEVM Rollup solutions, we will analyze the technological future and what the ultimate form of this solution will be.

a) zkEVM Technology

Vitalik has profound insights on this topic. In the four categories of zkEVM he summarized, there are no truly good or bad solutions; there are only different technical trade-offs: closer to the bottom layer but slower, less compatible but faster.

In the long run, the engineering implementation and optimization of zkEVM is merely a matter of time. All solutions have their own value. Vitalik also mentioned that these different solutions may gradually transform over time until they find the one that suits their positioning.

The best future is one where we have many different flavors of zkEVM, allowing developers to choose their preferred one, and the Ethereum mainnet can enhance itself through their innovations. More innovations lead to a better future.

b) Rollup Technology

The ultimate form of Rollup technology will be zkEVM Rollup, while Optimistic Rollup will continue to have its place, and there may even be mixed Rollups combining zkEVM and Optimistic (I personally believe one mechanism is sufficient).

zkEVM Rollup is better than Optimistic Rollup in many aspects. However, the biggest advantage of Optimistic Rollup is that it is simpler to establish; the difference between Optimism Bedrock and Geth is only five hundred lines of code, and any engineer familiar with Geth can easily set up an Optimistic Rollup, or in the future, use engines like Optimint on Celestia. The path for OP Rollup in this regard has been thoroughly explored. In contrast, zkEVM Rollup has higher complexity, a higher learning curve, and lacks fully realized experience and solutions.

c) Technology… is not the most important

We've discussed a lot of technology, but technology is certainly not the most important. The bottleneck for zkEVM Rollup, Rollup, Ethereum, and even blockchain has never been an engineering implementation or DA or consensus technical bottleneck, but rather the users.

To give a Web2 example (thanks to Nelson): Apple's App Store. All developers prioritize releasing applications on the App Store, but the review process is very unstable and often randomly rejects application uploads. In contrast, the Android app market or Amazon's app market has a much friendlier review process. But why do developers want to publish on the App Store? Because the App Store has a mature and stable user base! No matter how well the developer experience is in the Android or Amazon app markets, developers will still flock to the platform with users.

The goal of software development is not elegant APIs, 100% test coverage, or the best programming language, but rather: solving more problems and providing more value. This means needing to cater to more users.

d) Ultimate Form

So what would a truly ultimate zkEVM Rollup look like in our imagination?

  1. The foundation of the ultimate form: Technology
  • At the zkEVM level: All solutions that can be implemented are good, but there is no need to be overly purist. Ethereum's EVM is a very legacy and outdated system (though still a top-notch solution), and there should be more improvements and innovations to zkEVM. Additionally, zkEVM needs more optimization to reduce proving overhead to catch up with Optimistic solutions.
  • At the Rollup level: Ensure that the core values of blockchain (decentralization, security) are prioritized, rather than engaging in an arms race for TPS.
  1. The core of the ultimate form: Social Consensus
  • At the ecosystem level: Ideally, all applications on the Ethereum mainnet migrate to a certain Rollup. If this zkEVM Rollup has a solid ecological foundation, it will significantly outpace other solutions at launch. In this regard, Polygon has a tremendous advantage.
  • At the developer level: EVM compatibility is not a decisive factor; rather, it is which zkEVM Rollup can reach developers the fastest, allowing them to use it as a network for development. It has never been about the network accommodating developers, but rather developers choosing the overall fastest or best network and then gradually adapting to the development of that network.
  • At the user level: Users' mindset and social consensus are crucial. Besides reaching developers, who can most effectively reach users is also the most important factor. A successful network should not become a tech enthusiast's self-indulgence in the superiority of technical solutions, but rather genuinely solve problems for users and create value.

zkEVM Rollup has a bright future.

ChainCatcher reminds readers to view blockchain rationally, enhance risk awareness, and be cautious of various virtual token issuances and speculations. All content on this site is solely market information or related party opinions, and does not constitute any form of investment advice. If you find sensitive information in the content, please click "Report", and we will handle it promptly.
ChainCatcher Building the Web3 world with innovators