TOKI and Succinct have developed an open-source, practical Zero-Knowledge Inter-Blockchain Communication Protocol (ZK-IBC) solution, combining ibc-solidity and Tendermint X. With ZK-IBC, decentralized applications (dApps) can now seamlessly exchange information between the Ethereum and Interchain ecosystems by leveraging IBC. ZK-IBC is performant and its open-source code base is available for public use.
TOKI, in collaboration with Succinct and Datachain, remains committed to investing in ZK proofs (ZKPs). We utilize Trusted Execution Environments (TEE) and Multi-Party Computation (MPC), combining them in our multi-prover model to mitigate potential risks and enhance security. With its pioneering zkVM, SP1, Succinct is democratizing access to ZKPs for all developers. SP1 is 100% open-source and enables developers to write normal Rust code to use ZK while being performant against custom, hand-written ZK circuit approaches. The recent test net release of SP1 makes it the fastest, feature-complete zkVM, outperforming other zkVMs by order of magnitude.
We are developing a ZK-IBC solution between Ethereum and the Interchain, and later extend support to other blockchains such as BNB Chain, Avalanche, Polygon, and L2s. We would greatly appreciate hearing your thoughts on this. Please feel free to contact us!
This repository provides a TendermintZKLightClient contract, a Solidity implementation of a Zero-Knowledge Proof (ZKP)-based Tendermint light client for IBC. Furthermore, it also offers IBC relayer support and a ZK prover using Succinct's Tendermint X. By utilizing ibc-solidity and these components, we can achieve cross-chain communication via IBC between EVM chains (e.g., Ethereum mainnet) and Cosmos zones at a practical gas cost.
The following figure shows the high-level architecture of the E2E demo using the components included in this repository. Note that Mock-LC is currently used as an IBC light client on Tendermint instead of verifying Ethereum consensus. This will soon be replaced by 08-wasm + ethereum-ibc-rs.
There are three main components in the repository: TendermintZKLightClient, ZKProver, and Relayer. Let’s dive into each component to understand their roles and functionalities in the architecture.
TendermintZKLightClient is a Solidity contract that implements a ZKP-based light client for Tendermint and ILightClient interface of ibc-solidity. This consists of the following parts:
ZKP-verifier for header: It verifies a validity proof of header, which is a recursive proof with Groth16/PLONK for TendermintX circuit proof. Note that the trusting period validation and the merkle tree verification for block timestamp and appHash from the header are processed on-chain for now. We will soon improve the circuit to include these verifications.
State membership/non-membership verifier: A merkle proof verifier implementation optimized for Simple tree and IAVL tree proof specs
Developers can construct their own LightClient contract using a ZKP verifier contract according to the verifying key they performed setup and generated.
An example implementation can be found here:
ZKProver is a component that proves the validity of a given header and provides its proof to the relayer.
This component consists of the following two sub-components:
plonky2-prover that runs Tendermint X circuit to generate proof and prove recursively using Poseidon BN128 hash
gnark-verifier that recursively proves the proof from plonky2-prover service utilizing gnark-plonky2-verifier for Groth16/PLONK proof
Relayer is a component that requests validity proof of the latest header from ZKProver and calls the updateClient function of the TendermintZKLightClient contract with the proof. This is implemented as a prover module of yui-relayer.
Below is the gas report for the TendermintZKLightClient contract, measured using the forge test based on the settings provided. As a reference, tendermint-sol, which implements Tendermint light client on ibc-solidity, requires over 10 million in gas cost according to the ChorusOne report.
Settings:
Solidity v0.8.24
optimizer_runs=9999999
via-ir=true
evm_version=paris
Benchmarks are in the below table.
Method | Proving System | Gas Cost |
---|---|---|
updateClient | Groth16 | 285k |
updateClient | Groth16 (w/ commit range checker) | 407k |
updateClient | PLONK | 370k |
verifyMembership | * | 56k |
We will integrate this ZK-IBC solution with our multi-prover security model, enabling Interchain zones to communicate with Ethereum in a trust-minimized and cost-effective manner. By incorporating ZK-IBC, along with TEE and MPC, into the multi-prover model, we can further minimize the risk of vulnerability and thereby enhance security.
For example, with Noble—one of our partners that provides an Interchain app-specific blockchain purpose-built for native asset issuance—we are now in discussions to enable users to transfer Japanese-regulated stablecoins between Noble and Ethereum. Following Noble’s support for the Wasm light client, we plan to test this connection.
Additionally, we are in talks with other zones that are looking for more secure ways to connect with Ethereum.
We plan on further optimizing our ZK-IBC implementation with the following steps:
Reduce the ZKProver's proving time.
The current benchmark is 5 minutes if we have 60 validators and 12 minutes if we have 150 validators. See details in this post by Succinct.
Further gas cost optimization.
Remove simple tree verification on-chain.
Support 08-wasm light client.
Furthermore, we are looking forward to accelerating the development of ZK-IBC by utilizing zkVM approaches such as SP1. This approach enables us to expand ZK-IBC networks by reducing the implementation costs of circuits for each light client.
TOKI is building a cross-chain bridge on top of the IBC-based messaging layer, adopting the multi-prover approach combining TEE, MPC, and ZKP.
The cross-chain bridge app is set to launch on the Ethereum and BNB Chain testnets between June and July! Our goal is to refine our product with feedback from our community, and we plan to reward early supporters. To stay tuned for more updates, join us on Discord!
Jun Kimura is the co-founder and CTO of Datachain. He is the core contributor to ibc-solidity, LCP, and more. Connect with him on GitHub.