ZKsync protocol overview

Learn about ZK Rollups

ZKsync is a protocol designed to enable the creation of a network of interoperable zero-knowledge (ZK) L2 rollups and validiums built with ZKsync Stack. This document offers an overview of the protocol’s architecture, focusing on how its modular design supports the development of multiple interconnected chains. Together, these chains enhance Ethereum’s scalability, security, and usability without compromising on decentralization.

What is a Rollup?

A rollup is a blockchain scalability solution that processes and stores transaction data off-chain while ensuring the data's integrity and availability on the main chain. By doing so, rollups significantly increase transaction throughput without compromising security. There are primarily two types of rollups: Optimistic Rollups and Zero-Knowledge (zk) Rollups. ZKsync Chains utilize the latter, leveraging cryptographic proofs for security and efficiency.

How and why it works?

Ethereum's decentralized network has limited transaction throughput because its capacity doesn't scale with the number of validators. In essence, each validator performs the same job of validating each processed transaction, creating a bottleneck. In contrast, in Web2 scalability improves with the addition of more servers, as the network's capacity to handle requests increases linearly with each new server.

The concept of a rollup addresses the blockchain scalability issue by moving computation off-chain and only sending the result of these computations back to Ethereum. ZK rollups, in particular, submit a validity proof alongside the execution result, making the validation of a zk proof significantly cheaper than re-executing each transaction.

The Data Availability (DA) Problem

A crucial aspect of ensuring the integrity and security of rollups is addressing the Data Availability (DA) problem. If the state of the rollup is unknown to observers of Ethereum, then in scenarios where the validators (centralized or decentralized) stop processing, it becomes impossible to make state transitions without relying on a trusted validator. However, if the data is always available to observers, it's feasible to restore the state and continue processing the network even if the trusted validator ceases its operation. This link provides further details on the Data Availability problem: Ethereum Data Availability.

ZK proof

Zero-Knowledge Proofs (ZKPs) offer a method to execute verifiable programs, wherein it's cheap to verify a zk proof on-chain. In the context of ZKsync, ZKPs allow for the confirmation of the correctness of transaction execution without re-executing them.

ZKsync components

ZKsync protocol consists of the following critical components:

  • Node Implementation: This component is responsible for receiving transactions from users and processing them. It maintains the off-chain state and handles the aggregation of transactions into batches as well as sends sealed batches onchain.
  • ZK Circuits: These circuits are intricate mathematical constructs that represent verifiable computation logic. They are responsible for determining what can be verified as a valid proof. Specifically for ZKsync, these circuits define the computation rules for EraVM execution, which also defines how transactions are executed.
  • Prover: The prover constructs the cryptographic proofs that attest to the correctness of the transactions processed off-chain. These proofs can be verified later on Ethereum, ensuring that only valid transactions are accepted.
  • Smart Contracts: These contracts are the on-chain component of the zkRollup. They are responsible for verifying the proofs submitted by the prover and updating the Ethereum blockchain's state accordingly. Additionally, they facilitate interactions between Ethereum and ZKsync, such as deposits, withdrawals, and cross-layer messaging.

ZKsync components.png

For additional context or insights, consider exploring these resources:

The ZKsync Chain

The ZKsync Chain is the continuation of Ethereum's rollup centric roadmap. Ethereum provides security via DA and verification of proofs, but the question of execution is left to the rollups. In order to have the best UX, it is necessary to solve interoperability and the free flow of assets between chains. We do this via the Shared Bridge Contract on L1 which stores Ether and ERC20 tokens for all ZKsync Chains (implementing custom bridges is still possible). With Shared Bridge, the chains are able to trust each other due to the fact that they are managed by the same STM contract, using the same VM and proof system.


Made with ❤️ by the ZKsync Community