Skip to main content

What is ZKCross?

ZKCross is a modular development framework based on WASM, aiming to facilitate specific L2 dApp chain developement. It provides developers with a comprehensive stack for creating zk-provable dApps, unlocking new opportunities for swift experimentation and innovation.

ZKCross brings significant benefits to developers as below:

  • Multi-language support: ZKCross lowers the barriers for Web2 developers to entering Web3 by allowing them to use mainstream languages they are familiar with like Rust, C++, and JavaScript to build applications.
  • Zk-provable dApp by default: By using the stack provided by ZKCross, developers can build zk-provable dApps easily, focusing more on the innovation with their applications, without needing to understand the underlying zero knowledge technology.
  • Modular and composable: ZKCross is designed to be modular and extensible, enabling developers to conveniently select the components they wish to incorporate into their dApps, including settlement layer, data availability layer, and even zk-prover.
  • WASM ecosystem integration: ZKCross seamlessly integrates with the well-established WASM ecosystem, providing developers with a stable and trusted framework widely recognized and utilized across various platforms.

Using WASM as runtime

ZKCross leverages WASM as the runtime environment, allowing for easy compilation and execution of various programming languages. Developers can use their preferred languages like Rust, C++, JavaScript and Solidity to build applications. The application logic code, regardless of the programming language, is compiled into WASM and executed in a WASM runtime.

WASM is a compact and fast-loading binary format that fully leverages hardware capabilities to achieve native execution efficiency -- it can even handle complex execution tasks like image processing or gaming. Traditional methods may require multiple compilations, whereas WASM needs to be compiled only once to run, offering plug-and-play functionality. WASM will for sure bring powerful computing capabilities to Web3, opening up possibilities for next generation of dApps.

Using zkWASM as prover

A zero-knowledge virtual machine (zkVM) is a virtual execution environment that can run programs and generate zero-knowledge proofs for each step of a program to ensure its correctness.

To put it simply, zkWASM is a zkVM that supports WASM. It is first developed by Delphinus lab and open-sourced. zkWASM enables the WASM runtime to offer trustless and provable computation for any program running within it. In essence, zkWASM merges the benefits of zero-knowledge proofs and WebAssembly: providing verifiable computations along with multi-language support.

The entire WASM virtual machine is embedded into ZK circuits, allowing existing WASM applications to run on zkWASM with minimal modifications. Using zkWASM as a virtual machine to build a L2 dApp chain guarantees several key advantages:

  • First, developers can flexibly write smart contract code in various languages such as Rust, C++, and Go, rather than being limited to Solidity.

  • Second, the integration with the existing WASM ecosystem means that a vast array of tools and libraries can be leveraged, accelerating development and fostering innovation.

  • Third, it significantly enhances performance and scalability. By processing transactions off-chain and verifying them on-chain, zkWASM reduces the load on the main blockchain, leading to faster transaction times and lower fees for dApps.

Using ZKC Node as hub

Sitting at the core, the ZKC Node is a versatile hub connecting each component. The ZKC Node encompasses a SDK with standard interfaces for integrating with various Web3 services like data availability (DA), settlement layer, and state services. Additionally, it offers standard API functions such as Jubjub signature, Poseidon hash, and random number generation for dApps to utilize.

The Node's key roles involve executing WASM binary code compiled from dApp logic code, processing zero-knowledge proofs generated by the prover service, and then posting them to the settlement layer. Besides, it is also in charge of saving transaction data into the DA service.