What is zkSync?

Dj2y...ncJb
13 Jan 2024
40


Ethereum’s scalability solution is a highly competitive sector within the crypto industry. Arbitrum and Optimism are two of the recent layer 2 projects that have captured significant amounts of market share in Ethereum. Additionally, zero-knowledge tech for Ethereum scaling solutions has been picking up steam since late 2022. This eventually turns into a race for implementing and adapting ZK tech in Ethereum. Several big projects such as Scroll, Polygon, and ConsenSys are looking to create their own ZK technology for Ethereum. One of those projects is zkSync. zkSync is trying to create an EVM-compatible zero-knowledge solution for Ethereum. So, what is zkSync? How does it work and what makes it unique compared to other zk-based projects? This article will explain it further.

Article Summary

  • 📱 zkSync Era is an Ethereum layer-2 scaling solution utilizing ZK-rollup technology for enhanced speed, cost-efficiency, and security in transactions.
  • ⚙️ The zkEVM, an integral part of zkSync Era, is a virtual machine compatible with Ethereum’s EVM, allowing developers to create ZK-compatible smart contracts using Solidity.
  • 🧠 zkSync Era offers unique features such as native account abstraction, privacy and speed through ZK-rollup, Ethereum-level security, and EVM compatibility.
  • 🌉 zkSync Era aims to bridge the gap between ZK-based ecosystems and the Ethereum L1 network, simplifying the development process while maintaining high performance and security.

What is zkSync?

zkSync is a layer-2 (L2) scaling solution for Ethereum that utilizes the zero-knowledge rollup (ZK-rollup) technology. The technology enables faster and cheaper transactions while providing users with the safety of the Ethereum network. The team at Matter Labs is the developer of the zkSync ecosystem. Initially, zkSync launched its zkSync 1.0 platform in June 2020. However, zkSync 1.0 doesn’t support smart contracts. The second iteration “zkSync 2.0” was later launched in late 2022 with a 2023 full mainnet in mind.
In February 2023, Matter Labs rebrand its entire products with zkSync 2.0 changing its name to zkSync Era and 1.0 to zkSync Lite. This rebrand also coincides with zkSync Era Fair Onboarding Alpha where projects and developers can test and try the network. Furthermore, zkSync Era now focuses on creating an EVM-compatible ZK tech called zkEVM. This article will mainly focus on zkSync Era because of its zkEVM tech.

Matter Labs is one of the earliest projects to create a prototype for a ZK-based Ethereum scaling solution.

zkEVM is a virtual machine that supports zero-knowledge proof computation that is inherently compatible with Ethereum’s EVM. It is an implementation of ZK tech to scale Ethereum smart contracts. With this, zkSync will be suitable for Zero-Knowledge-Proof (ZKP) computations and existing Ethereum infrastructure. Developers can also write ZK-compatible smart contracts in the traditional EVM Solidity language.
zkEVM explanation from zkSync Chief Product Officer, Steve Newcomb. Source: Bankless
Many experts in the crypto space consider zkEVM as the pinnacle of Ethereum scaling because it combines ZK-rollup capability with EVM compatibility. For this, zkSync strives to create the best zkEVM among its competitors.

zkSync Founders and Investors

zkSync investors. Source: zkSync.
Alex Vlasov and Alex Gluchowski are the founders of Matter Labs, the team behind zkSync. zkSync was one of the first crypto companies to build the prototype for ZK-rollup in 2019. Since then, it has received hundreds of millions of dollars in funding. The latest was a $200 million Series C round led by Blockchain Capital and Dragonfly Capital. So, this brings the total financing of zkSync to $458 million.

How Does zkSync Work?

The foundation of zkSync Era is ZK-rollup. ZK-rollup is a layer 2 scaling solution for Ethereum using zero-knowledge-proofs. The fundamental difference between ZK-rollups and Optimistic rollups (Arbitrum and Optimism) is the way the Ethereum network verifies and stores the data. ZK-rollups are more efficient, less gas intensive, and require less storage than the standard rollups. In addition, zero-knowledge technology inherently protects users’ private information.
So, transactions in zkSync Era are ‘rolled up’ into batches to be verified by the Ethereum mainnet. The Ethereum network only needs to verify a ZKP as proof of validity for an entire batch of transactions. The difficulty in a ZK network is creating an efficient ZKP that does not require an enormous amount of computational power. This is the reason why ZK networks often undergo a rigorous amount of R&D before launching their mainnet. Matter Labs needs to ensure that the gas price and speed of its network are comparable and even surpass the current L2.
Read more on what is a layer 2 crypto project in Pintu Academy.
Thus this is why zkSync Era chooses SNARK as a proof-generation method. ZK-SNARK is cheaper and requires less storage compared to its STARK cousin. Additionally, SNARK is the more developed of the two and so developers are more familiar with it.
One of the pain points of the current implementation of ZK technology is its incompatibility with Ethereum’s framework and virtual machine (VM). ZK-based smart contracts cannot use Ethereum’s EVM and framework. This obstacle works both ways as Ethereum smart contracts cannot migrate to a ZK network. So, developers must choose between creating ZK-based applications or using the framework from Ethereum. This is why a zkEVM is so important to the growth and adoption of ZK tech.
We have written a deep dive into zero-knowledge technology and how it works.

Why zkEVM?

zkEVM is a virtual machine compatible with EVM and can support zero-knowledge proof calculations. This solution was created to overcome the ZK-rollup bottleneck for developers of DApps. As previously mentioned, ZK-based smart contracts are incompatible with the Ethereum framework and VM.
All smart contract in ZK-rollup uses a specific language (such as R1CS). These not only have complicated language syntax but also demand strong expertise in zero-knowledge networks. In addition, these languages are incompatible with EVM. There are two ways to handle this problem which are to create new programming languages specific for zkEVM or implement all EVM codes to be compatible with ZK tech. The second method is the hardest but most compatible with EVM.
So, with zkEVM, developers can write ZK-based smart contracts using Ethereum programming languages such as Solidity and Vyper. Developers of current Ethereum DApps can also migrate to the ZK-rollup network. This will remove friction between the ZK-based ecosystem and the Ethereum L1 network. However, creating zkEVM is extremely difficult as you need to combine two separate systems that are inherently different.

Other projects developing zkEVM layer 2 solutions are Polygon, Scroll, STARKNet, and ConsenSys.

zkSync and Vitalik’s Four Types of zkEVM Compatibility

Vitalik Buterin lay out the different types of zkEVM based on its compatibility with EVM. Source: msfew.eth.

  • Type 1: Fully Ethereum-Equivalent. Fully compatible with all Ethereum DApps but slowest proving time for ZKP.
  • Type 2: Fully EVM-Equivalent. Fully compatible with existing Ethereum DApps but makes minor modifications so proving time is still slow.
  • Type 3: Almost EVM-Equivalent. Most Ethereum applications will work but some will need to be rewritten. Proving time is faster than Type 1 and 2.
  • Type 4: High-Level-Language Equivalent. Match the high-level language such as Solidity or Vyper and compile that for zero-knowledge proofs. Fastest proving time but sacrifice compatibility so developers need to rewrite EVM-specific codes.

zkSync Era falls into the category of type 4 with their LLVM compiler for EVM languages (Solidity, Vyper, Yul). zkSync Era specifically mentions that they are striving for the best performance while making some sacrifices in the EVM-equivalence department. So, developers familiar with Ethereum native language can still easily write for zkSync since the language is still the same. The drawback is that Ethereum DApps must spend some time rewriting codes.

What Makes zkSync Unique?

  • Native account abstraction: zkSync Era comes with a native account abstraction that upgrades the traditional externally owned accounts (EOAs) like MetaMask users to smart contract accounts (CAs). This unlocks an infinite amount of possibilities like no seed phrases, batching multiple operations together, and automating payments.
  • Privacy and speed of ZK-rollup: The foundation of zkSync is its ZK-rollup technology. A ZK-rollup combines a natively privacy-preserving network with fast transaction processing.
  • Ethereum-level security: A ZK-rollup layer 2 takes advantage of Ethereum as its base layer. So, zkSync Era relies on Ethereum for security against hacks and network-wide attacks.
  • EVM compatibility: zkSync Era’s main value proposition is its EVM compatibility with zkEVM. zkEVM enables ZK-based smart contracts to be compatible with Ethereum’s EVM. After a basic learning curve, developers can easily build in zkSync Era using Ethereum native programming language like Solidity.

Conclusion

In conclusion, zkSync is an Ethereum layer-2 scaling solution that employs ZK-rollup technology to enable faster, cheaper, and more secure transactions. The team at Matter Labs has developed zkSync Era (formerly zkSync 2.0) as the latest iteration focusing on zkEVM technology. The zkEVM is a virtual machine that supports zero-knowledge proof computation while being compatible with Ethereum’s EVM, allowing developers to write ZK-compatible smart contracts using traditional EVM languages such as Solidity. zkSync Era offers a unique combination of native account abstraction, privacy and speed of ZK-rollup, Ethereum-level security, and EVM compatibility, making it a promising solution for Ethereum scaling and ZK-based smart contract development.

Get fast shipping, movies & more with Amazon Prime

Start free trial

Enjoy this blog? Subscribe to Natiq1951

0 Comments