Announcement 📢
Starting a curated, fortnightly dealflow of exciting, upcoming projects - sounds interesting? Simply reply to this to subscribe
Today we are talking about 👇
Risc Zero
What is Risc Zero building?
Risc Zero is building out a zero-knowledge virtual machine to improve the security & trustworthiness of blockchain applications.
Services & Offerings
There are 3 major services:
RISC Zero zkVM: A tool for building zero-knowledge software applications & generate proofs
Bonsai: A massively parallel, programmable service, allowing any on-chain application to generate zkVM proofs with minimal costs / efforts
RISC Zero Proof System: The cryptographic techniques underlying the zkVM.
Let’s learn about each of them in detail.
zkVM
Via zkVM you can essentially end up proving the execution of any rust code.
The RISC Zero zkVM simplifies and accelerates the process of creating robust, verifiable software applications by enabling users to develop zero-knowledge applications using pre-existing Rust packages.
An example can be, user leveraging these proofs to verify an image of JSON file, by only exposing a portion of it, but not opening out the complete file.
A zkVM application is made up of two components - a host program and a guest program.
Role of the Guest Program: The guest program constitutes a part of the zkVM application, the execution of which will be certified by the zkVM.
Responsibility of the Host Program: The host program is entrusted with the execution and affirmation of the correct running of the guest program.
Proving
To confirm the accurate execution of a zkVM application:
The guest program gets compiled into an ELF binary.
The executor operates the ELF binary and documents the process of execution.
The prover verifies the execution trace and substantiates its authenticity, leading to the generation of a receipt.
Verification
Here’s how the flow goes through different sections of the serviece:
Receipt Creation: In the zkVM application execution, a receipt is produced that includes the application's output.
Receipt Sharing: In an agreed computation scenario, Alice runs the zkVM, generates a receipt, and shares it with Bob.
Receipt Analysis: Bob inspects the journal details from the receipt.
Receipt Verification: Bob checks the receipt to confirm execution validity and guest program consistency.
Cryptographic Assurance: Receipt verification offers cryptographic proof of an honestly created journal using the expected guest program.
Performance Overview
There are a few benchmarks set up by the team that you can refer to, check out the sheet
You can also set up custom benchmarks yourself to get performance data suitable for your system.
Bonsai
What is the problem currently?
Despite significant funding and multiple teams, current zkEVM technology is nascent and expensive, causing most non-EVM blockchains to be effectively blocked from utilizing zero knowledge for scaling and privacy.
This situation, compounded by limitations in scalability, functionality, and interoperability, calls for a more efficient, developer-friendly zero-knowledge proof solution.
This is where Bonsai comes in.
Bonsai facilitates limitless computation across all blockchains, allowing users to upload programs for external proof generation, instead of producing proofs on their own hardware.
Bonsai's compatibility with any chain, protocol, or application makes integration into Ethereum, L1 blockchains, Cosmos app chains, L2 rollups, and dApps quick and straightforward.
Let’s look at how it can be used with Ethereum.
Bonsai integrates three core elements to pave the way for a diverse range of applications across the ecosystem:
Versatile zkVM: A general-purpose zkVM that facilitates running any virtual machine within a zero-knowledge/verifiable context.
Proving System Integration: A proving system that seamlessly incorporates into any smart contract or blockchain.
Universal Rollup: A universal rollup that distributes computations proven on Bonsai to all chains.
Here’s on a code level the advantage of using Bonsai, instead of coding it completely by yourself.
The Architecture
Bonsai is a massively parallel and chain-agnostic network.
It architecturally designed with modular components to enable developers to create a diverse range of zero-knowledge applications across any chain and protocol.
Here’s an overview of the architecture & the components
The major components are / will be:
Prover Network: A network of nodes that execute and verify requests sent via the Bonsai API, ensuring high node availability and incentives for operators.
Request Pool: A database managing requests for proofs and their metadata, also handling the splitting and recombining of function requests for efficient proving.
Rollup Engine: This engine aggregates proofs generated by the prover network into a single root proof and publishes it onto chains like Ethereum and Solana.
Image Hub: A storage for developers to save functions and program images that can be executed by blockchain smart contracts, facilitating complex, multi-blockchain workflows.
State Store (Future Component): This will allow developers to store state on Bonsai, simplifying contracts and increasing gas savings.
Proving Marketplace (Future Component): As proof demand outstrips supply, a decentralized proving network will be developed, matching proof requests with bids and improving Bonsai’s efficiency and reliability.
Use-cases & applications
There are several great use-cases to that Bonsai can cater to, these include:
Off-Chain Execution for Scalability: Bonsai offloads extensive code execution from the blockchain, reducing gas requirements and lowering costs across various blockchain applications.
Functionality Enhancement: Smart contracts can leverage advanced libraries from languages like Rust/C++, permitting the creation of more complex and efficient smart contracts.
Interoperability Across Chains: As a shared off-chain execution layer, Bonsai enhances the interaction and compatibility among different chains and smart contracts, acting as a central hub.
Proof System
When the RISC Zero zkVM runs, it generates a SessionReceipt. This is essentially a proof of correctness for a specific Session.
To check that a SessionReceipt is genuine, you can use the SessionReceipt::verify function. You'll need to provide the ImageID of the code that was supposed to run.
The SessionReceipt includes a journal, which lists the public outcomes of the Session
The SessionReceipt is a set of ZK-STARKs. Each one of these provides proof for a single Segment.
Here’s a long sequence diagram to exactly understand the flows.
Team
The team is lead by Brian, Frank & Jeremy as founders of the company.
The details of the team are listed below
Funding & Support
As I was writing out this newsletter, they recently announced their series A round of $40mn led by Blockchain Capital & Bain Capital Crypto who led their seed round.
Closing thoughts
The overall ecosystem around zK is growing day by day & am really excited to see the work being done by the team at Risc Zero.
You can learn more about them here:
Hope you enjoyed learning about them. Until next time :)