Why zkSync’s ZK Stack series (Part 2): Trustless and Privacy with Validium

Why zkSync’s ZK Stack series (Part 2): Trustless and Privacy with Validium

It’s perfectly normal to want to keep some things in life private, like your winning trades. 

Traders at GRVT can access this benefit with our use of Validium, an advanced scaling solution that combines trustless operations and privacy benefits. By building with zkSync’s modular ZK Stack, we are able to incorporate this Layer 2 solution to offer some key advantages:

  • Ability to operate an off-chain order book and on-chain matching engine 
  • Data privacy
  • Cost-effective transactions 

Previously in Part 1 of our “Why zkSync’s ZK Stack” series, we explored GRVT’s solution to reduce latency using zkSync’s modular framework. 

In Part 2, we will touch on how using Validium through the ZK Stack will unlock sophisticated self-custodial trading capabilities on GRVT. 

What is Validium?

Validium is a scaling solution that improves transaction throughput using off-chain data availability (DA) and computation. To verify off-chain transactions, it leverages zero-knowledge (ZK) proofs. The key aim is to enhance Ethereum’s scalability, privacy, and security. 

Using Layer 2 solutions connected to the Ethereum main chain, Validium processes transactions independently. It bundles transactions into batches, generating ZK-proofs for validation and ensuring correct off-chain updates. To generate zk proofs, Validium employs either ZK-STARKs or ZK-SNARKs.  

Similar to ZK rollups, Validium sends proofs to Ethereum. However, it takes transaction data off chain. Validium also does not commit its data back to Layer 1 as a rollup does, although the chain state remains 100% valid - unknown by external observers. This approach reduces pressure on the Ethereum mainnet, resulting in higher scalability and cheaper gas fees.

Thus, users can enjoy faster confirmation times when transferring large asset volumes. As it eliminates the need to verify each transaction individually, Validium also helps reduce gas fees by minimizing computational overhead. 

Data Availability Options in the ZK Stack

zkSync Era offers developers the flexibility to choose from three DA options, using a unified proving infrastructure. Builders can customize their choices, balancing price, performance, and security according to their preferences. 

A hyperchain on zkSync can manage its DA policy using a smart contract interface, choosing from the options below or some more complex logic:

  1. ZK-Rollup: for Ethereum-level security (ideal for DeFi)
  2. Validium: for ultimate performance with slightly reduced security compared to Ethereum (suitable for a wide range of use cases)
  3. zkPorter (also known as Volition): for a blend of on-chain and off-chain data, optimizing for cost, speed, and security (suitable for gaming)

ZK Stack’s modular approach enables developers to deploy custom chains that are fully interoperable with other hyperchains. Including Validium allows ZK Stack builders to efficiently store data for a large number of transactions with cost-effective computation. 

How GRVT integrates Validium with the ZK Stack

In validium mode, any hyperchain automatically achieves privacy from the outside world - provided that the operator keeps block data confidential. This is a suitable choice for enterprise platforms, such as GRVT, which seek both auditability and privacy. 

Using the ZK Stack in fully validium mode, GRVT is able to bring self-custodial trading, data confidentiality, and scalability to our platform. 

Building a Self-Custodial CEX

GRVT incorporates Validium for secure user fund management. Our hybrid exchange model can be regarded as what Ethereum founder Vitalik Buterin calls a cryptographically “constrained” CEX. 

User funds and balance information are held in a validium smart contract. If a validium’s operator encounters issues, users may not be able to withdraw their funds to the Ethereum main chain. The solution? A Data Availability Committee (DAC) mechanism with large entities storing copies of state, ensuring users can access data for withdrawals through ways like Merkle proofs.

Similar to a consortium chain, this approach is less decentralized. GRVT has opted for this design in order to safeguard user assets, eliminating concerns about a bank-run scenario seen in past industry events. 

GRVT identifies as a non- or self-custodial CEX within this spectrum (Credit: Vitalik Buterin)

Besides self-custody trading, GRVT also adds multiple security layers at the wallet level. They include centralized recovery options, such as two-factor authentication and password. This is ideal for users dealing with a small amount of funds as well as institutions requiring such arrangements for legal reasons. 

Shielding Trade Strategies and Confidential Data

Building with the ZK Stack on validium mode allows GRVT to:

  1. Hide trading strategies: Validium helps store transaction data off-chain, keeping your trade executions private - a crucial requirement for institutional traders.
  2. Protect data with KYC/AML procedures: Validium allows identity checks, KYC, and onboarding flows to take place off-chain so personal data remains private. 
  3. Prevent unwanted scrutiny: Validium uses ZK-proofs to ensure the integrity and validity of transactions without revealing any of the underlying data to prying eyes. 

Simply put, Validium helps GRVT prevent predatory price action by keeping sensitive information, such as margin balances and liquidations, under wraps.

Powering Efficient and Gas-free Trades

By building with ZK Stack in validium mode, GRVT’s Central Limit Order Book (CLOB) can deploy a robust matching engine capable of processing 600,000 transactions per second (TPS). This ensures that GRVT can withstand periods of high volume and volatility, guaranteeing efficient order fulfillment and liquidations.

Such approach goes beyond safeguarding GRVT and traders from potential losses in market fluctuations. It also promotes responsible and sustainable trading in the crypto derivatives space. On top of that, the use of Validium helps facilitate gas-free transactions. This means that GRVT traders will not have to be concerned about paying gas fees on canceled orders.

What’s next in the ZK Stack

Through zkSync’s modular ZK Stack, our developers can continue to employ robust distributed DA systems while building in Validium mode. The integration of Validium represents a major leap to create a user-friendly experience in crypto derivatives trading for all kinds of users. Vitalik himself believes that Validium is the right choice for many applications and with more developments in DA guarantee systems, its security can be improved. 

As such, the innovation continues. The zkSync team is building more toolings and capabilities in the ZK Stack. Eventually, all hyperchains like GRVT could share users and liquidity in the zkSync ecosystem. The result - more cost-effective transactions through recursive proofs and shared proofs with other hyperchains. 

In the next part of our “Why zkSync’s ZK Stack” series, we will delve into customizable interoperability with hyperchains. 

Get the latest updates directly to your inbox.