A0 Labs

A0 Labs Bunny

What are We Trying

A0 Labs is an effort to bringing Rust and Zero-Knowledge, primarily through Zero-Knowledge Virtual Machines (ZKVMs), to the AO Network.

Our goal is to extend and enhance the developer experience and capabilities of the AO Network with the next generation of cryptographic and programming solutions.

What is a ZKVM?

A Zero-Knowledge Virtual Machine (ZKVM) is a computational environment designed to execute programs while generating zero-knowledge proofs to verify the correctness of computations without revealing underlying data.

ZKVMs enable secure, scalable execution of complex applications, supporting tasks like smart contract execution, data processing, and cryptographic operations with guaranteed integrity.

How a ZKVM Works

A Zero-Knowledge Virtual Machine (ZKVM) executes a program and generates a zero-knowledge proof to verify computation correctness without revealing inputs or intermediate states.

  • Program Execution: The ZKVM runs the program in a secure environment, capturing all computational steps.
  • Proof Generation: It creates a cryptographic proof using techniques like zk-SNARKs, ensuring the computation is valid.
  • Verification: The proof is verified by a third party, confirming correctness without exposing data.
  • Applications: Enables private smart contracts, secure data processing, and verifiable computations on the AO Network.

Receipts 101: What Is a Receipt?

  • A receipt shows the results of a zkVM program with proof of honest execution.
  • Contains a journal (public outputs) and a seal (cryptographic proof).
  • Allows third parties to verify the program's output without running it.
  • Used to confirm computations, like Alice sharing results with Bob.
  • Supports extracting the journal and verifying the seal for trust.
A0 Labs Bunny

Guest Code & Host Code 101

  • Guest Code: Runs inside the zkVM, proven for correctness.
  • Guest Tasks: Reads inputs, writes private outputs, commits public outputs to journal.
  • Guest Features: Lightweight (no std), debug tools like cycle counting.
  • Host Code: Runs the zkVM, manages execution environment.
  • Host Tasks: Sets up Executor, runs Prover, generates receipts.
  • Host Note: Not needed for Bonsai applications.
A0 Labs Bunny

ZKVMs vs TEEs: Two Sides of the Same Coin

  • Both provide secure, verifiable computation for trusted execution.
  • ZKVM: Relies on cryptographic proofs, no special hardware needed.
  • TEE: Depends on secure hardware (e.g., Intel SGX, ARM TrustZone).
  • Scalability: ZKVMs scale via cryptographic efficiency; TEEs via hardware deployment.
  • Complementary approaches: both ensure integrity with different trust models.

Boundless: Decentralized ZK Compute Market

Boundless is a decentralized protocol enabling a permissionless marketplace for zero-knowledge (ZK) proof generation, scaling verifiable compute across blockchains.

  • Marketplace: Connects "provers" (GPU operators) with "requestors" via a reverse Dutch auction for efficient price discovery.
  • Proof of Verifiable Work: Measures proof complexity to reward provers with $ZKC tokens, ensuring fair compensation.
  • Financialization of Compute: Treats ZK compute as a tradable commodity, enabling spot market and service agreements.
  • Decentralization: Open-source software and commodity hardware prevent monopolies, ensuring low-cost, reliable service.
  • Applications: Supports scalable smart contracts, private data processing, and verifiable computations on the AO Network.
  • White Paper: Read the Boundless White Paper

Proof of Verifiable Work: Enhancing Consensus

  • Proof of Verifiable Work (PoVW): Measures computational effort in generating zero-knowledge proofs, ensuring verifiable and useful computations.
  • Relation to Proof of Work (PoW): Like PoW, PoVW rewards computational effort but prioritizes meaningful tasks (e.g., ZK proof generation) over arbitrary puzzles, improving efficiency.
  • Relation to Proof of Stake (PoS): PoVW complements PoS by combining computational contributions with stake-based incentives, enhancing security without relying solely on capital.
  • Enhancing PoW: PoVW redirects computational power to verifiable, application-driven tasks, making PoW more practical and resource-efficient.
  • Enhancing PoS: Integrates cryptographic proofs to strengthen PoS security and enable scalable, trustless computation beyond consensus.
  • Beyond Consensus: PoVW supports decentralized compute for applications like private smart contracts and secure data processing.
Proof of Verifiable Work Illustration

Decentralized ZKVM Proving: Massive Scalability

Zero-Knowledge Virtual Machines (ZKVMs) enable decentralized, multithreaded proof generation by distributing computation across multiple nodes, aggregating results into a single, verifiable proof.

  • Parallel Proof Generation: ZKVMs like Nexus zkVM (White Paper) split large computations (e.g., 1B+ CPU cycles) into smaller chunks, each proven independently by nodes in a distributed network.
  • Incremental Verifiable Computation (IVC): Nodes generate lightweight proofs using folding schemes (e.g., Nova, HyperNova), which are combined without SNARKs for high-speed accumulation.
  • Proof Aggregation: A tree-like structure (r-ary proof accumulation) aggregates proofs from multiple nodes, enabling massive parallelization and scalability proportional to network compute power.
  • Final Compression: Aggregated proofs are compressed using zk-SNARKs, producing a succinct final proof for verification, maintaining efficiency and trustlessness.
  • Boundless Marketplace: Decentralized protocols like Boundless enable nodes (provers) to compete in a permissionless market, ensuring low-cost, reliable proof generation.
  • Outcome: Unprecedented scaling, potentially reaching trillions of CPU cycles per second, as seen in the Nexus Network’s vision of a verifiable supercomputer.
A0 Labs Bunny

Bringing Rust to AOS with Lua Compatibility

A0 Labs is integrating Rust into the AOS ecosystem, enabling developers to leverage Rust's performance and security while maintaining seamless Lua compatibility.

  • Rust-Powered Performance: Utilize Rust’s speed and memory safety for high-performance, low-level operations within AOS processes.
  • Lua Compatibility with mlua: The mlua library ensures Rust code integrates smoothly with existing Lua-based AOS modules, preserving developer familiarity.
  • Flexible Developer Experience: Supports both low-level Rust for optimized, secure computation and high-level Lua for rapid prototyping and scripting.
  • Enhanced Security: Rust’s strict type system and ownership model reduce vulnerabilities, complementing AOS’s trustless environment.
  • Scalability and Efficiency: Rust’s zero-cost abstractions and no_std support enable lightweight, scalable modules for ZKVMs and decentralized compute.
  • Unified Benefits: Developers enjoy speed, security, and flexibility, whether building complex ZK proofs or simple message handlers.

Programmable ZKVM Bridge for Cross-Chain AI Agents

A0 Lab's programmable ZKVM bridge enables decentralized cross-chain AI agents to perform complex operations by securely transferring arbitrary data and assets across blockchains.

  • Cross-Chain AI Agents: AI agents execute sophisticated logic (e.g., predictive analytics, automated trading) across chains, verified by ZK proofs for trustless operation.
  • Arbitrary Data & Assets: The bridge supports transferring any data type or asset (e.g., NFTs, tokens, computation results) based on custom logic and conditionals.
  • Programmable Logic: Developers define arbitrary rules in Rust or Lua, enabling dynamic interactions like conditional asset swaps or multi-chain governance.
  • ZKVM Security: Zero-knowledge proofs ensure computations are correct and private, preventing manipulation across chains like Ethereum, AO, and Sepolia.
  • Decentralized Scalability: Leverages Boundless marketplace for distributed proof generation, ensuring low-cost, high-throughput cross-chain operations.
  • Applications: Enables AI-driven DeFi strategies, cross-chain NFT marketplaces, and decentralized data oracles with verifiable integrity.
A0 Labs Bunny