Introducing the ZK Stack

Your framework for building modular, sovereign, ZK Chains

zkSync
Matter Labs

--

Last week, we shared the initial draft of the ZK Credo: a declaration of the foundational principles for ZK technology and values to reshape the internet. This document articulates the key properties that we hold necessary for decentralized blockchain networks to embrace to serve as a foundation for the emerging Internet of Value — harnessing the power of ZK.

Today, we’re excited to share our extended vision of fulfilling this mission: the ZK Stack, a modular framework for building sovereign ZK-powered chains.

The ZK Stack at a glance

  • Free: The ZK Stack is developed under fully permissive MIT/Apache open-source licenses, ensuring its availability at no cost, and we strongly encourage you to contribute and utilize it as you see fit.
  • Composable: ZK Chains built with the ZK Stack can seamlessly connect in a trustless network, boasting low latency and shared liquidity.
  • Modular: Customize and shape every aspect of your ZK Chain, from the choice of sequencer and data availability mode to defining your own tokenomics.
  • Battle-tested: zkSync Era stands as the most widely adopted ZK rollup on Ethereum, as evidenced by the considerable transaction in TVL and transaction volume. With this track record, the ZK Stack is a safe bet with regard to security and reliability.
  • Future-proof: ZK rollups are the future of Ethereum scaling. To harness the full potential of ZK’s superpowers, it is crucial to build the right architecture from the very beginning.

What is the ZK Stack?

The ZK Stack represents our response to the challenges outlined in the ZK Credo. Since there are currently no solutions that fully match the required properties, we felt compelled to create one and give it to the community.

The ZK Stack is a modular, open-source framework that is both free and designed to build custom ZK-powered L2s and L3s (referred to as ZK Chains), based on the code of zkSync Era.

At its core, the ZK Stack offers two key features: sovereignty with seamless connectivity. The creator (you) possesses full rights to the code and enjoys unrestricted autonomy to customize and shape every aspect of the chain. ZK Chains operate independently, relying solely on Ethereum L1 for their liveness and security, while a network of Hyperbridges facilitates the interconnection of every ZK Chain, enabling trustless, fast (within minutes), and cheap (cost of a single transaction) interoperability.

Leading the charge in this hyperscalable unified liquidity network is zkSync Era, serving as the pioneering ZK Chain.

The ZK Stack is also a significant paradigm shift for the zkSync core team. Until this point, we’ve been laser-focused on building the most advanced ZK technology as fast as possible, culminating to the launch and adoption of zkSync Era — the first EVM-compatible ZK rollup — in record time. However, as the saying goes, ‘…if we want to go far, go together.’ Our current priority is assisting numerous teams in comprehending and contributing to the ZK Stack. As more ZK Chains launch, the number of core contributors will grow, and the community will emerge as the true owners of the zkSync network, empowering it to safeguard the ethos and values enshrined within the ZK Credo.

Who is the ZK Stack for?

The ZK Stack isn’t intended for everyone. If you’re building a generic DeFi dapp or an NFT project, deploying it on an existing ZK Chain such as zkSync Era will be a more straightforward process, granting you synchronous composability with other protocols in the ecosystem, enabling things like flash-loans.

However, you might prefer building your own ZK Chain on the ZK Stack under two circumstances:

  1. When you require tailored customization for your chain.
  2. When you are comfortable with asynchronous connectivity to the broader ecosystem.

Examples (not exhaustive):

  • If you’re building a game or a social network and require a lightweight sequencer unburdened by other dapps and use-cases.
  • For those building an exchange appchain with a strong emphasis on low-latency sequencing (think dYdX).
  • Banks or enterprises seeking a closed private chain while remaining interconnected with the rest of the ecosystem.
  • If your goal is to build a network of applications capable of interacting with each other, free from the trust assumptions inherent in x-chain bridges and at minimal cost.
  • For scenarios where your use-case is closely tied to a token and you intend to utilize it as the base token of the system.

Why ZK Stack?

The short answer: it’s future-proof.

One can’t build a Zeppelin and replace its propellers with a turbofan engine.

One can’t lay a narrow gauge railway and launch a bullet train on it.

One can’t build a Gasometer and then use as a high-pressure LNG terminal.

Every fundamental technological shift requires a redesign and adaptation of all aspects of the system to harness the full potential of that technology. If you don’t put this knowledge in from the start, it will be very hard to take advantage of it later. Eventually, you will need to migrate, negating all the network effects accumulated on the old technology.

ZK tech unlocks unique superpowers that are not possible with existing non-ZK solutions. Leveraging these superpowers requires the courage to innovate and chart new paths, which is exactly what we have been doing with zkSync Era.

Here are a few noteworthy examples:

  • Magical UX: The ZK Stack boasts the only native Account Abstraction in the current L2 landscape. Its design benefits from the gas-less calldata in our ZK-enabled architecture.
  • Compression: Thanks to the succinctness property of ZK proofs, certain transaction types (such as oracle updates) will be 1,000 times cheaper on the ZK Stack compared to other rollup platforms.
  • Ultra-low cost: In addition to the ZK rollup mode, where ZK Chain accounts fully inherit Ethereum’s security, the ZK Stack enables the optional extension with extremely affordable zkPorter accounts for the appropriate use cases.

We are starting a series of technical deep-dives, where we will explain the rationale and details of the ZK Stack architecture. To foster profound and fruitful discussions, we will cover the principles from the ZK Credo one by one. Today, our focus will be on the topic that signifies the most outstanding value proposition of the ZK Stack: Hyperscalability.

Hyperscalability

The ZK Stack allows you to build your own sovereign ZK Chains without sacrificing interoperability and composability.

Each ZK Chain seamlessly integrates into our limitlessly scalable ecosystem, powered by shared provers and fractal scaling, thereby fostering an unfragmented liquidity network. Within this ecosystem, users can swiftly transfer their assets (within minutes), in a trustless manner, and without incurring any additional costs across the ZK Chain ecosystem via Hyperbridges. Smart contracts will call each other asynchronously cross-chain. The ZK Chains themselves will be sovereign, enabling them to join alternative ecosystems and take their assets with them if they choose to leave.

Read more about ZK Chains

How to get started

In the coming weeks, we will be implementing modifications to our codebase to make it easier to checkout, configure, and deploy an instance of the ZK Stack. Our ultimate goal is a one-click deploy!

If you are a developer interested in getting involved today, we encourage you to reach out and assist us in expediting our progress towards this goal.

Explore zkSync Era docs: https://era.zksync.io/docs/

We are currently assisting several pilot projects in adopting the ZK Stack, which will allow us to gather feedback and improve the developer experience. If you wish to be part of this cohort, please email us at zkstack@matterlabs.com.

--

--