Skip to content

defi-wonderland/aztec-bridge-and-seek

Repository files navigation

Bridge and Seek

A privacy-first cross-chain bridge application powered by Substance Labs' bridge that enables seamless token transfers between Base Sepolia and Aztec Sepolia, with built-in private swapping capabilities.

πŸŒ‰ Overview

Bridge and Seek demonstrates the power of privacy-preserving cross-chain interactions by allowing users to:

  • Bridge tokens from Base Sepolia into Aztec's private ecosystem
  • Bridge tokens out from Aztec to Base Sepolia
  • Perform private token operations within Aztec
  • Execute cross-chain swaps while maintaining transaction privacy

The application showcases Aztec's privacy features through both public and private token operations, providing a complete demonstration of confidential cross-chain DeFi.

✨ Key Features

Core Bridge Functionality

  • Shield (Bridge In): Transfer WETH from Base Sepolia to Aztec Sepolia
  • Unshield (Bridge Out): Transfer WETH from Aztec back to Base Sepolia
  • 7683 Standard: Intent-based cross-chain order system for secure transfers

User Experience

  • Embedded Wallet: No popups or external wallet apps required. Everything is generated in-browser
  • MetaMask Integration: Seamless connection for EVM operations
  • Account Abstraction: Sponsored fee payments through SponsoredFPC

πŸš€ Quick Start

Prerequisites

  • Node.js >=22.0.0
  • MetaMask or compatible EVM wallet

Installation

# Clone the repository
git clone https://github.com/defi-wonderland/aztec-bridge-and-seek.git
cd bridge-and-seek

# Install dependencies
yarn install

# Install Aztec 1.1.2
aztec-up 1.1.2

# Start Sandbox
aztec start --sandbox

# Build and deploy contracts
yarn build-contracts
yarn deploy-contracts

# Start development server
yarn dev

The application will be available at http://localhost:3000

πŸ“¦ Project Structure

bridge-and-seek/
β”œβ”€β”€ contracts/              # Noir smart contracts
β”‚   └── dripper/           # Token faucet contract
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ artifacts/         # Generated contract TypeScript bindings
β”‚   β”œβ”€β”€ components/        # React UI components
β”‚   β”œβ”€β”€ providers/         # React context providers
β”‚   β”‚   β”œβ”€β”€ AztecWalletProvider.tsx
β”‚   β”‚   β”œβ”€β”€ EvmWalletProvider.tsx
β”‚   β”‚   β”œβ”€β”€ TokenProvider.tsx
β”‚   β”‚   └── NotificationProvider.tsx
β”‚   └── services/          # Service layer
β”‚       └── aztec/        # Aztec-specific services
β”‚           β”œβ”€β”€ core/     # Wallet and contract services
β”‚           β”œβ”€β”€ features/ # Token, voting, dripper services
β”‚           └── storage/  # Browser storage management
β”œβ”€β”€ scripts/              # Deployment and utility scripts
└── tests/               # E2E Playwright tests

πŸ› οΈ Development

Essential Commands

# Contract Development
yarn build-contracts      # Compile Noir contracts and generate TypeScript artifacts
yarn compile-contracts    # Compile Noir contracts only
yarn codegen-contracts    # Generate TypeScript bindings
yarn deploy-contracts     # Deploy all contracts to Aztec network

# Application Development  
yarn dev                  # Start development server
yarn build-app           # Production build with Webpack
yarn build               # Full build (contracts + app)
yarn serve               # Serve production build

# Testing & Quality
yarn test                # Run E2E test suite
yarn prep-test           # Deploy contracts and build for testing
yarn lint                # Check code formatting

# Performance Options
PROVER_ENABLED=false yarn deploy-contracts  # Skip proof generation for faster development

πŸ”— Technical Architecture

Cross-Chain Bridge

  • Bridge Implementation: Built on Substance Labs Aztec-EVM Bridge
  • Source Chain: Base Sepolia
  • Destination Chain: Aztec Testnet
  • Bridge Token: WETH
    • Base Sepolia: 0x1BDD24840e119DC2602dCC587Dd182812427A5Cc
    • Aztec Sepolia: 0x143c799188d6881bff72012bebb100d19b51ce0c90b378bfa3ba57498b5ddeeb
  • Gateway Contract: 0x0Bf4eD5a115e6Ad789A88c21e9B75821Cc7B2e6f
  • Architecture: Intent-based settlement with zero-knowledge proofs for privacy-preserving cross-chain transfers

Aztec Integration

  • PXE: Client-side Private eXecution Environment for proof generation
  • Account Contracts: ECDSA keys for EVM wallet compatibility
  • Note System: Encrypted UTXO-like notes for private state
  • Fee Abstraction: Sponsored transactions through SponsoredFPC

Security Features

  • Zero-knowledge proofs for transaction privacy
  • Client-side proof generation (no trusted setup)
  • Optional auditability through selective disclosure
  • Secure cross-chain message passing via 7683 standard

πŸ§ͺ Testing

The project includes comprehensive E2E tests using Playwright:

# Run full test suite
yarn test

# Run tests without proof generation (faster)
PROVER_ENABLED=false yarn test

🀝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details on our development process and how to submit pull requests.

πŸ“š Resources

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

⚠️ Disclaimer

This is a testnet application for demonstration purposes. Do not use with real funds on mainnet.


For questions, issues, or feature requests, please open an issue on GitHub.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •