One article sorts out zkEVM solutions: zkSync, StarkNet, Polygon zkEVM, Scroll
Written by: Filippo Armani
Compilation: Deep Tide TechFlow
ZK Rollups, also known as Validity Rollups, are a revolutionary way to scale Ethereum that allows transactions to be processed off-chain and merged on the main chain as a single compressed transaction. This process increases transaction throughput and reduces fees while maintaining the security and decentralization of the main chain.
One of the prominent features of ZK Rollups is the use of zero-knowledge proofs (ZKP), a type of cryptographic proof that enables a prover to prove to a verifier that a statement is true without revealing any additional information.
For ZK Rollups, ZKP ensures the integrity of off-chain transactions, enabling provers to prove the validity of batches of transactions without revealing transaction specifics and without requiring verifiers to check all transactions before accepting a new state.
ZK Rollups offer a higher level of security than Optimistic Rollups because they introduce no additional trust assumptions on top of Ethereum and rely on Ethereum and mathematics for security. Optimistic Rollups rely on game theory and the 1/n honest node assumption, which means that for each transaction batch, there will always be at least one honest node that can challenge malicious transactions.
On the other hand, operators of ZK Rollups, also known as sequencers and provers, do not have any chance of compromising users' funds, as their role is "merely" to collect transaction batches and generate ZK proofs, while users' funds remain On Ethereum L1, Ethereum is ultimately responsible for verifying the ZK proof submitted by L2 and completing the underlying transaction.
Validity proofs are generated by performing complex polynomial calculations on state data. If the state data is invalid, no proof of validity can be generated. A verifier on L1 will enter state data to verify the validity proof, so if the prover changes the state data, the verifier will not accept the proof.
Compared with Optimistic Rollups, ZK Rollups also have two advantages: faster finality and more efficient data availability.
First, they make finality faster. Because as long as proof of validity is provided, the transaction is confirmed on Ethereum; while Optimistic Rollups need to wait a week to ensure that there are no challenges, so the transaction is considered legal and final.
Second, ZK Rollups are more efficient in relation to data availability. Because only state differences need to be published, because instead of rebuilding all transactions for validation, Optimistic Rollups need to publish the full data so that anyone can reconstruct transactions and eventually challenge them.
As a result, ZK Rollups use less data bandwidth on Ethereum (a scarce resource that all Rollups need to share regardless of the system they use to execute transactions, including ZK circuits), allowing users to get even cheaper fees (or even zero fees).
Zk-rollups are considered the ultimate solution for Ethereum scalability, but implementing them is difficult because the Ethereum Virtual Machine (EVM) is not designed to support ZK circuits. To solve this problem, many organizations and researchers have tried to create a Rollup-enabled virtual machine called zkEVM, which can run smart contracts in a manner compatible with zero-knowledge proof calculations.
The four zkEVM classifications proposed by Vitalik
In his blog post, Vitalik outlines four zkEVM types based on compatibility with Ethereum.
have to be aware of is:
The closer zkEVM is to Ethereum's functionality, the slower and more expensive it is to generate Zk proofs.
On the other hand, if a blockchain or Rollup is more compliant with Ethereum’s specifications and standards, it will be easier for developers to build applications on it and integrate into the Ethereum ecosystem.
In conclusion, blockchains that are highly compatible with Ethereum may have a competitive advantage.
The first category: zk rollups that are the exact equivalent of Ethereum, exactly replicating Ethereum in all parts including hashes, state trees, transaction trees, precompilations, or any other consensus logic. So far, no zkEVM has achieved an equivalent to Ethereum.
The second category: Zk rollups that are completely equivalent to EVM strive to be equivalent to EVM, but not completely equivalent to Ethereum. They are fully compatible with existing applications, but with minor modifications to Ethereum to make development easier and proofs to be generated faster. Scroll and zkEVM Polygon theoretically belong to this category; in practice, they currently belong to the third group.
The third category: almost equivalent to EVM, in order to make the proof generation faster, more elements and equivalence are sacrificed. Polygon zkEVM and Scroll currently fall into this category. This category is often the springboard into the second category.
The fourth category: high-level language equivalence, meaning that they both accept a smart contract written in Solidity and convert it to another custom, zk-friendly language. zkSync and StarkNet fall into this category, although zkSync may add compatibility to EVM bytecode over time and eventually move to higher types.
While the classification proposed by Vitalik is currently the most popular and unbiased, there are other classification methods.
Four classifications proposed by Immutable
Immutable, the StarkWare-based L2 dedicated to NFTs, provides the following useful taxonomy in one of its blog posts:

These categories are more clearly based on the existing zkEVM reaching its compatibility or equivalence with Ethereum at a specific level of the stack (high-level language, bytecode, or runtime environment) than Vitalik's classification.
Solidity compatible. Compatibility with Ethereum is implemented at the high-level language level Solidity, which means developers can continue to write smart contracts in the language they are used to on Ethereum. However, these Rollups immediately convert Solidity to their intermediate representation, which is then compiled in their bytecode and executed in their custom environment. Specifically, these L2s use transpilers to convert Solidity code into readable code for custom VMs (Cairo for StarkWare, LLVM-IR for zkSync). Some Solidity features are not supported by these transpilers, so developers may need to tweak their smart contracts. For example: zkSync and StarkNet.
EVM compatible. From a language level, these Rollups are EVM compatible, but they have their own bytecode, which means that Solidity can directly compile to EVM opcode/bytecode, and then convert to custom word before custom VM runtime section code. In fact, these Rollups are compatible with most Ethereum programs, but some applications may need to be rewritten. Also, some bytecode features (such as precompilation) are not supported. For example: Polygon zkEVM.
Equivalent to EVM. These Rollups create a zk verification circuit that can directly read EVM opcodes and bytecodes, although the VM itself is different from the EVM. These Rollups are fully compatible with existing applications, but some minor modifications can be made to Ethereum to make development easier and proof generation faster. For example: Scroll.
Equivalent to Ethereum. This means duplicating Ethereum in all its components, similar to how Polygon has done it. So far, no zk Rollup falls into this category.
Combining this framework with the one proposed by Immutable, and adding some additional information, the following diagram can be outlined, highlighting some design differences and similarities to consider when comparing different zkEVM implementations before any performance data is available:

zkSync 2.0
zkSync 2.0 (rebranded to zkSync Era just before mainnet launch) is a scaling solution for the Ethereum network that is fully compatible with the Solidity programming language. With zkSync, users can choose between two types of data availability: zkSync Rollup and zkSync Porter. The former publishes data directly on Ethereum, making it as secure as Ethereum L1, while the latter stores data off-chain, resulting in faster and cheaper transactions, but with a lower level of security.
zkSync is EVM compatible because it can convert smart contract code written in Solidity to Yul, and convert Yul to LLVM-IR, and then recompile it into a custom circuit compatible byte specifically designed for zkSync's EVM code set. While this requires an intermediate step, it also allows for the addition of other non-EVM functionality, such as Account Abstraction. Additionally, zkSync’s company, Matter Labs, plans to gradually make it more compatible with the Ethereum toolkit and is preparing to launch its first three-layer prototype, zkSync Opportunity, in the areas of scalability and interoperability, as part of its ambitions to Published on testnet.
At the time of writing, zkSync Era has just launched, so it is too early to comment on its performance. zkSync 1.0 (now known as zkSync Lite), which only supports simple transactions, is one of the largest zk rollups, with over $83 million locked and over 19 million cumulative transactions according to TVL, while StarkNet's TVL is just over $19 million , with a cumulative transaction volume of 4 million.
StarkNet
StarkNet is a type 4 / Solidity compatible zk-rollup that employs a different type of zero-knowledge proofs called STARKs (Scalable Transparent ARgument of Knowledge) to ensure the integrity of off-chain transactions. STARKs are considered more efficient and scalable than SNARKs, but may require a more complex technical setup.
While StarkNet also supports smart contracts, its capabilities are relatively small due to the use of STARKs, and the fact that StarkNet contracts and StarkNet OS are written in the Cairo language. To make development easier, StarkWare recently upgraded to Cairo 1.0, which emulates Rust. Like the zkSync Era, StarkNet can be classified as "Solidity Compatible" because instead of executing programs inside the EVM, it creates an entirely new, purpose-built VM, using custom bytecode. StarkWare uses the Warp translator to convert Solidity code to Cairo VM bytecode.
However, unlike the zkSync Era and other zkEVM implementations, the StarkNet team's goal is not to be compatible with the EVM or other Ethereum components, but instead aims to make StarkNet's VM as efficient as possible by rolling out its custom client API, JavaScript library, and wallet system , which will force Ethereum-compatible tools to manually add StarkNet support. Although Cairo 1.0 also introduced Sierra - Secure Intermediate Representation - as a new intermediate representation layer between Cairo 1.0 and Cairo bytecode, the Warp transpiler does not support some Solidity features and is still far from matching zkSync Era for EVM compatibility long way to go.
Polygon zkEVM
Polygon zkEVM is a zk-rollup that uses a custom language zkASM to interpret zkEVM code and verify smart contract execution in a non-EVM runtime environment. The project began in 2021 with the $250 million acquisition of Hermez Network to begin developing an EVM-equivalent system that combines the security and efficiency of STARKs and SNARKs. While STARKs are used to generate validity proofs for transaction states, SNARKs are used to evaluate the correctness of STARK proofs. The combination of these solutions enables security, speed, and low transaction fees.
In July 2022, Polygon announced the rebranding of Polygon Hermez to Polygon zkEVM, just launched at the time of writing. The latest testnet release of the Polygon zkEVM introduces recursion, allowing one ZK proof of validity to validate batches of other ZK proofs, where each proof can validate multiple transactions. This functionality is powered by Plonky 2, a recursive SNARK that is 100x faster than existing alternatives and natively compatible with Ethereum itself.
In addition to Polygon zkEVM, Polygon has also developed Polygon Avail, a blockchain optimized only for data availability. The network will be permissionless, allowing anyone to join as a validator, unlike the existing DAC (Data Availability Committees), it will have hundreds of nodes collaborating to provide network security. Avail will work in pair with Polygon Hermez (Rollup), uploading state data from Hermez instead of publishing on Ethereum, providing a solution between Validium and Rollup.
Although some experts point out that the specification provided by Polygon is better described as EVM compatibility, the team is working hard to create the first fully EVM-equivalent solution.
Scroll
Scroll is an EVM equivalent zk-rollup developed by the Scroll team in cooperation with the PSE (Privacy and Scaling Explorations) group of the Ethereum Foundation. Machine (EVM) is fully compatible. This means that developers can use any EVM-compatible language to create smart contracts and deploy them on Scroll. Although Scroll does not currently support EVM opcodes, it is planned to do so by building a 1:1 opcode mapping and accepting EVM opcodes directly without a compiler.
Scroll's architecture includes a centralized serialization node and a decentralized proof network. Centralized serialization nodes are responsible for ordering transactions, creating blocks, and submitting transaction data as calldata to the Rollup contract on Ethereum for data availability. Scroll plans to gradually decentralize serialization nodes. On the other hand, a decentralized proof generator called Roller produces proofs and publishes them on the L1 network, leveraging distributed computing power. Rollers are randomly selected, and multiple proofs of different blocks can be generated in parallel on different Rollers to increase speed.
*Note: While only on-chain data availability is currently supported, the original design of Scroll also included Validium mode.
Indeed, both Scroll and Polygon take a bytecode-level approach to building their zkEVM. This approach completely eliminates the translation step, which means that these zkEVMs do not translate Solidity code into other languages until it is compiled and interpreted. However, while the only difference between Scroll and Ethereum is the runtime environment, Polygon creates a custom VM, optimizes it, and then translates the EVM bytecode to the bytecode of that VM. Unlike Scroll, Polygon's runtime ("zkExecutor") runs custom "zkASM" opcodes (micro-ops in the diagram) instead of EVM opcodes to optimize EVM interpretation (i.e. reduce the number of constraints rather than Prove EVM directly). Polygon zkEVM may not be 100% compatible with Solidity code, tools and applications, although most are.
While these are the most notable projects focused on rolling out general-purpose zkEVM implementations, other application-specific projects are also using zk technology in practice.
Looping is an application-specific zk-rollup to support decentralized exchange (DEX) protocols. Loopring is also a platform for anyone to build a dex using zk proofs. Immutable X is another app-specific zk-rollup built on top of StarkWare for NFT transactions and games. Aztec is a privacy-focused Ethereum-based zk-rollup that encrypts data to maintain data transparency and availability to the protocol while protecting user privacy. Additionally, Aztec invented the PLONK proof system, which is also used by zkSync and other projects.
Immutable X, Sorare, rhino.fi, ApeX, dYdX and many other protocols are built on StarkEx. In projects using StarkEx ZK-Rollup, data is sent to Ethereum as calldata and published on-chain. In Validium mode, data is stored off-chain and only hashes are stored on-chain. While the Rollup mode ensures greater security (users only need to interact with the Ethereum blockchain to recreate the ledger state), the Validium mode ensures lower costs and greater privacy.
Overall, while zkSync Lite is the largest zk rollup, StarkWare has the largest ecosystem, including projects built on StarkEx, and it also has the largest TVL and market share.

Summarize
In conclusion, zk-rollup is a promising solution for scaling blockchain networks, offering various implementations to meet different needs and requirements. While some classifications exist, it is worth noting that they are approximate interpretations and lack consensus on definitions and technical differences.
As Scroll co-founder Sandy Peng admits: “There is no clear consensus on any definition.” “The whole research team at Scroll” favors a certain narrative or a certain perception, but it’s not a clear-cut thing. Our research team doesn't even agree on what everything means. "
Nonetheless, some common trends emerged across zk rollup implementations:
First, they all seem to take a hybrid approach to data availability, offering a rollup version of traditional on-chain data storage and a validium version of off-chain data storage. Avail CEO Anurag Arjun told Blockworks: "In my opinion, you will find that every rollup will have a rollup version and a validium version."
Second, they mostly avoid pure open source code until they actually run, which is also related to stiff competition from optimistic rollups like Arbitrum and Optimism. Zk-rollups promise to be more efficient, but are technically more difficult to achieve.
Furthermore, as the table above makes clear, optimistic rollups, especially Arbitrum, are benefiting from a first-mover advantage and are leading the market in terms of applications, transaction volume, and market share. If proven successful, optimistic rollups could integrate the proof-of-validity model with their already established user base (for example, Optimism's upgrade Bedrock might introduce proof-of-validity).
Furthermore, while all implementations started with a centralized sequencer for efficiency, they all aim to gradually decentralize to address centralization concerns. Interestingly, decentralized sorters may require an economic incentive of a native token, so all mentioned projects should take this step.
Finally, the amazing results achieved by these zkEVM implementations in the past year have led to a renewed interest in zk technology in general, with companies focusing on various aspects of development, including developing new zk hardware to increase the speed of proof generation.
Original link


