Unpacking the ZK Stack: A Deep Dive into zkSync’s Vision for Scaling Ethereum

Yong kang Chia
3 min readMar 26, 2024

--

Introduction

In this article, we will summarize and explain the basics of the ZK Stack, a vision from the team behind the zkSync chain (MatterLabs). However, we will not delve deep into a detailed analysis of zkSync’s history, features, architecture, etc.

zkSync: The New Era of Ethereum

zkSync is a revolutionary protocol that harnesses the power of Zero-Knowledge Proofs to massively scale Ethereum. Not only does it support low gas transfers of ETH and ERC20 tokens, but its recent version, zkSync Era, takes this even further by supporting full contract execution. This is all made possible through the zkEVM, a powerful set of tools created to compile contracts and ensure their correct execution, achieving an impressive 99% compatibility with the Ethereum Virtual Machine (EVM).

ZK Stack Components

Hyperchains

The primary component of the ZK Stack, Hyperchains, are user-created ZK Layer 2 and Layer 3 chains based on zkSync Era. These Hyperchains enable the hyperscaling of the ecosystem.

  • Era will remain as an actively maintained pioneer chain.
  • Custom user chains will be able to pick from a set of prebuilt building blocks or implement their own, except the zkEVM itself. This ensures all Hyperchains are interoperable without any additional trust assumptions.
  • Hyperchains will be able to permissionlessly join and exit the ecosystem]. This allows the stack to grow organically without any limitation or direct involvement from first parties (e.g., MatterLabs).

Hyperbridges

Hyperbridges are critical for the interoperability of these chains. They are a smart contracts system verifying transactions happening in different chains. By sharing a common bridge from Layer 1 to Layer 2, all Hyperchains share a common verifiable source of truth. Relayers handle bridging, burning, and minting assets to be used at the destination chain.

Prover

A “prover” is an essential component responsible for generating zero-knowledge proofs. These proofs allow a blockchain to verify that a batch of transactions is valid without revealing the individual transaction details, ensuring privacy and reducing the amount of data that needs to be stored on the main chain (Layer 1).

A significant scalability concern is the reliance on a shared Layer 1 state containing the proofs for all chains.

If every chain writes directly to Layer 1, the load on Layer 1 is proportional to the number of chains.

The ZK Stack proposes a shared prover that aggregates proofs and verifies them together. This is an optional path for Hyperchains, which could still choose to communicate with Layer 1 directly.

Sequencer

The sequencer is a key aspect of Layer 2s, aggregating operations and producing blocks for the chain.

The ZK Stack proposes alternatives for each Hyperchain to choose what fits best:

  • Centralized sequencer: simplest and fastest form, with a single operator that needs to be trusted.
  • Decentralized sequencer: a network of operators would run a consensus algorithm (e.g., Tendermint) and produce blocks this way.
  • Priority queue: no sequencer, just adding operations to a queue in a lower layer.
  • External protocol: Hyperchains would also be free to implement their own sequencing solution.

Data Availability (DA)

Several options are proposed for where the underlying data lives:

  • zkRollup: default and current output mode for Era, where data is published as calldata on Layer 1.
  • zkPorter: an alternative layer to store data off-chain, meant to be an alternative until EIP-4844 is available, and potentially after.
  • Validium: data is stored centrally off-chain, requiring trust in the operator as a negative, but with the added privacy of keeping the data private.

--

--

Yong kang Chia

Blockchain Developer. Chainlink Ex Spartan Group, Ex Netherminds