Latch

ZK-private batch auctions on Uniswap v4 — hidden orders, zero MEV, optional KYC compliance

HackMoney 2026Shipped January 30, 2026 Dormant#defi#privacy#zk#identity#security
Visit Repo
Latch banner

About

Latch is a Uniswap v4 hook that makes trading private by design. Orders are submitted as blinded commitments, settled at a single ZK-verified clearing price, and never exposed to front-runners or sandwich bots. Optional compliance mode lets institutions participate through dual-root whitelist verification without sacrificing privacy guarantees.

The Privacy Problem:

On-chain trading leaks information at every step. When you submit a swap, your intent is broadcast before execution — searchers exploit this asymmetry to extract value via front-running and sandwich attacks, costing traders over $1B annually. This isn't a bug in any protocol; it's a structural consequence of sequential, transparent order execution on public blockchains.

How Latch Eliminates Information Leakage: Commit Phase — Traders submit only a commitment hash. Order amount, price, and direction are completely hidden. All traders post identical token1 bonds, making buyers and sellers indistinguishable on-chain — even the trade direction is private. Reveal Phase — After the commit window closes, traders reveal order details. The contract verifies each reveal matches its commitment hash. No one can act on order information before all orders are collected. Settle Phase — An off-chain solver computes the uniform clearing price and generates a ZK proof (Noir circuit, UltraHonk proving system) that cryptographically guarantees: the clearing price maximizes matched volume, all fills respect limit prices, pro-rata allocation is correct, and every trader is whitelisted (in COMPLIANT mode). The contract verifies the proof on-chain — no trust in the solver required. Claim Phase — Traders withdraw their matched tokens and deposit refunds.

Key Privacy Innovations:

Uniform bond deposits hide trade direction during commit (buyers and sellers look identical on-chain) ZK proof is the sole authority for settlement correctness — the contract only validates chain-state bindings Dual-root whitelist system: keccak Merkle proofs for on-chain commit access control, Poseidon Merkle proofs verified inside the ZK circuit for settlement — compliance without privacy leakage 25 public inputs (9 base + 16 fills) carefully partitioned between on-chain validated and proof-trusted values

Optional Compliance:

Pools can operate in PERMISSIONLESS mode (open to all) or COMPLIANT mode with KYC whitelist verification. The dual-root design means compliance checks happen both on-chain (keccak proofs at commit) and inside the ZK circuit (Poseidon proofs at settlement), preserving privacy while satisfying regulatory requirements.

Technical Stack:

Solidity 0.8.27 smart contracts (Uniswap v4 hooks, EIP-170 compliant), Noir ZK circuits (103 tests), UltraHonk proof system (no trusted setup), TypeScript solver with real-time ZK proof generation (~5s), Next.js frontend with privacy visualization. Deployed and E2E verified on Unichain Sepolia with real ZK proofs (2.98M gas settlement). 894 Solidity tests including fuzz and invariant testing. Latch proves that privacy and compliance can coexist — fair, private, verifiable trading for everyone.

From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

DormantLast push 299 days ago

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.

GrimSwap

Privacy DEX on Uniswap v4 — ZK-SNARK proofs + stealth addresses break the sender-receiver link.

HackMoney 2026Prize winner Dormant#defi#privacy

Confidential Hook

ZK-powered hook that enable confidential trading with compliance, policy, and strategy verification