Effe ZK swap permit
Not connected

ZK-gated Uniswap v4 swaps

Effe hooks into Uniswap v4 to gate every swap with a Semaphore zero-knowledge proof. Only members of an on-chain allowance group can trade. Connect your wallet and try it.

Demo pool swaps between two test ERC-20 tokens on Ethereum Sepolia.

You
Group
ZK Proof
Hook
Swap
1

Connect your wallet

Your wallet address is hashed into a Semaphore identity commitment — a unique number that represents you in the group without revealing your address. No private keys leave your browser.

How it works

1
Identity

Your wallet address is hashed into a Semaphore identity commitment. This is a one-way function — nobody can reverse it to find your address.

2
Group

Commitments are stored in an on-chain Merkle tree (Semaphore group). The group admin adds or removes members.

3
Proof

You generate a ZK proof that your commitment is in the tree, without revealing which one. This proof is ABI-encoded as hookData.

4
Hook

The Uniswap v4 hook's beforeSwap function decodes and verifies the proof on-chain. Valid proof = swap proceeds. Invalid or missing = reverted.

Verified Contracts

All contracts are deployed on Ethereum Sepolia and verified on Etherscan. Click to inspect the source code.

How the demo works

This demo runs a local Node.js server that holds a testnet-only deployer key. When you click an action, the server signs and broadcasts the transaction on Ethereum Sepolia using that key — your connected wallet is only used to derive a Semaphore identity commitment (a one-way hash of your address). No real funds are involved, and MetaMask never signs any transactions.

In a production system, the trader's own wallet would sign swap transactions directly, and proof generation would happen entirely in the browser. The server-side key is a demo shortcut to avoid requiring testnet ETH in every visitor's wallet.