Introducing zkLink Nexus — Ethereum’s First Multi-ZK-Rollup L3 Trading Layer

zk.Link
zkLinkBlog
Published in
14 min readNov 16, 2023

--

Offering both hyper-scalability and native interoperability across multiple ZK-Rollups, zkLink Nexus delivers a production-ready and highly-customizable unified trading layer for the Ethereum ecosystem.

  • Layer 3s (L3s) are a third blockchain layer built on top of Ethereum Layer 2 Rollups (L2s), delivering higher scale, lower gas costs, and more app-specific customizability.
  • zkLink’s ‘Nexus’ L3 platform is a multi-ZK-Rollup trading layer focused on aggregating liquidity across L2 zkEVMs and zkVMs, for dApps that require a highly customizable trading execution environment on Ethereum.
  • Some of the unique features of zkLink Nexus include Adaptive Liquidity Rebalancing (for dynamic rebalancing of assets across networks), Customizable Data Availability (allowing various options for data storage and availability), MARPV (a gas-efficient proof verification technology), and TS-DSL (a trading-focused programming language).

1. Introducing zkLink Nexus

The blockchain industry is witnessing a surge of innovation in the field of zero-knowledge technology.

Numerous general purpose ZK-Rollup L2 networks are rapidly developing, with frontrunners of zkEVMs including Linea, zkSync, Scroll, and Polygon zkEVM, and zkVMs represented by StarkNet, etc.

This exciting progress has validated zkLink’s original idea from early 2021 to use ZK technology to unify blockchain networks and liquidity across multiple chains and rollups. It now presents the opportunity for zkLink to build a unified multi-ZK-Rollup L3 trading layer, which we call zkLink Nexus.

zkLink Nexus is designed to bridge the gap among different ZK-Rollup L2 ecosystems and reduce liquidity fragmentation. It also enhances performance and brings down the cost for trading dApps, while making zero security compromises, by inheriting the security characteristics from Ethereum.

2. Unique Features

With the arrival of zkLink Nexus, come a number of innovative features that not only boost the system’s efficiency and functionality but also ensure a smoother and more secure user experience:

  • Security Inherited From Ethereum, via zk-SNARKs

zkLink Nexus is an L3 rollup based on zk-SNARKs. It connects to multiple general purpose ZK-Rollup L2s and strictly inherits the security of Ethereum with ZK-Proofs. No security compromise is made in the design.

  • Adaptive Liquidity Rebalancing

Funds within Ethereum and its ZK-Rollup L2s have the capability to dynamically select their routing paths. This allows for rebalancing of assets across multiple networks, promoting more flexible and efficient fund flows.

  • Developer-Friendly Interface

zkLink offers trading-focused developers a comprehensive SDK, greatly simplifying the complexity of developing on the zkLink platform. The API SDK allows developers to build their dApp without needing to understand the intricate concepts of zkLink’s underlying zero-knowledge proofs. Furthermore, the JS SDK enables developers to easily connect with various L2 platforms, avoiding the complexities that come with dealing with different technical platforms.

  • Cross L3 Composability

Transactions across different zkLink L3s will be composable, allowing token transfer from one zkLink Rollup instance to another.

  • Efficient Proof Systems Without Trusted Setup

zkLink actively participates in the development of several innovative new proof systems, making a faster, more cost-effective solution that operates without a trusted setup.

  • Multi-Application Recursive Proof Verification (MARPV)

zkLink Nexus introduces Multi-Application Recursive Proof Verification (MARPV) technology, ensuring the correctness of off-chain states while significantly reducing on-chain verification times and gas expenses.

  • Trading-Specific Domain-Specific Language (TS-DSL)

zkLink Nexus will provide a Trading-Specific Domain-Specific Language (TS-DSL), a programming language designed specifically for financial trading strategies and operations.

3. Benefits For Developers

3.1. Zero security compromises: All of Ethereum’s security guarantees

zkLink Nexus strictly inherits the security of Ethereum, which is fully reflected in its design.

Figure 1: Security inheritance of zkLink Nexus

zkLink Nexus is a ZK-Rollup system based on zk-SNARKs. zkLink Nexus posts zero-knowledge proofs to the connected L2s, where there are verifier contracts deployed to verify the states and transactions posted.

This ZK-Rollup structure ensures that zkLink Nexus can fully inherit the security of the underlying L2s.

At the same time, the L2 zkEVMs and zkVMs also utilize ZK-Proof technology to verify its transactions and states on Ethereum. Through this progressive verification mechanism, zkLink Nexus establishes a solid security frontline. From Ethereum to L2 zkEVMs and zkVMs, and then to zkLink Nexus, every step is guarded by ZK-Proof technology, ensuring the security of the entire system.

3.2. Deposit fraud prevention: Multi-chain trading infra security challenge

The main challenge of building a trading layer natively deployed across various networks is the risk of deposit fraud. In architectures involving multiple chains or rollups, each chain will still be isolated; they cannot directly perceive the states of each other.

When the funds or transaction information from these chains need to converge within zkLink’s unified layer, the potential for deposit fraud emerges. A bad validator may falsely inform one chain about a fake deposit on another chain, e.g., the validator may inform the zkSync contract about a 100 USDT deposit on StarkNet which may not exist, and this 100 USDT can buy tokens from zkSync. In such scenarios, without effective verification mechanisms, there could lead to significant financial losses of user funds.

The challenge centers on guaranteeing the consistency of multi-chain states. In a distributed system, ensuring that all chains maintain a uniform state is crucial. As long as the state roots of zkLink on all chains are consistent, the deposit information between them can be assured to be true and accurate.

Therefore, we can say that the issue of deposit fraud is fundamentally a matter of state consistency. To address this issue, we need a verification mechanism that is both fast and secure, ensuring all chains stay synchronized, and no one can alter or falsify information.

zkLink Nexus: Achieving multi-chain states synchronization via Ethereum

First of all, all networks connected with zkLink Nexus have to be a ZK-Rollup network deployed on Ethereum, which ensures all participants inherit the security of Ethereum.

Secondly, all connected L2s will post their zkLink state root to the Ethereum contract, as shown in the figure below. The monitoring contract deployed on Ethereum will then check whether all the state roots uploaded by the L2s are consistent. If they are, confirmation messages will be sent to the contract on each of the ZK-Rollup L2s through the official bridge channel of these ZK-Rollup L2s.

This design effectively enables each rollup to cross-verify its state root via the Ethereum contract, ensuring the state consistency.

Figure 2: State Consistency Check Process

3.3. Unified Liquidity and Aggregated Assets

As a multi-ZK-Rollup L3 trading layer, one of the most important missions of zkLink Nexus is to combine the fragmented liquidity silos across the Ethereum L2 ecosystems.

Unified liquidity refers to the process of consolidating liquidity from different sources to create a more streamlined and efficient market environment.

Here’s a breakdown of how unified liquidity works in the context provided:

Token Merge

On zkLink Nexus, tokens issued by the same entity but on different networks, for example, USDC on Ethereum, zkSync, or StarkNet, etc., are all merged into a single USDC token. It is the same for ETH on different L2s.

By combining the fragmented liquidity of the same asset existing on different chains and rollups, not only is asset management simplified, but also transactions and trading processes.

Figure 3: Liquidity Aggregation

Multi-Rollup Token Listing and Trading

Asset aggregation allows for the listing of a variety of tokens from different blockchains, including fungible tokens (FTs) and non-fungible tokens (NFTs). This feature enables users to trade tokens across various chains, enhancing the fluidity and accessibility of different tokens. The unique aspect of this model is the avoidance of bridges or other intermediary systems usually required for cross-chain interactions.

Multi-Rollup Token Portfolio Management

Another notable feature of asset aggregation is the provision of a unified wallet. Users can manage their portfolios across multiple networks using just one wallet, mirroring the convenience and simplicity found in centralized exchanges.

The user convenience offered by asset aggregation is unparalleled. It provides a simplified, unified interface allowing developers to manage and trade assets across different blockchains, significantly improving the user experience.

Deeper Liquidity, and More Trading Pairs than a Single Rollup L3

Compared to other L3 solutions that are deployed on a single L2 rollup, zkLink Nexus offers higher flexibility. This flexibility not only provides more options for clients but also enhances the system’s liquidity aggregation capability. It can support more types of coins, providing users with more trading pair choices. Both mainstream and emerging coins can find their trading pairs on zkLink Nexus, meaning users can achieve better trading depth and a wider range of trading pair selections through zkLink Nexus.

The network deployment choice feature of zkLink Nexus brings unprecedented flexibility and customization capabilities to the entire blockchain ecosystem that both clients and users can benefit from.

3.4. Fast and Flexible Integration

In the current blockchain realm, flexibility and customization capabilities have become key competitive advantages. zkLink Nexus recognizes this and thus has specifically emphasized flexibility in the design of its network.

Customized Network Selection

zkLink Nexus’s network selection feature allows clients to choose the most suitable rollup combinations according to their business needs and target demographics. This means that whether a client’s business is targeting the mass market or specific niche markets, they can find the most appropriate network deployment solutions.

Highly Modular Architecture with Customizable Data Availability (DA)

zkLink Nexus is designed with a highly modular architectural framework, ensuring not only the system’s stability and scalability, but also providing enhanced flexibility by allowing clients to autonomously define their target network collection based on specific requirements.

A pivotal part of this architecture is its customizable Data Availability (DA), which offers various options for data storage and availability:

  • It can store data on Ethereum via calldata;
  • It might employ Validium, which can operate on-chain, on L2s, Eigenlayer, or Celestia, but not on Ethereum;
  • Alternatively, it can leverage an off-chain data committee, utilizing IPFS or other decentralized storage solutions.

3.5. Optimized Costs

Adaptive Liquidity Rebalancing

In a multi-rollup environment, managing the liquidity of funds has emerged as a challenge. zkLink Nexus, through the implementation of Adaptive Liquidity Rebalancing, enables funds originating from Ethereum to dynamically select their routing paths among ZK-Rollup L2s. This not only assists in rebalancing assets across various chains but also propels a more flexible and efficient flow of funds.

From the user’s perspective, all these changes are transparent, with no difference in experience. However, behind the scenes, due to the ability to leverage fund jumping on L2s, the platform’s costs are substantially reduced. This means that while enjoying the conveniences brought by Ethereum liquidity, the platform does not have to bear excessive costs.

This mechanism of adaptive liquidity rebalancing not only optimizes the efficiency of fund utilization but also achieves significant cost savings while ensuring user experience.

ZK-Proofs on a single chain, mathematically equals ZK-Proofs on multiple chains

Leveraging the convenience of secure channels, zkLink Nexus opts for conducting ZK-Proof verification on just one zkVM L2, which mathematically equates to performing the same verification across multiple L2s. The reduction in verification instances directly implies a cost reduction, simplifying operations while retaining the robust security and verifiability of transactions across multiple chains.

Multi-Application Recursive Proof Verification (MARPV)

In zkLink Nexus, we have introduced an innovative technology called Multiple Application Recursive Proof Verification (MARPV). The core idea of this technology is to leverage the ability of recursive zero-knowledge proofs to consolidate multiple on-chain verifications that multiple applications would originally require into a single verification. This not only ensures the correctness of off-chain states but also significantly reduces on-chain gas costs.

The working principle of MARPV involves recursively processing zk-SNARK proofs from multiple applications to generate a comprehensive zk-SNARK proof. Subsequently, this comprehensive zk-SNARK proof is submitted to the blockchain for verification. This approach not only improves verification efficiency but also greatly reduces the number of on-chain transactions, thereby saving a substantial amount of gas costs.

Figure 4: Multi-Application Recursive Proof Verification (MARPV)

3.6. Enhanced Performance: TPS to the Thousands

zkLink Nexus has not only made advancements in security and cost effectiveness but also has undergone deep optimization in performance to ensure faster and more efficient services for users. Below are the key performance enhancement measures we have implemented in Nexus:

  • Adopting Poseidon Hash to Replace Rescue Hash: In Nexus, we have chosen Poseidon Hash as the primary hash function, replacing the previous Rescue Hash. Known for its excellent performance and security, Poseidon Hash enables faster hash computations for circuits, thus greatly enhancing overall performance.
  • Massive Refactoring and Optimization of Circuit Executors: To further improve the execution efficiency of circuits, we have undertaken extensive refactoring and optimization. Specifically, the operations on the state tree have been deeply optimized, making them more efficient and stable. At the same time, we have also streamlined the complexity of circuit instructions to ensure smoother and quicker execution of circuits.
  • Enhancing Parallel Processing Capability: Nexus has also innovated in processing, especially in the generation of Merkle proofs, where we have realized parallel processing. This means that multiple operations can be carried out simultaneously, significantly accelerating the generation of witnesses, ensuring that Nexus remains efficient and stable while processing a large number of transactions.
  • Efficient Proof Systems Without Trusted Setup: zkLink actively participates in the development of several innovative new proof systems, making a faster, more cost-effective solution that operates without a trusted setup.

Through the above series of optimization measures, the circuit execution efficiency of zkLink Nexus has improved by an order-of-magnitude, bringing users an unprecedented high-performance experience.

3.7. Trading focused programming language: TS-DSL

zkLink Nexus will come with Trading-Specific Domain-Specific Language (TS-DSL), a language designed specifically for financial trading strategies and operations. A notable feature of this DSL is that its instructions are implemented using zero-knowledge proof technology. This not only greatly enhances the execution efficiency and reliability of trades but also ensures the security of each transaction.

The main advantage of TS-DSL is that it can provide a high level of abstraction. Because of this feature, TS-DSL can save more proof resources, making transactions more “cost-effective”. This is because high levels of abstraction mean a reduction in the complexity of the underlying computations and proofs.

Additionally, the design of TS-DSL pays particular attention to flexibility. The scenarios for strategy trades are diverse and extremely complex. If there isn’t a set of fundamental instructions to support them, implementing these complex strategy trades in circuits would be costly. zkLink’s DSL provides such a basic instruction set, making strategic trades more flexible and cost-effective.

Furthermore, the composability of TS-DSL is also one of its primary attractions. Developers can flexibly combine various instructions according to their needs, thus easily implementing complex trading strategies such as grid trading, momentum strategies, and so forth.

3.8 Cross-Rollup Composability

Different zkLink rollups can achieve a degree of composability since zkLink supports further recursive zero-knowledge proofs between different rollups, ensuring the correctness of cross-rollup transactions.

4. Protocol Architecture

4.1. Key Components of the Protocol

  1. zkLink Rollup Contract: Responsible for handling deposit and withdrawal requests, with an identical contract deployed on each chain.
  2. Verify Contract: Deployed on a selected L2, this component is tasked with the verification of zero-knowledge proofs.
  3. Recursive ZK Verify Contract: The Recursive ZK Verify Contract plays a pivotal role in zkLink, especially when dealing with multiple rollup contracts. It is engineered to perform additional recursive verifications, serving two primary functions:
  • Minimization of On-Chain Verifications: It strategically reduces the number of zero-knowledge proof verifications conducted on-chain, optimizing resource utilization.
  • Cross-Rollup Transaction Verification: It ensures the accuracy and integrity of transactions across different rollups by validating the correctness of cross-rollup transactions through further recursive zero-knowledge proofs.

4.2. Protocol Workflow

Figure 5: Protocol Workflow

  1. Dapp: Offers products to users and generates transaction data.
  2. Sequencer: Manages transaction ordering and submits data to the chain and Validator.
  3. Validator: Responsible for generating and managing tasks for Provers and producing ZK-Proofs:
  • Role and Responsibilities: The Validator emerges as a crucial component within the zkLink protocol, tasked with orchestrating provers, generating witnesses for them, accepting the proofs they generate, and subsequently, uploading these proofs to the chain.
  • Decision-Making and Coordination: The Validator is entrusted with making pivotal decisions and coordinating the network’s operational mode, which encompasses:
  • Decision on Recursive Levels: Determining whether to engage in multi-level recursion.
  • Cross-Rollup Transaction Management: Identifying and managing the existence of cross-rollup transactions between rollups.
  • Proof Generation and Aggregation Management: Overseeing the speed at which zero-knowledge proofs are generated and managing the extent of off-chain aggregation to ensure seamless and efficient network operations.

4.3. System Structure

zkLink Nexus is a meticulously designed L3 protocol, consisting of several critical components across the entire system.

Figure 6: System Structure

Let’s explore the main components of the system:

  1. Executor and Prover: These crucial elements of the zkLink protocol are responsible for executing transactions and generating zero-knowledge proofs for them.
  2. Chain Adapter: Tasked with transmitting transactions to the chain and monitoring on-chain events, the Chain Adapter is pivotal in the multi-chain protocol of zkLink. We’ve invested substantial effort into ensuring compatibility with various protocols, significantly streamlining multi-chain transaction management for developers.
  3. SDK Module: zkLink offers a comprehensive SDK, facilitating swift integration for developers using any programming language.
  4. RPC Service: Providing stable and high-performance RPC services, zkLink supports both private and public deployments, catering maximally to developer needs.
  5. Social Login Wallet: zkLink introduces a Social Login Wallet based on MPC technology.
  6. Data Service: zkLink provides not only a block explorer for viewing transaction details but also offers detailed and professional data analysis services.
  7. Broker Service:
  • zkJump: Operating as an independent project, zkJump orchestrates market-based multi-chain liquidity rebalancing for various DApps. Specifically, it incentivizes users to actively adjust multi-chain liquidity.
  • Fast Withdrawal: This module primarily facilitates fast withdrawals. zkLink will host an open broker market, allowing any third-party funds to access the fast withdrawal acceptance system.

Each component is deployed with precision, collaboratively contributing to the protocol’s overarching objective: delivering an optimized, seamless, and robust platform. Every component plays a decisive role in maintaining the integrity and functionality of the system.

5. Future Outlook

With the launch of zkLink Nexus, we anticipate that decentralized trading applications deployed on zkLink Nexus will provide services to users with a significant cost reduction compared to building directly on L2s. This, in turn, will increase profits and enhance the user experience.

While we recognize the potential benefits, we are also keenly aware of upcoming challenges. As the expense for on-chain verification plummets, the computational costs associated with zero-knowledge proofs will become an increasingly significant proportion of the total cost.

Future efforts will focus on tracking updates, iterations, and enhancements in the zero-knowledge proof system and intensifying the optimization of its computations. zkLink is developing its next-generation proof system based on SuperNova, mainly for two reasons: development efficiency and proving efficiency. As zkLink is an app-specific ZK-Rollup, in terms of development efficiency, we are most concerned about the implementation of the NIVC (Non-uniform Incrementally Verifiable Computation) feature. When it comes to proving efficiency, we believe the Folding Scheme is currently the best choice.

--

--

The First Aggregated Layer 3 Rollup for High Performance ZK Applications