PrivBatch

Private batch swaps on Uniswap V4 with autonomous agents & ZK proofs.

PrivBatch

Created At

HackMoney 2026

Winner of

Uniswap Foundation

Uniswap Foundation - Uniswap v4 Privacy DeFi 1st place

Project Description

PrivBatch enables private, batched token swaps on Uniswap V4 through a commit-reveal mechanism backed by zero-knowledge proofs. Autonomous trading agents monitor pools, make strategy-driven decisions (momentum, arbitrage, liquidity-based, mean reversion), and submit trades privately. Individual trade details (amounts, directions, recipients) are never publicly visible—only aggregate net deltas reach the AMM. This protects traders from MEV extraction, frontrunning, and information leakage while enabling efficient batch execution. The system combines a Uniswap V4 hook contract, TypeScript trading agents with multiple strategies, and Circom ZK circuits for commitment verification.

How it's Made

Built with Solidity (Foundry) for the PrivBatchHook Uniswap V4 hook contract, TypeScript for autonomous trading agents, and Circom for zero-knowledge proof circuits. The hook implements commit-reveal batch execution where agents submit hashed swap intents off-chain, then reveal them on-chain for batched execution. Agents use ethers.js to monitor pools via extsload (V4's state reading mechanism), implement multiple trading strategies (momentum, arbitrage, liquidity, mean reversion), and coordinate through an AgentManager. ZK circuits (Groth16) prove commitment validity without revealing trade parameters. The frontend uses React for monitoring agent performance and batch execution status. Key hack: using V4's extsload for efficient state reads without custom view functions.

background image mobile

Join the mailing list

Get the latest news and updates