zkSync: Guide to Ethereum Scaling 

Vance Wood

Vance Wood

September 14, 2023

29 分鐘閱讀

article cover

Zero-Knowledge (ZK) rollups have been a hot area of research in light of their potential to optimize speeds of operations within the Ethereum network. For many years, the practical implementation of the technology was considered unattainable seeing the state of the blockchain technology. However, the launch of zkSync Era powered by zkEVM determined the bright future for Layer-2 scaling solutions.

In this article, we unpack what is zkSync, why it matters, and look at a few projects already harnessing the protocol.

zkSync: Highlights

The Ethereum community has long been working on a scalability strategy that would solve the problem of soaring fees and inefficient transaction processing speeds, where zkSync has its own place.

  • Rollups also referred to as Layer-2 chains are a primary technology for scaling Ethereum. They fully rely on the main chain and are secured by its consensus;
  • zkSync is one of the rollups that perform intensive computation operations involved in Ethereum smart contracts without using Layer-1 resources;
  • The blockchain relies on zk-proof technology to compress transactions in a single one that is then sent to the Ethereum main chain for verification;
  • The gas fees become negligible since processing costs are split across many transactions included in a batch;
  • zkSync has not yet announced the base token launch while the roadmap points out this possibility.

Rollups including zkSync are considered the most feasible way of making Ethereum highly usable. Let’s further discover the whys and hows.

The quest for scalability: Ethereum's approach

The entire history of blockchain has been faced with the question of scalability in two aspects: a) expanding the market cap by increasing the value of the underlying asset, and b) increasing transaction throughput, i.e. solving the issue of a limited number of transactions per second (TPS).

For Ethereum, however, the latter is of utmost importance. The decentralized finance (DeFi) space is predominantly powered by ETH-based protocols with around $600m of value transacted daily, not to mention the demand for NFTs. And yet, the network is having some trouble keeping up.

DEXs_Volume_by_Chain

Image from DeFi Llama

Nodes that write to the Ethereum main chain and validate operations are by design only capable of processing around 15 TPS, which seems outrageously low to serve this traffic. Besides, the inflow of transactions intensifies competition for block space, which in turn results in higher fees.

Therefore, unsustainable gas fees, slow confirmation times, and overall issues with scaling cause complications for Ethereum on the way to meet the ever-growing demand. Turns out rollups can tweak the narrative.

Introduction to Rollups

Back in 2020, Vitalik Buterin, the co-founder of Ethereum, put out a rollup-centric roadmap. According to his vision, all the work that ETH nodes have to do to process transactions one by one is delegated to rollups that have a lot of computational power to execute them and return to Ethereum.

Ethereum will eventually become a foundation (Layer-1) to settle up the Layer-2 chains that enhance the capacity of the network to process more transactions. Additionally, this approach will remove the gas costs of performing operations directly on L1 while Ethereum smart contracts still act as validators.

What is zkSync?

The very first zero-knowledge-based rollup on Ethereum has been in the works by Matter Labs since 2019 and resulted in two implementations:

2020: zkSync 1.0, a prototype version later rebranded to zkSync Lite, successfully implemented the ZK-rollup model and was primarily used for simple payments.

2023: After a public testnet launch in 2022 and a mainnet release for select projects (Fair Onboarding Alpha), the 2.0 version now known as zkSync Era goes live and opens up for all developers and users. The second version is more advanced as it adds EVM compatibility and smart contract support by introducing zkEVM.

zkSync_Roadmap

Image by @ETH_Daily via Twitter

ZkSync Era is a Layer-2 blockchain built on top of Ethereum and designed to inherit its security while reducing the costs of transactions and enhancing the speeds relying on ZK-rollups technology.

How does zkSync work?

If simplified, the process of the rollup interacting with Ethereum will look as follows:

  1. A large sequence of transactions submitted to the rollup are bundled into the smallest possible packet of information fitting into a single ETH transaction;
  2. The rollup stores the detailed data “in-house” while sending the compressed version of the transaction to Layer-1 along with the proof that all is checked and valid;
  3. The data is then validated by Ethereum and settled on-chain.
How_ZK_Rollups_Process_Transactions

Image by Messari

The process is seamless for an end user and yet, by adopting this solution, zkSync moves most of the computational load off-chain, leaving the base layer to only verify the end results of transactions.

Since the data is compressed, how can we make sure the transactions are credible? Time to unveil what is running at the backend that makes it possible.

Let’s decode the ZK part

Zero-Knowledge (ZK) is a new field of cryptographic proofs, where one party, the prover, can show another party, the verifier, that calculations are done correctly without showing how exactly it was done. zkSync uses specifically the zk-SNARK method.

In other words, the math behind Zero-Knowledge Proofs allows the network to prove the legitimacy of transactions without having to reveal the underlying data. The concept is as complicated as it sounds (like PhD level complicated). The main takeaway from here is that the proof itself gets verified extremely quickly to enable super-cheap and fast transaction finalities.

N.B. There are a few projects that are using the technology. While we focus on zkSync in this article, feel free to check out other ZK Rollup Projects leading the narrative in 2023.

Data storage

One of the reasons why zkSync performs significantly faster than the underlying layer is the storage of data off-chain via Merkle Trees.

How_Merkle_Trees_Work

Image by Matter Labs

Merkle Tree is a cryptographic tool that is intended to consolidate large chunks of data into a single hash. This one hash, called the Merkle Root, sums up all the data and can be decoded back to a detailed path. zkSync saves a huge amount of processing power by relaying only the Merkle Root to Ethereum instead of the details the tree structure encompasses.

The major milestone: zkEVM

Ethereum Virtual Machine (EVM) powers the eponymous chain by providing instructions that implement smart contracts. What it does is it basically allows running programs or dApps on top of Ethereum. By default, smart contracts created on zero-knowledge systems are incompatible with EVM.

To solve the issue, Matter Labs developed zkEVM, a revolutionary EVM-compatible framework scalable under ZK conditions. The new virtual machine converges ZK-rollup functionalities and ETH infrastructure to work jointly and allow developers to build Solidity, Viper, or Yul smart contracts directly on zkSync Era or move EVM-compatible dApps to the low-fee environment of rollups.

zkSync: More tools and use cases

Apart from the evident perks of using L2s, zkSync provides some extra features that crypto enthusiasts may find helpful.

Account abstraction

zkSync Era comes integrated with the native account abstraction feature, where users can configure wallets to perform more than send-receive functionality. For example, turning it into a smart-contract wallet or adding a multi-signature feature and alternative seed-phrase recovery options. The same tooling makes it possible to use any ZK-supported crypto of choice to pay gas fees instead of ETH.

Privacy-preserving functionality

Since ZK Proofs are designed to decide on the correctness of transaction batches without revealing detailed information about each address, zkSync has a nice prerequisite to enable private transactions. While this update is included in the roadmap, it is not yet the main priority for Matter Labs.

Airdrop use case

Sending transactions in bundles comes in handy for distributing airdrop rewards to thousands of users at significantly lower fees, as the ETH gas fee gets split up between included operations.

These nice add-ons can potentially improve the rollup user experience. Besides, the protocol is developing at unhinged velocities so we definitely expect more updates.

Optimistic vs. ZK rollups

Unlike zkSync, two other popular Layer-2s Optimism and Arbitrum stick to optimistic-rollup architecture. While the latter also moves execution and storage off-chain, the process of publishing transactions to the core chain differs.

ZK Proofs can instantly guarantee the legitimacy of operations; in the case of Optimistic rollups all transactions are assumed valid by default. However, if anyone disagrees with transactions they can submit Fraud Proof to dispute it. This is tied to longer times of withdrawal as the system needs to ensure no dispute arises before the operation is finalized.

For a more detailed explanation, consult the video comparing the two types by DeFi Teller: https://youtu.be/qV6YbuWhDXM?si=Ub8h6XIqZ6ddkhX8

How does zkSync advance crypto user experience

The guide will not be complete if we do not reveal the pros and cons of using this Layer-2. Let’s start with advantages:

  • Instant finality: Computation moved off-chain removes the bandwidth constraints of Ethereum, which enables moving assets much faster and cheaper. According to general estimations, zkSync users can expect up to 100x improvement compared to how many transactions ETH can process today.
  • Optimized gas fees: As less of the blockchain’s capacity is used for transaction validation, gas fees also decrease.
  • The more transactions, the cheaper it gets: Generating proofs costs a fixed amount of gas regardless of how many transactions are included in one bundle. Therefore fees imposed by the underlying chain get shared between all the addresses.
  • Composability: Thanks to zkEVM, developers are welcome to deploy smart contracts on zkSync the same way it is done on Layer-1 but in a cheaper manner.
  • Preserving security: The data submitted to Layer-2 is still committed to Ethereum and verified on Layer-1 to provide top-tier ETH-level security.

It should also be considered that ZK-rollups use sophisticated mathematics that is fraught with some challenges and limitations. To give an example, as of now the computation on zkSync is done via centralized servers to ensure the highest speeds. However, in the long run, Matter Labs plans to decentralize provers and hand the power over to the community.

Additionally, proof generation being a complex process requires efficient hardware, which designates that not every supporter of scaling can afford to participate in the process.

Potential zkSync airdrop: Basics

The zkSync Era blockchain is not currently backed by a native token. In an interview with The Block, the co-founder of Matter Labs Alex Gluchowski admitted that the zkSync token is the necessary milestone for delivering the decentralization phase of the roadmap. According to Glukhovsky's estimations, this process could take up to a year.

On this account, crypto enthusiasts can expect the zkSync airdrop, especially considering that the blockchain’s main competitors Optimism, Arbitrum, and StarkNet have already announced their tokens.

Top-3 zkSync dApps

Despite the Era mainnet being open to the general public for only five months, the ecosystem is growing rapidly. According to the official website, there are currently around 200 dApps building on zkSync Era or moving under the rollup hood. Let's quickly cover three of them.

  1. Velocore

A DEX that has a lending market to allow users to access various DeF services within the ecosystem to trade tokens efficiently without the high gas fees associated with Ethereum's mainnet.

Velocore_Main_Page

Image from Velocore

  1. Bungee

The app helps to bridge tokens from any EVM chain to zkSync Era. The Gas Refuel option allows depositing native gas tokens on the source chain and receiving equivalent gas on the destination chain.

Bungee_DEX_Main

Image from Bungee

  1. zkApes

Gaming dApps and NFT marketplaces could leverage rollups to create a more seamless and affordable experience for users interested in digital collectibles and in-game assets.

zkApes, the platform centered around the metaverse, opens access to minting and trading NFTs in exchange for ERC-20 tokens as well as using them for gaming. There is also an explorer that aggregates zk-based non-fungible tokens in one place.

zkApes_Website

Image by zkApe

Conclusion: The Future of zkSync

ZK-rollups are becoming increasingly popular among developers and investors looking for cheaper and speedier transaction processing. We’re witnessing the very early stages of Layer 2 rising but their impact is already undeniable.

Thanks to ZK and Optimistic rollups, we’ll soon have all of the block space we need. If you’re planning to populate this block space with dApps, GetBlock has RPC node endpoints to over 50 chains for every developer need.

Sign up to GetBlock, get your API key, and start building applications that interact with Ethereum and Layer-2s: https://account.getblock.io/

Have you checked our affiliate program yet? Partner with us and earn generous commissions for every user you refer to our blockchain infrastructure services: https://getblock.io/affiliate-program/

常问问题

  • What is zkSync and how does it help with Ethereum scaling?

    plus
  • What is the zkSync Token (ZKS) and what are its use cases?

    plus
  • What is ZkEVM and what is its role in zkSync?

    plus
  • What’s next for zkSync and its ecosystem?

    plus
Vance Wood

Vance Wood

September 14, 2023

29 分鐘閱讀

twittertwittertelegramtelegramLinkedinLinkedin