Skip to content

Private Interoperability Protocol for Cross-Chain Liquidity

License

Notifications You must be signed in to change notification settings

UncleTom29/ZeroBridge

Repository files navigation

ZeroBridge πŸŒ‰

Private Interoperability for the Multi-Chain Future

License: MIT Hackathon Status

ZeroBridge is a privacy-preserving cross-chain interoperability protocol that enables trustless, decentralized, fast, and secure asset transfers between major blockchains. Powered by Zcash's Orchard shielded pool and Halo2 zero-knowledge proofs, ZeroBridge breaks on-chain linkage between deposits and withdrawals, providing true privacy for cross-chain transactions.


🌟 Key Features

  • βœ… True Privacy: Leverages Zcash Orchard shielded pool to break on-chain transaction linkage
  • βœ… 6 Blockchains: Ethereum, Solana, NEAR, Mina, StarkNet, Osmosis
  • βœ… Trustless: No central authority controls funds - powered by zero-knowledge proofs
  • βœ… Decentralized: Permissionless relayer network competes to execute transactions
  • βœ… Fast: Optimized proof verification (~30 seconds to 5 minutes)
  • βœ… Secure: Multi-layer security with signature verification and nullifier protection
  • βœ… Developer-Friendly: SDK, API, and 3-line integration plugin

πŸš€ Product Suite

1. ZeroBridge SDK & API

Build custom private cross-chain solutions with our developer toolkit.

import { ZeroBridge } from '@zerobridge/sdk';

const bridge = new ZeroBridge({ network: 'testnet' });

// Bridge ETH from Ethereum to Solana privately
await bridge.deposit({
  sourceChain: 'ethereum',
  targetChain: 'solana',
  token: 'ETH',
  amount: '1.0',
  recipient: 'SolanaAddress...'
});

Features:

  • Cross-chain token transfers
  • Privacy-preserving transactions
  • Real-time status tracking
  • TypeScript support with full type safety

2. ZeroBridge Plugin

Integrate private bridging into any web app with just 3 lines of code.

<!-- Add to your HTML -->
<script src="https://cdn.zerobridge.io/plugin.js"></script>
<div id="zerobridge-widget"></div>
<script>
  ZeroBridge.init({ containerId: 'zerobridge-widget' });
</script>

Features:

  • Plug-and-play integration
  • Customizable UI themes
  • Automatic wallet detection
  • Mobile-responsive design

3. ZeroBridge Portal

A standalone web application for seamless private cross-chain transfers.

Visit: portal.zerobridge.io (Coming after mainnet)

Features:

  • Intuitive user interface
  • Support for all integrated chains
  • Transaction history & tracking
  • Liquidity pool management

πŸ—οΈ Architecture Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    User Applications                     β”‚
β”‚  (Portal, Custom dApps, Integrated Plugins)             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚
                         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              ZeroBridge SDK & API Layer                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚
           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
           β–Ό                           β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Gateway Smart   β”‚         β”‚   Zcash Layer    β”‚
β”‚    Contracts     │◀───────▢│  (Coordinator)   β”‚
β”‚  (8 Chains)      β”‚         β”‚  Orchard Pool    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β–²                           β–²
           β”‚                           β”‚
           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚
           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
           β–Ό                           β–Ό
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚  Relayer    │◀─────────▢│  Relayer    β”‚
    β”‚  Network    β”‚    P2P     β”‚  Network    β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Core Components:

  1. Gateway Contracts: Lock/release tokens on source/destination chains
  2. Zcash Coordinator: Creates shielded notes, verifies proofs, manages state
  3. Relayer Network: Listens for events, executes authorized transactions
  4. SDK/API: Developer interface for building on ZeroBridge

For detailed architecture, see TECHNICAL_ARCHITECTURE.md


🎯 Current Status: Testnet POC

⚠️ This is a Proof of Concept for the Zypherpunk Hackathon

Currently available:

  • βœ… Testnet deployment on 6 blockchains
  • βœ… CLI demo tool for testing
  • βœ… Core protocol implementation
  • βœ… Gateway smart contracts
  • βœ… Zcash coordinator
  • βœ… Relayer network

Coming after Mainnet:

  • πŸ”œ ZeroBridge SDK & API
  • πŸ”œ ZeroBridge Plugin
  • πŸ”œ ZeroBridge Hub
  • πŸ”œ Security audits

πŸš€ Quick Start (CLI Demo)

Prerequisites

# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Install Node.js (for some chain interactions)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
nvm install 18

Installation

# Clone the repository
git clone https://github.com/zerobridge/zerobridge.git
cd zerobridge

# Build the project
cargo build --release

Run the CLI Demo

# Start the coordinator (Terminal 1)
./target/release/zcash-coordinator \
  --config config/testnet.toml \
  --database coordinator.db

# Start a relayer (Terminal 2)
./target/release/zerobridge-relayer \
  --config config/relayer-testnet.toml

# Bridge tokens (Terminal 3)
./target/release/zerobridge-cli bridge \
  --from ethereum \
  --to solana \
  --amount 0.1 \
  --token ETH \
  --recipient <SOLANA_ADDRESS>

πŸ“š Documentation


πŸ”§ Supported Chains

Chain Network Gateway Contract Status
Ethereum Sepolia 0x742d35... βœ… Testnet
Solana Devnet 8FGoQP... βœ… Testnet
NEAR Testnet zerobridge.testnet βœ… Testnet
Mina Devnet B62qr7... βœ… Testnet
StarkNet Testnet 0x0a1b... βœ… Testnet
Osmosis Testnet osmo1x... βœ… Testnet

πŸ’‘ How It Works

Deposit Flow (Bridge Assets)

1. User locks tokens on Source Chain gateway
   ↓
2. Relayer detects TokensLocked event
   ↓
3. Coordinator creates Zcash shielded note (Orchard)
   ↓
4. Assets are now private and bridged

Withdrawal Flow (Redeem Assets)

1. User submits withdrawal request with Zcash proof
   ↓
2. Coordinator verifies Halo2 zero-knowledge proof
   ↓
3. Coordinator signs authorization (if valid)
   ↓
4. Relayer executes withdrawal on Destination Chain
   ↓
5. User receives tokens privately

Privacy Guarantee: No on-chain linkage between deposit and withdrawal transactions.


πŸ›‘οΈ Security

Multi-Layer Security Model

  1. Zero-Knowledge Proofs: Halo2 proofs ensure validity without revealing information
  2. Coordinator Signature: All withdrawals require coordinator ECDSA signature
  3. Nullifier Protection: Prevents double-spending of shielded notes
  4. Reentrancy Guards: All contracts protected against reentrancy attacks
  5. Pausable Contracts: Emergency stop mechanism for all gateways
  6. Multi-Sig Admin: Production deployments use multi-signature wallets

🀝 Contributing

We welcome contributions! ZeroBridge is open-source and community-driven.

Ways to Contribute

  • πŸ› Report Bugs: Open an issue with detailed reproduction steps
  • πŸ’‘ Suggest Features: Share your ideas in GitHub Discussions
  • πŸ“ Improve Docs: Help us make documentation better
  • πŸ”§ Submit PRs: Fix bugs or implement features
  • πŸ§ͺ Test: Try the testnet and report issues

Development Setup

# Fork and clone the repo
git clone https://github.com/uncletom29/zerobridge.git
cd zerobridge

# Install dependencies
cargo build

# Run tests
cargo test --all

# Run integration tests
./scripts/run_integration_tests.sh

Code Standards

  • Follow Rust best practices and conventions
  • Write tests for new features
  • Update documentation for API changes
  • Use conventional commits for commit messages

πŸ† Hackathon Submission

Zypherpunk Hackathon 2025

What We Built

  • βœ… Complete cross-chain bridging protocol with 6 blockchain integrations
  • βœ… Privacy-preserving architecture using Zcash Orchard shielded pool
  • βœ… Production-ready smart contracts for all supported chains
  • βœ… Zcash coordinator with Halo2 proof verification
  • βœ… Decentralized relayer network with P2P coordination
  • βœ… CLI demo for testing the complete flow
  • βœ… Comprehensive documentation and deployment scripts

Innovation Highlights

  1. True Privacy: First bridge to leverage Zcash Orchard for cross-chain privacy
  2. 8 Diverse Chains: From EVM to Solana, NEAR, Mina, StarkNet, and Cosmos
  3. No Trust Assumptions: Zero-knowledge proofs eliminate trust requirements
  4. Permissionless Relaying: Anyone can run a relayer and earn fees

πŸ“Š Project Statistics

  • Languages: Rust, Solidity, Cairo, CosmWasm
  • Smart Contracts: 6 gateway implementations
  • Supported Tokens: Any ERC20, SPL, NEP-141, CW20, etc.

πŸ—ΊοΈ Roadmap

Phase 1: Foundation (Current - Hackathon)

  • βœ… Core protocol design
  • βœ… Gateway contracts (8 chains)
  • βœ… Zcash coordinator
  • βœ… Relayer network
  • βœ… Testnet deployment

Phase 2: Security & Audits (Q4 2025)

  • πŸ”œ Security audits (multiple firms)
  • πŸ”œ Bug bounty program
  • πŸ”œ Testnet stress testing
  • πŸ”œ Economic model finalization

Phase 3: Product Development (Q1 2026)

  • πŸ”œ ZeroBridge SDK & API
  • πŸ”œ ZeroBridge Plugin
  • πŸ”œ ZeroBridge Hub
  • πŸ”œ Developer documentation
  • πŸ”œ Integration examples

Phase 4: Mainnet Launch (Q2 2026)

  • πŸ”œ Mainnet deployment (all chains)
  • πŸ”œ Liquidity mining program
  • πŸ”œ Governance token launch
  • πŸ”œ Protocol DAO

Phase 5: Expansion (Q4 2025)

  • πŸ”œ Additional chain integrations (10+ chains)
  • πŸ”œ Advanced privacy features
  • πŸ”œ Institutional partnerships
  • πŸ”œ Cross-rollup support

πŸ’¬ Community & Support


πŸ“„ License

ZeroBridge is open-source software licensed under the MIT License.


πŸ™ Acknowledgments

Built with support from:

  • Zcash: Orchard shielded pool and Halo2 proof system
  • Zypherpunk Hackathon: For the opportunity to build this
  • Open Source Community: For the amazing tools and libraries

Special thanks to:

  • Zcash Foundation
  • Ethereum Foundation
  • Solana Foundation
  • NEAR Foundation
  • Mina Foundation
  • StarkWare
  • Osmosis Labs

⚠️ Disclaimer

This is a Proof of Concept for the Zypherpunk Hackathon.

  • Currently deployed on testnets only
  • NOT production-ready - pending security audits
  • Use testnet funds only - never send mainnet assets
  • Smart contracts are NOT audited yet
  • Use at your own risk

For production use, please wait for mainnet launch after comprehensive security audits.


🌟 Star Us!

If you find ZeroBridge interesting, please ⭐ star this repository to show your support!


Built with ❀️ for a Private, Decentralized Future

Website β€’ X

About

Private Interoperability Protocol for Cross-Chain Liquidity

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •