Valence ZK is a revolutionary framework that simplifies cross-blockchain development by abstracting complex cryptographic operations into a developer-friendly interface. By leveraging zero-knowledge proofs, Valence enables trustless verification of state across multiple blockchain ecosystems, making it possible to build truly decentralized cross-chain applications.
- Trustless Cross-Chain Verification: Verify state across different blockchains without relying on trusted intermediaries
- Developer-First Design: Abstract complex cryptographic operations like Merkle proofs into simple, composable interfaces
- Modular Architecture: Extensible trait system allows easy integration with new blockchain networks
- Future-Proof: Designed for seamless integration with upcoming zk light client proofs
Valence ZK implements a sophisticated architecture that combines:
-
Merkle Proof Library: Generic interface for Merkle proofs across supported chains
- Account proofs
- Storage proofs
- Future: Receipt proofs (ERC20 Transfer logs, L2 chains)
-
Coprocessor Layer:
- Batches Merkle proofs by target domain
- Performs recursive ZK verification
- Maintains a Sparse Merkle Tree (SMT) for trusted roots
-
Recursive ZK Circuit:
- Domain State Proofs: Verifies individual domain-level Merkle proofs
- SMT Update Proofs: Verifies updates to the trusted root SMT
- Currently implemented using SP1 prover with Arkworks verifier
The framework currently supports:
- Ethereum (EVM-compatible chains)
- Neutron (Cosmos ecosystem)
- Extensible to any ICS23 or EVM-compatible chain
- Rust 1.84.0 or later
- Basic understanding of blockchain concepts and zero-knowledge proofs
- Familiarity with Merkle trees and cryptographic proofs
git clone <repository-url>
cd valence-zk-demo
cp .env.example .env
# Update .env with your configuration
cargo run -p coprocessor --release --features rate -- --nocapture
cargo run -p coprocessor --release --features mailbox -- --nocapture
For near production-grade security guarantees (currently missing ZK light client proofs):
cargo run -p coprocessor --release --features rate --features coprocessor -- --nocapture
ZK Rate Application here
ZK Mailbox Application here
test name | elapsed time |
---|---|
rate | 149.5s |
rate + coprocessor | 300.5s |
mailbox | 147.1s |
mailbox + coprocessor | 288.6s |
test name | elapsed time |
---|---|
rate | 35s |
rate + coprocessor | 65.1s |
mailbox | 29.2s |
mailbox + coprocessor | 54.6s |
coprocessor/
: Core coprocessor logic and proof generationcoprocessor-proofs/
: ZK circuit implementationscoprocessor-circuit-types/
: Type-safe circuit definitionscoprocessor-circuit-sp1/
: Optimized SP1 implementationcoprocessor-circuit-logic/
: Core verification logic
zk-programs/
: Example ZK applicationszk-rate-application/
: Cross-chain rate calculationzk-rate-application-types/
: Type definitionszk-mailbox-application/
: Cross-chain messaging
The framework includes a practical example demonstrating trustless rate calculation across Ethereum and Neutron vaults. This example showcases:
- Trustless state verification from multiple blockchains
- Secure rate calculation using zero-knowledge proofs
- Practical implementation of cross-chain financial primitives
For detailed implementation details, see the ZK Rate Example README.
Valence ZK implements a robust security model:
- Trusted Roots: Currently uses trusted roots for verification (planned upgrade to zk light client roots)
- Recursive ZK Circuits: Verifies Merkle proofs against trusted roots
- Future-Proof: Designed for seamless integration with zk light client proofs
The framework includes a practical example demonstrating trustless message passing between Ethereum and Neutron mailboxes. This example showcases:
For detailed implementation details, see the ZK Message Example README.
Valence ZK implements a robust security model:
- Trusted Roots: Currently uses trusted roots for verification (planned upgrade to zk light client roots)
- Recursive ZK Circuits: Verifies Merkle proofs against trusted roots
- Future-Proof: Designed for seamless integration with zk light client proofs
To achieve full production-grade security, Valence ZK requires the following steps:
-
Deploy Coprocessor State Contract
- Initialize with genesis state for supported chains (e.g., Ethereum and Neutron roots at specific heights)
-
Implement ZK Light Client Interfaces
- Replace mock implementations with real ZK light client integrations
- Currently planned implementations:
- Ethereum: Spectre-RAD
- Cosmos ICS23: TendermintX
-
Circuit Integration
- Implement proof verification logic in the coprocessor circuit
- Verify ZK light client proofs against previous chain states
Once these steps are completed, Valence ZK will be production-ready for:
- Ethereum and Cosmos ICS23 (Tendermint) chains
- Additional Tendermint chains can be added with their own contract and TendermintX prover instance
- Deploy coprocessor state contract with genesis state
- Implement ZK light client interfaces for Ethereum and Neutron
- Integrate ZK light client proof verification in coprocessor circuit
- Support alternative environments (Solana)
- Enhanced serialization and type system abstractions
- Performance optimizations
- Deployments and Blockops
- Support for receipt proofs (ERC20 events)
- Support for Layer 2 EVM networks (Optimism, Arbitrum)
Note
This repository is under active development. While core functionality is implemented, some features are being enhanced for optimal performance and security.