Layer 2 expansion is one of the most critical issues in the industry. Originally, L1 was implemented by Ethereum itself, running a smart contract platform on the Ethereum blockchain. However, due to the throughput limitations and high transaction fees of Ethereum's original architecture, it is necessary to build an L2 expansion solution to increase transaction speed and reduce costs.
The zkEVM-based project aims to improve the scalability and security of Ethereum by using zero-knowledge proofs, sharding and other technologies to enable faster and more efficient transactions.
zkEVM (Zero-Knowledge Execution Environment Virtual Machine) is an Ethereum virtual machine that uses zero-knowledge proofs to achieve privacy protection. It allows smart contracts to be executed in a way that protects the privacy of smart contract terms and data involved in the contract, which is entirely achieved through zero-knowledge proofs.
zkEVM can be considered as a way to process and verify some data without leaking the original data during the execution of Ethereum smart contracts. If a project introduces zkEVM, it can effectively improve the privacy and performance of smart contracts. With zkEVM, users can execute smart contracts containing secret computations at a faster speed while protecting privacy.
According to Vitalik’s interpretation, zkEVM can be divided into:
1. Type 1 PSE: (Fully Ethereum-equivalent) — zkEVM does not change any part of the Ethereum system and strives to be fully equivalent.
Type 2 Scroll (Full EVM — Equivalent) — zkEVM will look exactly like Ethereum, but will differ in aspects such as data structures and state trees.
(3) Type 2.5 (EVM - equivalent to gas, except for cost) - zkEVM significantly increases the GAS cost to meet specific operations in EVM that are very difficult to zk prove, and developers need to be careful when deploying dApps here, because These may break some developer tools.
(iv) Type 3 (Almost EVM-equivalent) — zkEVM is almost equivalent to EVM, but they have to make some sacrifices and remove features that are difficult to implement in a zkEVM system.
(v) Type 4 (High-Level Language Equivalent) — These zkEVMs are compatible at the language level (Solidity, Vyper).
They take smart contracts written in these languages and make it possible to compile them in another language that is used to build zkEVM systems. Currently, zkSync is such a zkEVM implementation.
zkEVM Classification and Circuit
Currently, Ethereum's expansion solution Rollup has two different tracks, Optimistic Rollup and zk Rollup. Their execution principles are similar, and the main difference lies in the transaction verification process.
It is worth noting that zk Rollup’s “zero-knowledge proof (ZKP)” technology uses technologies such as SNARKs, a cryptographic method to verify and publish its transaction batches on Ethereum.
Therefore, ZK rollup can be understood as combining off-chain execution with on-chain data through zero-knowledge proof (ZKP), which is gradually becoming the mainstream solution of ZK.
But in addition to ZK-rollup, there are actually two other solutions - Validium and Volitions.
First of all, the operation of ZK-rollup is simply to package multiple transactions together, publish them to L1, and publish a proof (using zero-knowledge proof technology) to claim that these transactions are valid. Once verified on L1 that they are indeed valid, the status of zk-rollup will be updated.
This proof mechanism is also called "proof of validity". Currently, the main proof mechanisms used by ZK-rollup are zkSNARK and zkSTARK.
Then there are Validium and Volitions.
ZK-rollup sends transactions in batches to L1 for execution, which is a trustless "custom security". Validium executes directly off-chain and maintains data through zero-knowledge proofs. The validity proof of the withdrawal request is only verified on the mainnet when necessary.
Therefore, Validium is more scalable than ZK-rollup (the current highest TPS can reach over 20,000). The disadvantage is that it entrusts the trust right to a "weakly trusted" third party outside the chain for expansion, and there is a high probability that the data will be unavailable due to attacks or users will be unable to withdraw funds.
Among them, the way to solve the security problem is to "adopt the PoS mechanism" and use economic incentives to ensure that data is stored in each node and available at any time.
The representative project currently using the Validiums solution is Immutable X, an NFT-centric expansion solution. Vitalik also said that Validium is seriously underestimated. In fact, most dApps can already meet their operating needs with Validium.
As for Volitions, it is a Volitions solution created by the StarkWare team by combining ZK-rollup and validium. As the name suggests, it is about "decisiveness". Volitions can essentially provide both ZK-rollup and validium services at the same time, because they share the same state root, and users can choose the DA mode for each transaction.
Even if, as mentioned above, Validium is attacked and data becomes unavailable or users are unable to withdraw funds, the funds on ZK-rollup can still be guaranteed to be safe. This is because users can choose the ZK-rollup mode when it comes to important fund transactions, sharing the security of Ethereum. If it is daily entertainment, socializing or small transactions, they can switch back to the Validium mode to increase speed and save costs.
zkEVM project latest progress and analysis
1.StarkNet
According to Dune, StarkNet has 318,253 bridge users, surpassing Optimism's 317,758. However, in terms of total bridge storage value, StarkNet still lags behind Optimism, with the former bridging storage value of 39,900 ETH and the latter bridging storage value of 527,480 ETH, worth more than $1 billion. As the most highly valued project among the four major L2s (Optimism, Arbitrum, zkSync, StarkNet), the StarkNet ecosystem project has seen a lot of recent trading activity.
StarkNet has announced the deployment of its native token $STRK on the Ethereum mainnet on November 16, 2022, for voting, staking and payment of fees, and the token distribution is still to be decided. StarkNet's parent company, StarkWare, was founded in 2018 and is headquartered in Israel. Its two main products are the expansion engine StarkEx built on the Ethereum main network and the general-purpose ZK-Rollup StarkNet. First of all, StarkNet is a general-purpose L2 launched by StarkWare. It adopts a validity proof scheme to obtain the security of the main network. Through STARK+Cairo, the validity proof technology is used to create a native ecosystem of StarkNet.
In simple terms, after a user initiates a transaction, the transaction will be sent to Squencer for verification, sorting, execution, and batching. Squencer executes the transaction through Cairo OS (Cairo language has zk-friendly features), which is the role of EVM. Squencer then submits the trace of the executed transaction to Prover, which generates a validity proof for the computational integrity. The Prover here also generates a validity proof for StarkEx, and can aggregate transactions from different StarkEx applications and StarkNet for sharing.
The underlying technologies used by the two are the same. StarkEx is equivalent to using ZK Rollup technology in advance through the centralized operation of a single App, while StarkNet undertakes the decentralized task of building a node network. One of StarkWare's major contributions to the field is that it converts all smart contract calculation results into provable polynomial equations through the Cairo language, making smart contracts compatible with Validity Proof.
StarkWare has received a total of $273 million in financing in 7 rounds of financing, of which its parent company StarWare is valued at $8 billion, which is one of the reasons why it is the highest valued among the four. In the subdivided track of zk-rollup, StarkNet does not have a certain proportion of users in zkEVM. At present, the StarkNet ecosystem is only in its infancy, and the small transaction volume makes it difficult for StarkNet to accumulate enough transactions to spread the cost of validity proof, resulting in a long transaction confirmation time for StarkNet, which cannot exert the ultimate scalability.
However, on January 5 this year, StarkWare announced the official launch of the public version of the programming language Cairo 1.0, officially replacing the two-year test and preview version. It also marks that it has become possible to use this language to write smart contracts on StarkNet. At the same time, it will also take into account efficient execution efficiency, becoming a milestone event for the ZK-based Layer 2 Rollup technology faction.
It can be seen that the development ecosystem is the foundation of the ecosystem for the project party. According to Electric Capital statistics, StarkWare's full-time developers are twice that of Aptos and Sui, and may be about 3 times if part-time developers are included, and the number is still growing. It has increased by 214% in the past year and 2220% in the past two years. Even if StarkNet temporarily gives up the EVM compatibility route, it also allows StarkNet to focus more on obtaining a more flexible development experience and attracting diverse developers.
2. zkSync Era
Last October, the first phase of the zkSync 2.0 mainnet Baby Alpha of Ethereum L2 scaling solution zkSync went online, becoming the first mainnet released by the zkEVM project on Ethereum. On March 24 this year, zkSync announced that the zkSync 2.0 mainnet has entered the second phase Fair Onboard Alpha, allowing registered projects to be deployed on the mainnet. It even decided to rename zkSync 2.0 to zkSync Era and zkSync 1.0 to zkSync Lite. After the zkSync Era mainnet was officially opened to the public, the number of single addresses exceeded 100,000 within 3 days, and 18,000 ETH entered the zkSync Era across chains. As of April 14 this year, the zkSync Era TVL has reached 240 million US dollars.
Previously, the transaction cost of ZkSync Lite was not high, but the overall speed was slow; while ZkSync Era further increased the transaction speed and significantly reduced the transaction cost. Not only that, ZkSync Era will have more integration with existing development tools to lower the entry threshold for external developers. In short, after this update, ZkSync Era will be compatible with cloud development environments, such as Google Cloud Services to store data.
In addition, both GPU and non-GPU environments can be used for key generation and setup, and GPU acceleration will still be optimized to facilitate the development of hardware-accelerated devices in the future.
The highlights of zkSync Era are:
(1) Completely independent of third parties but with security similar to the mainnet: Supports Solidity 0.8.x version, which is consistent with the Ethereum mainnet development environment.
(2) EVM-compatible smart contracts without permission: zkSync’s EVM compatibility allows smart contracts written in Solidity and Vyper to be used on zkSync without refactoring. zkSync also built the first LLVM (LowLevelVirtualMachine)-based compiler for EVM languages (Solidity, Vyper, Yul). Thanks to the open source and universality of LLVM, developers can eventually write smart contracts in languages such as C++ and Rust.
(3) Standard Web3 API: The Web3 API is almost fully compatible with Ethereum, and developers can use most of the APIs.
(4) Preserve key EVM features, such as smart contract composability.
(5) Introducing new features, such as abstract accounts: zkSync Era directly uses local abstract accounts to assist any account on Era to pay fees in any token, and even allow users to trade at zero fees under conditions where some protocols are willing to subsidize.
(6) Execution delay mechanism: According to official news on March 24, zkSync announced that one of the mechanisms in the zkSync Era multi-layer security mechanism is "execution delay", that is, each L2 block submitted to L1 will have a time lock before execution and finalization. Initially, the delay will be 24 hours. As the system matures, the delay will gradually decrease until the exit of the Alpha phase, when the delay will be completely removed. This move is mainly to ensure that the team has enough time to verify any impact of transactions included in the block before the block becomes the final block, and has enough time to detect vulnerabilities, investigate and freeze the protocol through governance.
The above is the latest progress of zkSync technology. The financing and technical background of zkSync development company Matter Labs should not be underestimated. Matter Labs has completed $200 million in financing in November 2022, and the team embarked on the ZK road as early as December 20, 2020, and launched zkSync Lite (zkSync 1.0), but at that time, due to the lack of EVM functions, it was relatively inconvenient for developers to use.
Therefore, it can be said that zkSync Era is currently more complete than before. Its technologies for developers and projects, such as the open source zkEVM (zero-knowledge Ethereum virtual machine), make it easier for developers to use and build their own ecosystems.
Secondly, zkSync Era also has more technical reserves for accessing Web2 and hardware applications for acceleration and inter-chain scalability.
Now the ecosystem is not only more suitable for developers and projects can build their own ecosystems, but also attracts multiple applications, including DeFi, wallets, cross-chain, NFT, infrastructure and other fields. However, zkSync Era is still in the Alpha stage. Many projects in the ecosystem are application migrations from other networks. There are very few native applications, and their risks are still unknown.
3. Polygon zkEVM
The Polygon zkEVM mainnet test version was officially launched on March 27, and Vitalik completed the first transaction on it. This time it is fully compatible with EVM, which also means that it supports the same program code as Ethereum. In the past year, Polygon was the highest-grossing chain with revenue of more than $26 million, while Arbitrum and Optimism were $19 million and $18 million respectively.
Since the launch of the testnet in October last year, many important milestones have been achieved, including the generation of more than 75,000 ZK proofs, the deployment of 5,000 smart contracts, and the proof cost of generating a large number of transactions as low as US$0.06.
This time the mainnet has made a breakthrough. Polygon zkEVM has passed 100% of the Ethereum test vectors applicable to zkEVM. Developers do not need to modify or rewrite any code, and all Ethereum tools can work seamlessly with Polygon zkEVM, which means that ZK Rollup's EVM compatibility has taken another big step forward. It is speculated that it has reached the type 2 level, which is completely equivalent to EVM.
The reason why Polygon zkEVM inherits the security of Ethereum is that the Sequencer does a job similar to that of the Ethereum Proposer, proposing a batch of transactions as valid transactions and giving the new status after the execution of these transactions; and the verification logic of the L1 contract is equivalent to that all L1 Validators will be executed once in their own Ethereum clients. In fact, all Ethereum validators act as Rollup validators, so it can be verified that Polygon zkEVM is completely equivalent to L1.
According to DuneAnalytics data, Polygon zkEVM has been online for nearly 24 hours, and more than 2,500 users have completed more than 2,700 cross-chain transactions with a total transaction volume of US$880,000. Today (4/14), Polygon TVL is approximately US$3.6 million.
Over the past year, Polygon has the highest revenue of all chains, with over $26 million, while Arbitrum and Optimism have $19 million and $18 million, respectively.
However, according to Token Terminal, token incentives cost projects an average of about $300 million per year, but this is less than 15% of Polygon's $2.4 billion treasury.
There is a strong competition among ZK-related Ethereum layer 2 expansion products. Currently, Polygon zkEVM seems to have temporarily won in terms of EVM compatibility. Therefore, it can be speculated that the next point of competition will be the time of official launch of the mainnet and who will establish a stable ecosystem first. It is predicted that L2 will become a hot spot in the entire market from Q2 to Q3 this year.
4. Scroll
Scroll and Polygon EVM are both considered by the market to be the best projects in terms of open source technology. In addition, their EVM compatibility levels are also very similar. The four different types of ZK-EVM types proposed by Vitalik are arranged in order of compatibility or equivalence. Zk-sync is type 4, while Scroll and Polygon are both in type 3 and are in the process of transitioning to type 2.
On April 10, Scroll co-founder Sandy Peng announced at the Foresight Hong Kong Summit that he would launch a cooperation plan to incentivize the ecosystem. The mainnet will be launched in the next 3 to 4 months. Recently, it completed its third round of financing with a valuation of US$1.8 billion.
Scroll announced the trial of the first Pre-alpha testnet in August last year, enabling users to trade on the network, and completed the first testnet reset on January 16 this year. According to the latest news, Scroll's Alpha testnet is now officially running on the Goerli testnet, and has transitioned from the Pre-alpha stage to the Alpha test stage. As of last week, the Alpha testnet has generated more than 1 million blocks. From a technical point of view, Scroll has developed the world's fastest GPU prover, allowing anyone to use GPU machines to build proof nodes and achieve decentralization.
The more nodes that join, the greater the computing power and the lower the cost, which incentivizes the community to update better and faster hardware, iterate ASICs that are exclusive to ZK, and further reduce the final confirmation time and proof cost of L1. In the ZK Rollup track, Scroll has the highest hardware computing efficiency. In addition to the technical level, the Scroll team pursues decentralization at the social and cultural levels.
In 2022, the Scroll team added 39 members, distributed in more than 20 cities and more than 10 time zones. More than 30 of them are ZK or blockchain researchers and developers.
In addition to its outstanding performance in EVM compatibility, Scroll's decentralized proof-of-contract nodes and open-source community management reflect the legitimacy of Ethereum and achieve "compatibility" at the value level. The top-level hardware speed has injected greater potential into Scroll.
And Scroll's three design principles or core values (community-driven, security first, and decentralization at all levels) are the project's competitive advantages. After injecting new funds this year, Scroll plans to continue building its products, launching its mainnet, and expanding its ecosystem. To this end, the team said Scroll will seek to increase the current team size from about 60 to nearly 100 people in the future.
5. Line
The launch of Polygon zkEVM mainnet BETA has brought new popularity to zkEVM. ConsenSys also officially announced that its ConsenSys zkEVM has been renamed Linea, and has opened the testnet to all developers, users and protocols and natively integrated tools such as MetaMask and Truffle. In addition, Consensys has previously received more than US$700 million in financing (more than Arbitrum and zkSync), with participation from Microsoft, SoftBank, Temasek, Coinbase Ventures and others.
The highlight of Linea technology is that it does not use a transpiler or custom compiler to generate zk proofs for Solidity smart contracts, but uses compiled Solidity bytecode. Not only can it reduce the surface risk of vulnerabilities and hacker attacks, but the innovative prover design they provide can ensure faster transaction speeds and lower Gas costs.
Linea wrote: "Our innovative Prover design ensures faster transaction speeds and lower Gas costs without sacrificing security." Just after opening the Linea testnet to the public, it saw 2.7 million transactions, 354,000 unique wallet addresses, 75,000 deployed contracts, and 26,000 followers in the first week alone, so ConsenSys officials then announced the creation of an open version of the commemorative NFT to celebrate the release of Linea's public testnet.
Conclusion
Let’s not talk about whether Ethereum will have the opportunity to upgrade to Type 1 zkEVM in the future for further on-chain expansion. Currently, from the external zkEVM track from Type 2 to Type 4, providing developers and users with unique customization and UX has created a thriving ecosystem, which is often something that Ethereum L1 cannot do now.
It is not difficult to see that the ultimate goal of projects based on ZK rollups technology is zkEVM, and from last year to now will be the year when everyday cryptocurrency users will be able to try zkEVM for the first time. At the end of last year, the market's suggestion for 2023 was "before zkEVM matures, the market structure should still be OP-based and ZK-assisted", but at the beginning of this year, most ZK projects have confirmed the launch of the mainnet. It seems that the timing will come faster than last year's structure, and the technology is also much more stable.
