# Nexus Zero: A Decentralized Zero-Knowledge Cloud Computing Network

We introduce Nexus Zero, a decentralized zero-knowledge cloud computing network.

## Introduction

We introduce Nexus Zero, a decentralized zero-knowledge cloud computing network developed by Nexus Labs.

Nexus Zero allows developers to program their own Zero-Knowledge Cloud Functions (or zk-Functions), which can be programmed in traditional languages (e.g. Rust, Go, C++) and verified succinctly within an EVM-compatible blockchain or browser environment.

Nexus Zero is a decentralized marketplace for general-purpose verifiable cloud computing using zk-SNARKs. It is comprised of three core technologies our team has been developing:

1. A von-Neumann SNARK-based zkVM: A general-purpose SNARK-based zkVM with von Neumann architecture, allowing users to compute traditional programs that target the Berkeley RISC-V ISA.
2. A permissionless prover network: A decentralized marketplace of permissionless provers, allowing mobile and desktop users to participate in proof generation from their local devices.
3. A decentralized market-making engine: Instantiated as a PoS-based Nexus Cloud using the Nexus Network. Importantly, the Nexus Cloud serves for market-making and synchronizing provers, but cannot adversely affect the liveness or safety guarantees of zk-Functions, as it simply serves to make the market more efficient.

## Decentralized Zero-Knowledge Cloud Functions

zk-Functions are general-purpose stateless cloud programs that execute within Nexus' von Neumann zkVM. They can be written in traditional languages, with starting support for Rust.

Importantly, Nexus zk-Functions allow smart contracts to outsource computation to a decentralized network of off-chain zero-knowledge provers.

Due to the Nexus Zero zkVM's von Neumann architecture, zk-Functions can run traditional deterministic programs, and so can be used to compute heavy floating-point arithmetic, cryptographic operations and, in general, any computation (within some enforced bounds).

## The Nexus Zero von Neumann zkVM

The Nexus Zero zkVM is a Universal Turing Machine with a traditional von Neumann architecture designed for the open-source Berkley RISC-V ISA.

The Nexus Zero zkVM uses a universal circuit generator. That is, one does not need to know the program before hand, and instead can prove any program by taking its encoding $\langle \mathcal{M} \rangle$ as input. The universal generator only needs to set an upper bound on the running time of the programs to generate the universal circuit.

In particular, this means one doesn't need to deploy a different circuit for each different program, but instead one can deploy a single instance of the verifier and prove any arbitrary computation (within the specified upper bound on the running time).

## Example zk-Function

The Nexus Zero zkVM currently supports Rust programs. Writing a zk-Function feels like writing any other program for a WebAssembly target:

#[nexus_zero::main]
fn main() -> Vec<i32> {
// Use Rust's std library as in any rust program
let mut vec = Vec::from([1, 2, 3]);

for num in &mut vec {
*num += 1;
}

vec
}



Even more, Rust programs executed within the Nexus' zkVM have access to a local sandboxed POSIX-like filesystem:

use std::io::prelude::*;
use std::fs;

#[nexus_zero]
fn main() {
// Access a sandboxed filesystem
let mut file = fs::File::create("/text/helloworld.txt").unwrap();

// Write the text to the file we created
write!(file, "Hello world!\n").unwrap();
}


The zkVM is designed to make zk-Function development indistinguishable from the traditional cloud computing developer experience.

In fact, using the Nexus SDK and Nexus Zero SDK, we expect developers to be able to write a single Rust program, and decide whether to deploy it on the Nexus Network (as a WASM binary) or on Nexus Zero (as a zkVM binary).

## Nexus Zero and The Nexus Network

The Nexus Network is a decentralized cloud computing network developed by Nexus Labs, which uses state-machine-replication and multi-party-computation to realize verifiable cloud computing.

Nexus Zero is the zero-knowledge counterpart of Nexus, achieving verifiablity through zk-SNARKs.

Network Technology Name Safety Ethereum-security State
Nexus Zero zero-knowledge proofs zk-Functions perfect safety Inherits Stateless
Nexus Network multi-party-computation Decentralized Cloud Functions t-of-N-safety (threshold) Does not inherit Stateful

The Nexus Network is designed to replicate the computation of any WASM binary. In particular, Nexus can be used to replicate zkVM proof-generation. Combining Nexus with Nexus Zero's zkVM gives applications both safety (from zero-knowledge proofs) and liveness (from state-machine-replication).

## Hyperscaling Ethereum with Off-Chain Compute

Proofs generated with the Nexus zkVM can be verified within any EVM-compatible execution layer. This will allow Ethereum (and Layer-2) smart-contracts to off-load computation to the cloud and enjoy much higher computational capabilities without sacrificing security.

Nexus Zero will be available on all mayor EVM-compatible Layer-1 and Layer-2 platforms. It represents the next step in Nexus Labs’ roadmap for achieving general-purpose decentralized verifiable cloud computing. We will release more details and news in the coming future.