> ## Documentation Index
> Fetch the complete documentation index at: https://docs.0x0.exchange/llms.txt
> Use this file to discover all available pages before exploring further.

# Mixing / Private Funding

Spectre incorporates a built-in **Privacy Pool** (mixer) to ensure that the funds you use for trading cannot be traced back to your original wallet. This is similar to protocols like Tornado Cash but optimized for high-frequency trading onboarding.

## How it Works

The deposit process involves breaking the link between your source wallet (e.g., your main MetaMask account) and your trading identity on Spectre.

```mermaid theme={null}
sequenceDiagram
    participant User as Source Wallet
    participant Pool as Privacy Pool (Contract)
    participant Relayer
    participant Spectre as Spectre Exchange

    Note over User, Pool: Step 1: Deposit & Mix
    User->>Pool: Deposit ETH + Commitment (Hash of Secret)
    Pool-->>User: Returns "Note" (Secret Key)
    
    Note over Pool: Funds are mixed in the generic pool

    Note over User, Spectre: Step 2: Withdraw to Exchange
    User->>User: Generate ZK Proof (using Note + New Spectre Address)
    User->>Relayer: Send Proof + Spectre Destination
    Relayer->>Pool: Submit Proof
    Pool->>Pool: Verify Proof & Nullifier
    Pool->>Spectre: Transfer Funds (Credit to New Address)
```

## The Process

### 1. Deposit (The Mix)

You deposit assets (ETH, USDC) into the Spectre Privacy Smart Contract.

* **Commitment**: Behind the scenes, your client generates a random "Secret" and sends the hash (Commitment) to the contract.
* **The Note**: You save this Secret. It is the *only* proof that you own the deposited funds. **Do not lose it.**

### 2. Wait

Your funds sit in the pool along with funds from other users. The longer they sit, the harder it is to correlate the deposit with the subsequent withdrawal (anonymity set size increases).

### 3. Fund Account

When you are ready to trade, you use your "Note" to generate a **Zero-Knowledge Proof (ZKP)**.

* **The Proof**: Cryptographically proves you have valid funds in the pool *without* revealing which specific deposit was yours.
* **Destination**: You specify your fresh Spectre Stealth Address as the recipient.
* **Relayer**: A third-party Relayer submits this transaction to the blockchain, paying the gas fees (taking a small cut), so your fresh Spectre account doesn't need any initial ETH for gas.

Your Spectre account is now funded and ready to trade, with no on-chain link to your original wallet.
