Skip to content

Zylith

Privacy-Preserving Concentrated Liquidity Market Maker on Starknet.

Overview

Zylith combines concentrated liquidity (Uniswap V3-style) with zero-knowledge proofs for private trading. Users can swap and provide liquidity without revealing wallet addresses or amounts.

Traditional DEX                    Zylith
┌──────────────────┐              ┌──────────────────┐
│ swap(            │              │ swap_shielded(   │
│   from: 0xABC,   │              │   proof: ZK,     │
│   amount: 1000   │              │   nullifier: H   │
│ )                │              │ )                │
│                  │              │                  │
│ Visible:         │              │ Visible:         │
│ • Sender address │              │ • Proof valid    │
│ • Exact amount   │              │ • Nullifier used │
└──────────────────┘              └──────────────────┘

Architecture

mermaid
flowchart TB
    subgraph User["Browser"]
        UI[Frontend]
        PG[Proof Generator]
        LS[Encrypted Storage]
    end

    subgraph Relay["Relay Server"]
        API[REST API]
        MT[Merkle Trees]
        TX[Tx Relay]
    end

    subgraph Starknet
        ZC[Zylith Contract]
        VF[Garaga Verifier]
        CLMM[CLMM Engine]
        PV[Privacy Module]
    end

    UI --> PG
    UI --> API
    API --> MT
    TX --> ZC
    ZC --> VF
    ZC --> CLMM
    ZC --> PV
ComponentTechPurpose
Smart ContractsCairoOn-chain state, verification, CLMM
ZK CircuitsCircom + Groth16Prove ownership without revealing identity
FrontendNext.js + snarkjsBrowser proof generation
Relay ServerRustMerkle indexing, tx relay, Privacy Pools ASP

Private Swap Flow

mermaid
sequenceDiagram
    participant U as Browser
    participant R as Relay
    participant S as Starknet

    U->>R: Get Merkle path
    R->>U: Path + siblings
    Note over U: Generate ZK proof (~20s)
    U->>R: Submit swap
    R->>S: swap_shielded_v2()
    Note over S: Verify proof (Garaga)
    Note over S: Check nullifier unused
    Note over S: Execute CLMM swap
    Note over S: Mark nullifier spent
    Note over S: Create new commitment
    S->>R: Confirmed
    R->>U: Done

Stack

ComponentTechnology
ContractsCairo 2.14+
CircuitsCircom 2.1.6
Proof SystemGroth16 (BN254)
VerificationGaraga
FrontendNext.js
RelayRust + Axum

Deployments

NetworkAddress
Mainnet0x06e145b...1137
Sepolia0x04509797...5c73

Released under the MIT License.