Skip to content

Instantly share code, notes, and snippets.

@shramee
Last active October 18, 2025 13:06
Show Gist options
  • Save shramee/2819b168d2db9d576fa6d5cff1cdb353 to your computer and use it in GitHub Desktop.
Save shramee/2819b168d2db9d576fa6d5cff1cdb353 to your computer and use it in GitHub Desktop.
Amount correlation and forced exits

MIST.cash: Introducing Seek and Hide Cat hiding in the cupboard

Cat hiding in the cupboard

Traditional mixers expose transactions; MIST’s Seek and Hide preserves privacy with flexible withdrawals and private forwarding.

Traditional Privacy Mixers

Traditional privacy mixers allow senders to deposit and hide assets in a contract and recipients to seek and withdraw them using zero-knowledge proofs. Traditional mixers often require fixed denominations (e.g., 1 ETH or 10 ETH), which limit flexibility for users and fragment anonymity pools, weakening privacy. There's only one answer to these issues, flexible amounts.

However, following issues arise when traditional mixers allow flexible amounts.

1. Amount Correlation

When a user deposits a unique amount (e.g., 7.3 ETH) and another withdraws exactly 7.3 ETH, blockchain observers can easily correlate these transactions, completely breaking privacy. Your deposit fingerprints your withdrawal.

2. Forced Withdrawal

To send funds to another recipient, you must first withdraw your balance, exposing it on-chain, then make a new deposit. This creates multiple correlation points and unnecessary on-chain exposure.

sequenceDiagram
    actor Sender
    actor Recipient
    participant Mixer
    participant ThirdParty as 3rd Party Observer
    
    Note over Sender,ThirdParty: Privacy Issue in Traditional Mixers
    
    Sender->>Mixer: Deposit 7.3 ETH
    Note right of ThirdParty: Observes 7.3 ETH deposit
    
    Mixer->>Mixer: Add to pool
    
    Note over Sender,ThirdParty: Time passes...
    
    Recipient->>Mixer: Withdraw 7.3 ETH
    Mixer->>Recipient: Send 7.3 ETH
    Note right of ThirdParty: Observes 7.3 ETH withdrawal
    ThirdParty->>ThirdParty: Correlates: 7.3 ETH deposit → 7.3 ETH withdrawal
    
    Note over Sender,ThirdParty: ❌ Privacy Broken!<br/>✗ Amount exposed (7.3 ETH)<br/>✗ Transaction linked
Loading

This is because the mixers support just two operations,

  1. Hide: To deposit assets and update merkle tree.
  2. Seek: To prove merkle-membership of a hidden unspent transaction, and withdraw it.

Introducing: Seek and Hide

We introduce a new operation, Seek and Hide. Within a single ZK proof, users can seek their transaction, withdraw any amount (including zero), and hide the remaining balance in a new transaction for themselves or another recipient. This solves both privacy problems while offering unmatched flexibility.

This revolutionizes private transactions by solving both the problems while allowing asset amount flexibility:

🔍 Seek Phase - Partial Withdrawals

Withdraw only what you need. The unique amount correlation is broken because your withdrawal doesn't match the deposit.

🎭 Hide Phase - Private Re-wrapping

The remaining balance is privately re-wrapped into a new transaction, which can be addressed to yourself or forwarded to another recipient.

The seeking, partial withdrawal and re-wrapping happens within the same ZK proof, minimizing gas costs and on-chain exposure.

sequenceDiagram
    actor Sender
    actor Recipient
    participant Mixer as MIST
    participant ThirdParty as 3rd Party Observer
    
    Note over Sender,ThirdParty: MIST Seek and Hide Solution
    
    Sender->>Mixer: Deposit 7.3 ETH (TX1)
    Note right of ThirdParty: Observes 7.3 ETH deposit
    
    Mixer->>Mixer: Add to pool
    
    Note over Sender,ThirdParty: Time passes...
    
    Recipient->>Mixer: Single ZK Proof: <br/>Seek TX1, Withdraw 2 ETH, <br/>Hide 5.3 ETH in Tx2
    Mixer->>Recipient: Send 2 ETH
    Note right of ThirdParty: Observes 2 ETH withdrawal
    ThirdParty->>ThirdParty: Cannot correlate: 7.3 ETH ≠ 2 ETH <br/>No details about Tx2
    
    Mixer->>Mixer: TX2 created privately (5.3 ETH hidden)
    
    Note over Sender,ThirdParty:  Privacy Preserved!<br/>✓ Amount correlation broken<br/>✓ 5.3 ETH privately re-wrapped
Loading

The original Seek operation can be implemented with a 100% withdrawal and no second transaction maintaining backwards compatibility. Users can also forward the full amount (e.g., 7.3 ETH) to another recipient without withdrawing anything this keep both the amount as well as asset private.

Key Features

🎯 Partial Withdrawals

  • Withdraw any amount from your deposit
  • No forced full withdrawals
  • Flexibility to manage your private funds

🔒 Private Re-wrapping

  • Send remaining balance to another recipient internally
  • No on-chain exposure of the transfer
  • Amount and asset type remain hidden

💰 Asset Privacy

  • Observers cannot determine what asset is being transferred
  • Support for any token
  • Cross-chain privacy coming soon

Security & Compliance

  • Zero-Knowledge Proofs: Recipients prove knowledge of secrets without revealing them
  • Non-Custodial: Users maintain full control of their assets
  • Compliance Ready: Configurable rules for any jurisdiction
  • Auditable Privacy: Privacy without sacrificing necessary compliance

Learn More

Developers can integrate MIST’s privacy-preserving transactions using our open-source SDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment