Bankless: A Comprehensive Overview of the Latest Developments in ZK
If you have delved into the world of crypto, you have likely heard about zero-knowledge proofs (ZK Proof) and their applications for some time. They have gone live… or are very close to going live… or some version of them is just around the corner? This information can be hard to track.
ZK has a variety of implementations—today we will provide some updates on how the ZK world is evolving.
1. How is ZK progressing?
In blockchain terminology, we consider the initial phase of Ethereum's life to be monolithic.
This means that in the first few years, the "Layer 1 (L1)" Ethereum mainnet was entirely responsible for executing its own transactions, facilitating its own network security, and providing services for its own data availability.
In recent years, Ethereum has been rapidly shifting towards a modular design, which means that an increasing number of external third-party solutions built around Ethereum are being used to scale Ethereum's data and execution needs.
Modular Ethereum | Source: Ultra Scalable Ethereum
In terms of data availability, projects like Celestia and Polygon Avail are competitors. As for execution, in recent years we have seen the rise of "Layer 2 (L2)" solutions like Arbitrum and zkSync, which execute transactions off-chain (i.e., outside of Ethereum) and then effectively "roll up" those transactions to Ethereum L1, providing an incredibly affordable and fast user experience in the process.
Today, Ethereum L1 itself facilitates a pitiful approximately 30 transactions per second (TPS). To better handle global activity levels without severe network congestion (high fees, slow transactions), Ethereum increasingly relies on scaling innovations to optimize its execution capabilities. There are two main types of solutions here: on-chain scaling and off-chain scaling.
On-chain scaling refers to changes made directly to the blockchain to improve its transaction execution capacity, i.e., throughput. For Ethereum, one example is sharding, which, once implemented, will distribute the activity load across dozens of primary, enshrined Ethereum chains rather than a single mainnet.
The future of Ethereum L2 + sharding - from Vitalik Buterin
Off-chain scaling refers to external execution environments, i.e., L2, which facilitate cheap and fast transactions outside of Ethereum and then batch publish transaction data to Ethereum to complete activities and inherit Ethereum's security. Off-chain scaling does not split L1 into many main chains like sharding but cultivates a secondary layer composed of many external rollups with excellent customizability.
2. ZK rollups: Leading ZK-based off-chain scaling technology
When it comes to L2, the most popular contemporary solution is zero-knowledge rollup (ZK rollup). Notably, these rollups can facilitate around 2,000 TPS, which is a 6,500% increase over Ethereum's current rate of 30 TPS!
This particular L2 style uses "zero-knowledge proof (ZKP)" technology, such as SNARKs, to cryptographically verify and publish its transaction batches on Ethereum. Thus, by combining off-chain execution with on-chain data through zero-knowledge proofs (ZKP), you get ZK rollups (as opposed to optimistic rollups, which combine off-chain execution with on-chain data through fraud proofs).
In summary, the five largest ZK rollups currently tracked by L2 BEAT are as follows:
dYdX—cryptocurrency and derivatives exchange | $375 million TVL
Loopring Protocol—L2 for trading and NFTs | $121 million TVL
zkSync Lite—L2 for trading and NFTs | $65 million TVL
ZKSpace—L2 for trading and NFTs | $49 million TVL
Aztec Connect—L2 for private DeFi | $15 million TVL
Four of the top 10 L2s today are ZK rollups - from L2 BEAT
The leading ZK rollups today are built using StarkEx technology (e.g., dYdX and Loopring) or based on zkSync code (e.g., zkSync Lite and ZKSpace). However, there are also more ZK rollups not linked to these tech stacks that are worth your attention, such as Aztec Connect.
3. About Validiums and Volitions
However, ZK rollups are not the only noteworthy ZK-based solutions in the contemporary Ethereum scaling landscape. Two other scaling methods to note are Validium and Volitions.
Validiums execute off-chain transactions and maintain their data through off-chain zero-knowledge proofs. This approach contrasts with how ZK rollups batch data sent to Ethereum (i.e., publish it on-chain). Thus, where the data is stored is the key difference between ZK rollups and validiums.
The "dual off-chain" approach of Validiums ultimately makes them custodial, as the data is maintained by a trusted party. However, what validiums lack in trustlessness, they make up for with excellent performance, as today's most powerful validiums can facilitate over 20,000 TPS.
Currently, two more well-known validium projects are Immutable X, an NFT-centric scaling solution with a TVL of $123 million, and Sorare, a fantasy sports digital card game with a TVL of $21 million. Other notable validiums to watch include ApeX, rhino.fi, and Myria.
As for Volitions, they are an innovation created by the StarkWare team, representing a crossover between ZK rollup and validium. This means that, as long as there is willingness, users can choose between on-chain and off-chain data availability. This provides applications with options for TPS performance validation levels while still being interoperable with non-custodial ZK rollup technology. zkSync's groundbreaking zkPorter mechanism is a volition system worth watching.
Image source: Matter Labs
4. zkEVM as the Holy Grail of scaling
Consider how the architecture of ZK rollups includes two main components: on-chain Ethereum smart contracts that receive and track L2 block data, and an off-chain virtual machine (VM) that serves as the execution environment for Ethereum-based transactions.
Thus, zkEVM is a ZK rollup that is compatible with the Ethereum Virtual Machine (EVM), i.e., the execution environment of Ethereum L1.
Illustration of Polygon zkEVM's general scaling approach
At the beginning of the Ethereum scaling race, optimistic rollups like Arbitrum and Optimism had a significant advantage because this style of rollups was initially easier to be EVM-compatible or even fully equivalent. This technical affinity allowed applications to easily port their code and use their favorite tools to migrate from L1 to L2, which is a great UX.
In contrast, the characteristics of ZK-based scaling mean that ZK rollups start with a custom VM, which means that projects thus require more extensive work to "interpret" code from EVM or to write new code from scratch. However, as of March 2023, several ZK rollup projects are now clearly on the verge of announcing their own zkEVM implementations!
Therefore, the arrival of zkEVM represents a significant step forward in Vitalik Buterin's 2021 prediction that "in the medium to long term, as technology improves, ZK rollups will win out in all use cases." With the use of cryptographic proofs, ZK rollups have built-in privacy and security advantages over optimistic rollups, so when you add EVM compatibility to the mix, ZK rollups have the potential to surpass optimistic rollups in the future.
5. Ongoing competition between Type 1 and Type 2 zkEVMs
The term "scaling wars" refers to the friendly, informal competition that occurs between teams of optimistic rollups and ZK rollups to provide the best possible blockchain scaling solutions.
However, within the realm of ZK rollups itself, there is another race, an informal competition to see which team can achieve the first "Type 1" and "Type 2" zkEVM as defined by Vitalik Buterin.
Buterin's zkEVM types
In an August 2022 blog post, Buterin provided a way to measure the capabilities of zkEVM projects by proposing a ranking system from Type 1 to Type 4. Type 1 zkEVM would be fully equivalent to EVM and could even be used to upgrade Ethereum itself, while Type 4 zkEVM would only be compatible with certain Ethereum applications.
That said, due to all the work involved, Type 1 zkEVM implementations will still take some time, but there are now several projects working on Type 2 zkEVM.
Current major zkEVM efforts | Source: Immutable X
For example, Polygon zkEVM is a Type 3 zkEVM and is becoming a Type 2 zkEVM, which is an EVM equivalent with some additional nuances. Scroll is another notable team currently building a Type 2 zkEVM. In contrast, zkSync Era (formerly known as zkSync 2.0) is a stubbornly intentional Type 4 zkEVM, enhanced by custom features and the impressive willpower functionality of zkPorter. Accordingly, the possibilities here are wide open.
6. The dawn of a new blockchain UX era
One day, Ethereum itself may upgrade to a Type 1 zkEVM for further on-chain scaling. Meanwhile, as a potential upgrade complement, external zkEVMs from Type 2 to Type 4 will continue to thrive, providing developers and users with unique customizations and UX enhancements that Ethereum L1 cannot achieve.
In summary, the ultimate goal of the ZK rollup space (or arguably the entire L2 space) is zkEVM, and the first of these efforts is on the horizon. 2023 will be the year that everyday cryptocurrency users will be able to try zkEVM for the first time, so if you want to get involved, keep a close eye on Polygon, zkSync, Starknet, and Scroll, as the latest scaling progress from these teams is being put into practice!