zkSync vs StarkWare — What’s the difference between the top two ZK Rollups?
We compare zkSync and StarkNet — two prominent ZK-rollups scaling the Ethereum network. What are ZK-Rollups? How are zkSync and StarkNet different? What are SNARKs and STARKs? We answer these questions and more while also exploring each protocol’s respective roadmaps and ecosystems.
Table of Contents
- Zero-Knowledge Rollups
- ZK vs. Optimistic Rollups
- zkSync vs. StarkNet
- SNARKs vs. STARKs
- EVM Compatability
- Ecosystem Comparison
- Development Roadmap
- Closing Thoughts
To get the most out of this article, you should have a solid understanding of blockchain fundamentals and Layer-2 scaling. Having prior knowledge of Optimistic rollups and zero-knowledge proofs is also highly encouraged.
zkSync and StarkNet are two of the largest Layer-two (L2) solutions that utilize ZK rollup technology to scale the Ethereum network. Upon finishing this article, you’ll understand how ZK rollups function and learn the key differences in how zkSync and StarkNet apply this technology. Beyond that, you’ll get an overview of zkSync and StarkNet’s ecosystems and their respective development roadmaps.
Before we cover ZK-rollups, let’s refresh: what are zero-knowledge proofs (ZKP)? And how are they used in rollups? In cryptography, a zero-knowledge proof or protocol is a method by which one party (the prover) can prove to another party (the verifier) that a given statement is true while avoiding disclosure of additional information beyond the fact the statement is true.
In the case of ZK-rollups, a sequencer node batches hundreds of rollup chain transactions, generate a SNARK or STARK proof (more on them later), and then posts these transactions to Layer-1. These proofs, known as validity proofs, cryptographically validate the transactions before their state gets posted to the Ethereum Mainnet.
Optimistic vs. ZK Rollups
ZKPs allow ZK-rollups to have a negligible fund withdrawal delay plus a higher level of security compared to Optimistic rollups, as you don’t need to wait for the fraud-proof window to close or rely on the honesty of transaction validators.
Besides those advantages, ZK-rollups also have the potential to enable private transactions in future iterations. Projects like Zcash and Aztec Network have implemented ZK-proof enabled privacy features, and zkSync has openly stated its intent to make their transactions private future.
ZK-rollups have the advantage in theoretical transactions-per-second (TPS) cap, transaction finality time, and security over Optimistic rollups. However, they fall behind in EVM compatibility (which we will explore later). These traits of ZK-rollups lead Vitalik Buterin to believe that in the short term, Optimistic rollups will likely be superior in general-purpose EVM computation. But in the medium to long term, ZK-rollups will win out in all use cases as the technology improves.
zkSync vs. StarkNet
Now that you have an intuitive understanding of how ZK-rollups work, we can begin comparing zkSync and StarkNet. But first, let’s quickly summarize them.
zkSync V1 is a SNARK proof rollup protocol released by MatterLabs to the Ethereum Mainnet in June 2020. MatterLabs released zkSync V2, the first EVM-compatible ZK-rollup, on the Ethereum Testnet in February 2022.
StarkNet is a STARK proof rollup protocol released on the Ethereum Testnet in November 2021 by StarkWare Ltd. The protocol, at the time in Alpha version 0.4.0, was released to Mainnet later the same month.
One key difference between zkSync and StarkNet is that they utilize different proofing protocols, called SNARKs (Succinct Non-Interactive ARgument of Knowledge) and STARKs (Scalable Transparent ARguments of Knowledge).
SNARKs vs. STARKs
The fundamental differences between SNARK and STARK proofs lie in their setup procedure, scalability, and quantum computer attack resistance.
ZK-SNARKs must undergo a trusted setup phase where a small group of developers must be trusted to not manipulate code or divulge vulnerability information. This setup only needs to be done once and isn’t a significant security risk but nonetheless undermines its decentralization.
ZK-STARKs, on the other hand, use publicly verifiable randomness to create trustless verifiable systems, removing the need for a trusted setup. STARKs are also currently quantum resilient, whereas SNARKs have the possibility of being cryptographically cracked by a quantum computer attack.
Finally, ZK-STARKs are also more scalable in computational speed and size than ZK-SNARKs, with potential proving speed increases of 10x. However, ZK-STARKs’ one present downside is that the technology is not very mature, which limits its generalizability.
So, because they utilize two different proofing methods, zkSync and StarkNet differ in their EVM compatibility. zkSync V2 claims to be 99% EVM compatible with Solidity and Vyper needing to first compile to Yul, an intermediate language, before compiling down to zkEVM bytecode through LLVM. Additionally, zkSync supports their ZKP optimized Rust-like language, Zinc, which compiles directly to bytecode using LLVM. However, Zinc is currently not Turing complete, and its development has halted since September 2021 due to zkSync’s focus on Solidity compatibility.
StarkNet, on the other hand, is not currently developing for EVM compatibility. To deploy smart contracts on StarkNet, developers need to learn Cairo, a programming language built for STARK provable programs by StarkWare. Alternatively, smart contract developers can also opt to convert their Solidity code to Cairo using Warp, a transpiler developed by NetherindEth. Although there are still a number of Solidity features not supported by the transpiler and are far from matching the EVM compatibility of zkSync V2.
StarkNet vs. StarkEx
You may have heard of StarkEx, StarkWare’s other premier technology. StarkEx is not a ZK-rollup, but instead is a customizable Layer-2 SaaS (Software as a Service) that uses STARK proofs to provide massive scaling for applications.
An easy way to not confuse the two is to remember a few key points:
- StarkNet is a general purpose rollup chain. StarkEx is a toolkit made specifically for applications.
- StarkNet scales Ethereum. StarkEx scales decentralized exchanges.
- StarkNet allows interoperability between DApps but StarkEx does not.
The differences between the two are important to understand because while it’s common for DApps using StarkEx to be included in the StarkNet ecosystem, metrics like TVL are completely separate.
Now we’ll look at StarkNet and zkSync respective ecosystems and see how they compare. A graphical comparison can be found below.
zkSync’s (V1 & V2) TVL, as of writing on July 12th, 2022, is $57M. The entire protocol is also 100% open source and their Github repo currently has 1.4k stars and 350+ forks. Their infrastructure is built mainly in Rust and Typescript. There are 112 DApps currently building on zkSync, with ten live on Mainnet. Some notable projects live on zkSync include Zigzag, a non-custodial order book exchange, and Argent a DeFi and Web3 smart wallet.
StarkNet’s TVL is currently around $635K with 78 DApps being built and only a few live on Mainnet. Unlike other prominent rollup protocols, StarkNet is currently closed source and its infrastructure is built with Cairo. Some notable protocols on StarkNet include ArgentX, Argent’s Web3 wallet built for StarkNet, and Orbiter Finance, a decentralized cross-rollup bridge.
When comparing their social media presence, zkSync has the slightly larger of the two with almost ~87K more followers on Twitter and comparable member counts on Discord and Telegram.
As you can see, both zkSync and StarkNet’s ecosystems are far less mature than the ecosystems of Optimistic rollup protocols like Optimism and Arbitrum. However, both zkSync and StarkNet have strong user and developer communities, promising future growth.
In the short term, zkSync’s next major leap following their Testnet launch will be their V2 Alpha Mainnet release, currently without an anticipated release date. zkSync’s long-term plans include full decentralization, a zkSync Token Airdrop, and implementing privacy-protected smart contracts. As a part of their decentralization plans, their future token will be for staking in order to become a validator on the zkSync network.
StarkWare’s short-term goal is to upgrade their Alpha Mainnet, prepping for a stable release. Their long-term goals are threefold: to establish usability, improve performance, and decentralize.
StarkWare feels they have accomplished their first goal of establishing usability and are presently focusing their development on throughput, transaction cost, and latency. StarkWare also recently released their decentralization proposal, containing an announcement for a StarkNet token Airdrop, planned for September 2022. StarkNet’s token will be for system governance, transaction fee payments, and participation in StarkNet’s consensus mechanism.
By this point, we have covered how ZK rollups function, why they are implemented, and how they compare to Optimistic rollups. We also answered the question, what’s the differences between zkSync and StarkNet? We did this by examining their ZK-SNARK versus ZK-STARK proofing methods and respective levels of EVM compatibility. Finally, we got a high-level snapshot of both protocols’ ecosystems and roadmaps. Hopefully, this knowledge can serve as more fuel for your journey down the Layer-2 rabbit hole.