Skip to main content

Bonsai ETH Relay

The Bonsai ETH Relay intermediates between your app contract and the Bonsai proving service. Using the Bonsai Eth Relay allows you to write concise Solidity contracts that harness the power of off-chain ZK computation.

At a high level, here's how it works:

Bonsai ETH Relay overview

(TODO: Highlight the relay sections of this diagram)

The Bonsai ETH Relay consists of a relay contract deployed on chain and an off-chain relay that connects the relay contract to the Bonsai proving service. In order to use the Bonsai ETH Relay, dApp developers must have completed the following steps:

  1. Deployed a smart contract on chain that calls the relay contract
  2. Uploaded a compiled program for the zkVM to the Bonsai proving service

Getting Started

See our Setting Up Bonsai article to get started using the Bonsai ETH Relay. As a reminder, projects developed here are not production-ready and the ETH relay is subject to change. That said, we think this is a great way to get to know the Bonsai ETH Relay and learn through practice how dApps can harness the power of off-chain provable computations.

Check out our ETH Relay tutorial for a beginner's guide to writing your own app using the Bonsai ETH Relay. We've paired the Bonsai Foundry Template with an even simpler "Hello, World!" example that serves as a blank slate for our tutorials. We'll be using a combination of the developer template and an even simpler "Hello, World!" example to get you used to developing projects that use the Bonsai ETH Relay.