| Status | Phase 1 (Privacy Bridge MVP) | Network | Ethereum β Mantle L2 |
|---|---|---|---|
| Complexity | 8/10 (Commitment-based Privacy) | Repo Type | Monorepo |
| Solidity Tooling | Foundry | Backend | Rust (Actix-Web) |
Launch project - Shadow-Swap
Shadow Swap is a privacy-preserving, intent-based bridging protocol that enables anonymous and trustless asset transfers between Ethereum L1 and Mantle L2.
Unlike traditional bridges, Shadow Swap decouples the sender from the receiver using cryptographic commitments, allowing users to:
- Bridge assets privately (no on-chain link between depositor and withdrawer)
- Achieve immediate settlement (no challenge periods or delays)
- Maintain censorship resistance through permissionless solver networks
The project follows a strategic, phased rollout:
Fully functional privacy bridge with:
- Poseidon hash-based commitments for privacy
- Merkle proof verification for cross-chain state validation
- Intent-based architecture compatible with ERC-7683
- Solver network for decentralized fulfillment
- Immediate settlement (no waiting periods)
Enhance with full ZK infrastructure:
- zk-SNARK circuits for transaction privacy
- Recursive proof aggregation for scalability
- Nullifier-based double-spend prevention (on-chain ZK verification)
- Multi-chain expansion beyond Ethereum β Mantle
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 1. USER CREATES INTENT (Source Chain) β
β β’ Generates secret + nullifier (off-chain) β
β β’ Computes commitment = Poseidon(secret, nullifier, ...) β
β β’ Deposits tokens to PrivateIntentPool contract β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 2. INDEXER MONITORS EVENTS β
β β’ Goldsky webhook receives IntentCreated event β
β β’ Relayer builds merkle tree of commitments β
β β’ Syncs commitment root to destination chain β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 3. RELAYER REGISTERS INTENT (Destination Chain) β
β β’ Generates merkle proof for commitment β
β β’ Calls PrivateSettlement.registerIntent() with proof β
β β’ Intent becomes fillable on destination chain β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 4. SOLVER FILLS INTENT (Destination Chain) β
β β’ Monitors IntentRegistered events β
β β’ Provides liquidity by calling fillIntent() β
β β’ Tokens sent to recipient address β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 5. SETTLEMENT (Source Chain) β
β β’ Relayer syncs fill root back to source chain β
β β’ Solver claims escrowed funds via settleIntent() β
β β’ User privately claims with secret/nullifier β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Component | Package | Description | Technology |
|---|---|---|---|
| Smart Contracts | @Mantle/contracts |
Intent pools, settlement, merkle verification, Poseidon hasher | Solidity (Foundry) |
| Frontend dApp | @Mantle/frontend |
User interface for private bridging | Next.js, TypeScript, Ethers.js |
| Relayer Backend | @Mantle/shadow-swap |
Off-chain proof generation, root syncing, settlement coordination | Rust (Actix-Web, PostgreSQL, Diesel) |
| Event Indexer | @Mantle/Indexers |
Blockchain event monitoring via Goldsky webhooks | Node.js, TypeScript, BullMQ |
| Solver Bot | @Mantle/solver |
Intent fulfillment and liquidity provision | Rust (Actix-Web) |
commitment = Poseidon(secret, nullifier, amount, destChain)- Secret: Random 256-bit value (known only to user)
- Nullifier: Prevents double-spending when claiming
- Commitment: Public identifier stored on-chain
- No on-chain link between depositor and withdrawer
- All commitments aggregated into merkle tree (minimum size 2)
- Root synced cross-chain for verification
- Proofs generated off-chain, verified on-chain
- Supports batching for gas efficiency
| Milestone | Status |
|---|---|
| Poseidon commitment contracts | β Deployed |
| Merkle proof verification | β Working |
| Intent-based architecture | β Live |
| Relayer infrastructure | β Operational |
| Solver network integration | β ERC-7683 compatible |
| Testnet deployment (Sepolia) | β Live |
| Milestone | Timeline |
|---|---|
| zk-SNARK circuit design | Q2 2025 |
| Nullifier ZK verification | Q2 2025 |
| Recursive proof aggregation | Q3 2025 |
| Multi-chain expansion | Q3 2025 |
| Mainnet launch | Q4 2025 |
This is a monorepo with multiple packages.
Each package can be run independently from its directory.
git clone https://github.com/Mist-Labs/Mantle-Protocol.git
cd Mantle-ProtocolEach package manages its own dependencies:
# Smart Contracts
cd packages/contracts && forge install
# Frontend
cd packages/frontend && pnpm install
# Indexer
cd packages/Indexers && pnpm install
# Relayer (Rust dependencies via Cargo.toml)
cd packages/shadow-swap && cargo build
# Solver (Rust dependencies via Cargo.toml)
cd packages/solver && cargo build| Action | Package | Command |
|---|---|---|
| Compile Contracts | @Mantle/contracts |
cd packages/contracts && forge build |
| Run Contract Tests | @Mantle/contracts |
cd packages/contracts && ./runtests.sh |
| Deploy Contracts | @Mantle/contracts |
cd packages/contracts && forge script script/Deployer.s.sol |
| Run Frontend | @Mantle/frontend |
cd packages/frontend && pnpm run dev |
| Run Indexer | @Mantle/Indexers |
cd packages/Indexers && pnpm run dev |
| Run Solver | @Mantle/solver |
cd packages/solver && cargo run --release |
| Run Relayer | @Mantle/shadow-swap |
cd packages/shadow-swap && cargo run --release |
check .env.example check .env.example check .env.example # Terminal 1: Start PostgreSQL
docker run -d -p 5432:5432 -e POSTGRES_PASSWORD=password postgres:14
# Terminal 2: Start Relayer
cd packages/shadow-swap && cargo run --release
# Terminal 3: Start Indexer
cd packages/Indexers && pnpm run dev
# Terminal 4: Start Solver
cd packages/solver && cargo run --release
# Terminal 5: Start Frontend
cd packages/frontend && pnpm run devcd packages/contracts
forge install <dependency> # Install Foundry library
forge update # Update dependenciescd packages/frontend # or packages/Indexers
pnpm add <package> # Add dependency
pnpm add -D <package> # Add dev dependency
pnpm install # Install dependenciescd packages/shadow-swap # or packages/solver
cargo add <crate> # Add dependency
cargo update # Update dependencies# Unit tests
cd packages/contracts && ./runtests.sh
# Integration tests
cd packages/contracts && forge test --match-path test/integration/*
# Gas reports
cd packages/contracts && forge test --gas-report
# Coverage
cd packages/contracts && forge coveragecd packages/shadow-swap
cargo test
cargo test -- --nocapture # With logs# Deploy Poseidon hasher
forge script script/Deployer.s.sol:DeployPoseidonHasher \
--rpc-url $ETHEREUM_RPC_URL --broadcast --verify
# Deploy Ethereum contracts
forge script script/Deployer.s.sol:DeployEthereumContracts \
--rpc-url $ETHEREUM_RPC_URL --broadcast --verify
# Deploy Mantle contracts
forge script script/Deployer.s.sol:DeployMantleContracts \
--rpc-url $MANTLE_RPC_URL --broadcast --verify
# Configure tokens
forge script script/Deployer.s.sol:ConfigureTokens \
--rpc-url $ETHEREUM_RPC_URL --broadcast| Contract | Chain | Purpose |
|---|---|---|
PrivateIntentPool |
Source | Intent creation, escrow, settlement |
PrivateSettlement |
Destination | Intent registration, filling, claiming |
PoseidonHasher |
Both | Commitment generation |
PrivateIntentPool (Source Chain)
createIntent(commitment, token, amount, destChain) // Escrow tokens
settleIntent(intentId, merkleProof) // Solver claims funds
claimWithdrawal(secret, nullifier, signature) // Private claimPrivateSettlement (Destination Chain)
registerIntent(commitment, token, amount, merkleProof) // Register via relayer
fillIntent(intentId) // Solver provides liquiditygit checkout -b feat/your-feature-namegit add .
git commit -m "feat: add zkSNARK nullifier verification"git push -u origin feat/your-feature-nameThen open a Pull Request to main on GitHub.
| Network | Chain ID | Status | Contracts Deployed |
|---|---|---|---|
| Ethereum Sepolia | 11155111 | β Live | PrivateIntentPool, PrivateSettlement, PoseidonHasher |
| Mantle Sepolia | 5003 | β Live | PrivateIntentPool, PrivateSettlement, PoseidonHasher |
| Ethereum Mainnet | 1 | π§ Planned | TBD |
| Mantle Mainnet | 5000 | π§ Planned | TBD |
- Audits: Pending (Phase 2)
- Bug Bounty: TBD
- Security Contact: ebounce500@gmail.com
- Centralized relayer (decentralization planned for Phase 2)
- No ZK circuits yet (commitments use Poseidon but no ZK proofs)
- Testnet only (mainnet after audit)
MIT License - See LICENSE for details
- Shadow swap: Shadow swap app
- Docs: coming soon
- Discord: coming soon
- Twitter: coming soon
Built with β€οΈ by Mist Labs