Unrelayed

Relayer-free Tornado Cash withdrawals: a staked contract pays the gas via the ERC-8421 alt mempool

ETHGlobal MumbaiShipped November 5, 2026Prize winner Shipping#privacy#zk#identity#infra#ethereum
Repo
Unrelayed banner

About

If you want to withdraw from Tornado Cash privately, you withdraw to a brand-new wallet with no history. But that wallet has no ETH, so it can't pay the gas for its own withdrawal. Today the answer is a relayer: an off-chain server that sends the transaction for you and takes a fee. It works, but the relayer sees your IP address, can log you, can refuse to serve you, and can be shut down. The one part of the privacy flow that isn't trustless is the part that touches the network.

Unrelayed removes the relayer. Instead of a server, a staked smart contract called TornadoExit sends every withdrawal itself. It uses EIP-8141 frame transactions and the ERC-8421 alternative mempool. A withdrawal is a single transaction whose sender is TornadoExit, and it has two frames:

  • A verification frame, where TornadoExit decides whether to pay. It checks the Tornado zero-knowledge proof. It reads Tornado's state to confirm the Merkle root is known and the note isn't spent. It checks that the transaction has exactly the expected shape, that it names TornadoExit as the relayer, and that the fee covers the worst-case gas cost. Only if everything passes does it approve paying for the transaction.
  • An execution frame, which calls the normal, unmodified Tornado withdraw, with TornadoExit as the relayer. Tornado pays the 0.1 ETH (minus the fee) to the fresh wallet and pays the fee back to TornadoExit. So TornadoExit gets its gas back plus a small margin on every withdrawal: about 0.0014 ETH per withdrawal in our tests.

The user only generates the proof on their own machine and picks any fresh address. They don't sign anything, they don't need any ETH, and no server is involved.

Why this only works on the alternative mempool: - Gas: verifying the proof takes about 260k gas of validation, but the canonical EIP-8141 mempool allows 100k. - Storage: the check has to read Tornado's storage, which the canonical mempool forbids. ERC-8421 allows both for a staked entity, so TornadoExit is staked in the ERC-8421 registry. - Duplicates: the transaction's nonce key is the note's nullifier hash. Two attempts to spend the same note land in the same mempool slot, so the mempool itself refuses the duplicate. Spammers can't make TornadoExit pay for failed attempts or damage its reputation.

What we showed on the public devnet, against the real Tornado 0.1 ETH pool, with real proofs: - a withdrawal to a never-used wallet, with TornadoExit paying the gas; - the same transaction rejected by the canonical mempool; - an unstaked copy of the contract rejected; - a duplicate spend refused; - 15 kinds of malformed transactions (wrong relayer, low fee, bad proof, extra frames and so on) rejected before TornadoExit pays anything.

The full suite runs end to end on the devnet, and every test with its transaction hashes is logged in the repo.

Along the way we found a few things about the devnet: - The predeployed pool uses its original 2019 verifier, so you need the matching v2.0 proving key. - Its verifier uses a gas pattern the mempool bans, so we wrote a validation-safe copy of the same verifier for the check. - The mempool won't let you read an empty account's code during validation. A recipient that reverts on receive could therefore make one withdrawal fail, but the nonce-key design limits that to one failed attempt per note.

Limitations, honestly:

- The anonymity set on the devnet is tiny. - You still need Tor or a private RPC to hide your IP from the node you submit to. - Frame transactions aren't on mainnet yet.

The design isn't specific to Tornado: it works for any Merkle-tree privacy pool that pays a relayer fee, and Railgun is the natural next target.

Prizes

  • Ethereum Foundation · Best use of the Frame Transaction Alternative Mempool · 3rd place

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?

ShippingLast push 28 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.

Unlink

A Tornado Cash withdrawal proof that pays its own gas through the alt mempool without any Relayer.

Halo2 Privacy Frames

Private withdrawals that pay their own gas, with Halo2 proofs in EIP-8141 frame transactions

Tornado Cash 2.0

Native EVM Privacy-Preserving Lending Platform: Leveraging the Poseidon Hash, Noir DSL, IMTs, Aave, Intents, & ZKPs