About
Topi is a post-quantum private payment system built on Ethereum. It allows users to deposit, hold, and privately withdraw ETH without exposing their transaction history, their physical network location, or their wallet identity.
### The Problem
Existing on-chain privacy protocols (such as Tornado Cash and Railgun) suffer from three critical vulnerabilities: 1. **The Quantum Threat**: They rely on elliptic-curve pairings (BN254/Groth16) and classical ECDSA signatures. When quantum computers arrive, every historical and active note in these pools can be unmasked and drained. 2. **Network Layer Leakage**: Transactions are sent directly to RPC nodes and public mempools, broadcasting the user's IP address, ISP, and timing metadata. 3. **The Relayer & Gas Bootstrapping Dilemma**: To withdraw to a fresh address without linking identity, users need a way to pay gas. Traditional relayer networks are fragile, centralized, and constantly targeted for censorship.
### What Topi Delivers
Topi eliminates all elliptic curves, pairings, and trusted setups across the entire transaction path—replacing them with hash-based, lattice-based, and symmetric constructions from packet transmission to on-chain execution.
### How the System Works
1. **Shielded Deposit**: A user deposits ETH into the pool alongside a blinded precommitment. The smart contract assigns an index, computes the note commitment, and appends it to an incremental Poseidon2 Merkle tree (the pool tree) and an association tree. 2. **Zero-Knowledge Spend Proof**: To withdraw, the user’s wallet syncs Merkle roots from on-chain event logs and generates a zero-knowledge withdrawal proof locally. Using Spartan-WHIR over the 31-bit KoalaBear field, proving completes in ~1 second (450 MB RAM) on consumer hardware, proving ownership of an unspent note without revealing which note it is. 3. **Post-Quantum Mixnet Routing**: Instead of sending the ~1.3 MB proof to an RPC node, the wallet breaks it into ~280 fixed-size 8 KB onion packets. These packets are routed across a 4-node mixnet (Gateway → Mix → Exit) encrypted with X-Wing (ML-KEM-768 + X25519). Packets are mixed, shuffled in batches every 1.5 seconds, and padded with dummy cover traffic to defeat traffic analysis. 4. **Anonymous Rate-Limiting**: To prevent DDoS attacks without requiring accounts, the gateway verifies a Binius64 zero-knowledge ticket over SHA-256 once per 10-minute epoch. A single 164-byte token on the first packet unlocks a 512-packet continuation budget. 5. **NAT-Friendly Replies**: The first packet embeds a Single-Use Reply Block (SURB). The exit sends an acknowledgment back through a reply relay to a mailbox on the gateway. The client polls the gateway, so withdrawals work seamlessly behind firewalls and mobile cellular uplinks without opening inbound ports. 6. **Exit Aggregation & Recursion**: An exit operator pulls two pending spends from its queue and runs leanVM recursion. It folds both client proofs into one compact terminal proof (~100 KB), amortizing the verification gas on-chain. 7. **EIP-8141 Settle & Alternative Mempool**: The exit submits a frame transaction where the pool contract itself is the sender. Gas is sponsored by a post-quantum paymaster verified via a 5.6 KB stateless leanSPHINCS signature. Because verifying this signature requires 160,100 validation gas (exceeding standard public mempool limits), transactions route through a dedicated ERC-8421 alternative mempool that gossips transactions over libp2p. 8. **Mathematical Assurance**: The state transition rules are modeled in Lean 4 with machine-checked proofs guaranteeing that no nullifier can ever be double-spent and the pool balance invariant is strictly preserved.
From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.






