A Tornado Cash withdrawal proof that pays its own gas through the alt mempool without any Relayer.
Unlink lets a Tornado Cash withdrawal proof authorise its own payout. Anyone can submit the transaction, the recipient doesn't need any ETH, and the gas fee is paid directly from the amount being withdrawn. There's no designated relayer involved. We built it on the EIP-8141 frame-transaction devnet using the ERC-8421 alternative mempool. Interestingly, the public mempool rejects these transactions, and that's exactly why the alternative mempool matters.
The problem we're trying to solve has existed since Tornado Cash launched in 2019. When someone withdraws from a mixer, they ideally want to receive their funds at a fresh address that can't be linked to the original deposit. But a fresh address has no ETH to pay for gas. The usual solution is a relayer: you generate your withdrawal proof, send it to a server someone else operates, and they submit the transaction using their funded wallet in exchange for a fee. It works, but introduces a dependency that shouldn't really need to exist. The relayer sees your withdrawal first, can refuse to process it, log requests, censor users, or simply go offline. It also becomes an obvious centralised service for regulators to target. We wanted to see if we could remove that dependency entirely.
EIP-8141 makes this possible by changing how transactions are authorised. Instead of requiring an ECDSA signature from an account holding ETH, a transaction can contain multiple frames, with a smart contract deciding whether the transaction is valid. This means we can use the Tornado Cash zero-knowledge withdrawal proof itself as the authorisation. Unlink uses a single contract, UnlinkAccount, which sits in front of the existing Tornado Cash pool without modifying the pool or its circuits. The account holds a small ETH float to cover gas upfront and acts as both the sender and payer of a two-frame transaction.
The first frame is a VERIFY frame. The account decodes the withdrawal calldata, verifies the Groth16 proof using Tornado Cash's original December 2019 verifying key, checks that the Merkle root exists in the pool's history, and confirms the nullifier hasn't already been spent. It also checks that the withdrawal fee covers the transaction's worst-case cost using MAX_COST from TXPARAM, and that the second frame contains exactly the same withdrawal call. The second frame is a SENDER frame that actually calls withdraw() on the original pool. The pool sends the withdrawn ETH minus the fee to the recipient and returns the fee to UnlinkAccount in the same transaction. So the account effectively fronts the gas cost and gets reimbursed from the withdrawal itself. The interesting part is that the transaction doesn't need anyone's cryptographic signature. Its signature field is literally ARBITRARY (scheme 0), with an empty signer and empty signature. The ZK proof is the authorisation.
The alternative mempool is essential here, not just an implementation choice. The public EIP-8141 frame mempool limits validation to 100,000 gas and doesn't allow validation to read another contract's storage. Our verification requires roughly 289,000 gas, largely because of Groth16 verification, and needs to read two storage slots from the Tornado Cash pool. So the public mempool rejects it. ERC-8421 takes a different approach: rather than banning expensive validation or third-party storage reads, it allows them under additional economic and safety constraints. After staking 0.012 ETH in the devnet registry, UnlinkAccount gets a 1 million gas validation budget and permission to read third-party storage, with the node tracing those reads to limit how many pending transactions a state change could invalidate.
For Unlink, those storage reads are quite limited. We check the pool's root history, which retains 100 roots, and the nullifier for the specific note being withdrawn. Spending one note can therefore invalidate at most the pending withdrawals attempting to spend that same note, rather than unrelated withdrawals. We also give each note its own EIP-8250 nonce lane derived from its nullifier hash. Duplicate submissions of the same note become replacements rather than spam, while withdrawals from different notes don't compete with each other. There's also no opportunity for someone watching the mempool to steal the funds. The proof's public inputs already bind the recipient, relayer, and fee, and the account checks that the execution frame matches the verified withdrawal call byte-for-byte. Someone can copy and submit the transaction, but they can't redirect the payout or increase the fee.
We got the whole flow working on the devnet. Transaction 0xc517e289...36eb98, included in block 9750 as a type 0x6 transaction, successfully withdrew 0.1 ETH to an address that had never held ETH before. The VERIFY frame used 288,806 gas, while the SENDER frame used 296,072 execution gas plus 281,520 state gas. The recipient's balance went from 0 to 0.09 ETH, and the account's ETH float increased from 0.2075 to 0.2157 ETH after receiving the withdrawal fee. The recipient didn't need to fund their address or sign a transaction with a private key. We also submitted the exact same transaction bytes to the public mempool, which rejected them with Frame transaction prefix gas budget (frames + sig cost) exceeds MAX_VERIFY_GAS, because the required budget was 450,100 gas against the public limit of 100,000. The demo shows both the successful withdrawal through the alternative mempool and the rejection through the public one.
One thing worth clarifying is what we mean by "relayerless." Transactions still need to propagate through the network, and gateways, peers, and block producers are still involved. We're not claiming to remove those. What we've removed is the designated application relayer: the separate service that receives a user's withdrawal proof, decides whether to submit it, and pays the gas from its own wallet. With Unlink, users can construct and broadcast the withdrawal transaction themselves, even from a machine with no funded Ethereum account. They don't have to trust a particular service to process their withdrawal, and anyone else can submit the same transaction without being able to change where the money goes. The proof authorises the withdrawal, the contract pays for execution, and the withdrawal reimburses the contract. That's really the idea behind Unlink: making private withdrawals self-authorising, without relying on a designated relayer to execute them.
The contracts are written in Solidity 0.8.28 using Foundry with via-IR enabled. The main contract, UnlinkAccount, extends HegotaSupport from @forshtat/hegota-support, a library built by the alternative mempool team that provides Solidity helpers for the new EIP-8141 opcodes like TXPARAM, FRAMEPARAM, SIGPARAM, FRAMEDATACOPY, and APPROVE. Everything goes through the contract's fallback() function, which dispatches based on the function selector. For withdrawals, it runs the eight validation checks and approves EXECUTION_AND_PAYMENT. We also added a separate admin() path that checks whether the resolved signer from SIGPARAM matches the owner. This path stays under the public mempool's 100k gas validation limit, which let us stake the account through the registry before it had access to the alternative mempool. The owner can also use it to withdraw any remaining ETH from the account's float.
One tricky part was the Groth16 verifier. We ported Tornado Cash's original 2019 Verifier.sol directly into the account, keeping the same verifying key. We couldn't just call the existing deployed verifier because its implementation uses staticcall(sub(gas(), 2000), ...). Under the ERC-7562/8421 validation rules, the GAS opcode is only permitted when it's immediately followed by a call, so that pattern gets rejected. We had to rewrite the precompile calls to use staticcall(gas(), 6|7|8, ...) instead. The contracts have 40 Forge tests, including a fixture containing the actual proof we successfully withdrew with on the devnet, along with a mock of HegotaSupport so we could test the frame opcode interactions locally.
The client is written in TypeScript using viem and tsx. It constructs the complete frame transaction with the account as both sender and payer, derives the EIP-8250 nonce key from uint256(nullifierHash), and attaches a single ARBITRARY signature with no signer or signature bytes. It reads the keyed nonce sequence from the NONCE_MANAGER predeploy, simulates the transaction using ethrex_simulateFrameTransaction, submits it through the alternative mempool gateway, and waits for admission and eventual inclusion. Once it's mined, the client prints a breakdown of gas usage for each frame. We also added a --canonical flag that sends the exact same transaction to the public mempool so we can capture the node's actual rejection message. We ran into a strange devnet issue while building this: the gateway's mempool database ran out of disk space, so transactions would pass every admission check but fail when the gateway tried to write them, returning -32603. We added a fallback to the miner's sidecar specifically for that error. It doesn't activate for actual validation or rule failures, since we wanted to preserve the distinction between a broken gateway and a genuinely invalid transaction.
The prover ended up being one of the most interesting parts of the project, and probably where we spent the most time debugging. The devnet uses the real December 2019 Tornado Cash 0.1 ETH pool, which means we needed the original tornado-core v2.0 circuit artifacts. Newer proving keys aren't compatible with that verifier, and the correct key is only available in websnark's older binary format. The problem was that websnark's own WASM prover produced proofs that looked perfectly valid structurally but failed verification against the pool's key. The devnet operators had apparently encountered the same issue.
We initially wrote a parser for the old binary proving-key format, which involved dealing with Montgomery-form field elements, points at infinity represented using x = 0, and the absence of a polsC table. We then fixed the old snarkjs 0.1.20 prover by computing C directly on the evaluation domain as A times B. That gave us a working JavaScript prover, but proving took around 210 seconds, which wasn't great for a demo. So we started working on a Rust prover using websnark-rs, and that's where we found the actual source of the incompatibility.
It turned out that snarkjs 0.1 derives its roots of unity using generator 5, while websnark and websnark-rs use generator 7. The newer ceremony key follows the generator-7 convention, but the original 2019 key expects generator 5. That tiny difference was enough to produce proofs that looked correct but never verified. Once we changed the Rust prover to compute H on the generator-5 evaluation domain, the proofs started passing the original pool's verifier. We verified them using eth_call against the actual pool before submitting any transactions. Even better, proving time dropped from roughly 210 seconds in JavaScript to about 0.2 seconds in Rust. For note generation, we use 31-byte nullifiers and secrets, Pedersen commitments through circomlibjs, and a MiMCSponge Merkle tree reconstructed from the pool's Deposit events.
The frontend is built with Vite and React, with Hono powering the local API. We kept it fairly simple, with three main pages: one for depositing and withdrawing from the pool, one showing a ledger of every transaction attempt along with its per-frame gas usage, and one explaining how the system works. The API supports two backends behind the same interface. There's a mock backend that reproduces the real response shapes, timings, and even the exact public mempool rejection string, and a live backend that runs the actual Rust prover in a child process. We initially tried running proving directly, but it blocked the server's event loop, so moving it into a separate process made things much smoother. The live backend also streams job progress to the frontend using SSE. For the hosted demo, we made the mock backend run entirely inside the browser, which means we can host the site on GitHub Pages without needing a server. We intentionally went with a paper-like design using serif and monospace typography rather than a component library.
Most of the project is built directly on the Ethereum Foundation alternative mempool team's stack. We used their ethrex devnet with EIP-8141 and resource-based gas accounting, the ERC-8421 gateway and sidecar, the NaiveStakingRegistry, the workshop repository, and the hegota-support library. We also ran into a few details that weren't documented and had to figure them out ourselves. For example, deploying a HegotaSupport contract takes around 12 million gas because it deploys seven helper contracts and incurs additional state gas. Sending ETH to a completely new address costs roughly 204,000 state gas, which matters a lot when you're trying to fund a fresh withdrawal recipient. We also found that the simulation RPC returns canonicalMempoolValid and canonicalMempoolViolation, rather than the field names shown in the README. These were small things individually, but they made a real difference when getting the complete flow working.
There are a few implementation choices I'm particularly happy with. Instead of hardcoding some conservative gas fee, we compare the withdrawal fee directly against MAX_COST, which is the node's own worst-case solvency estimate for the transaction. That means an included withdrawal can't leave the account underfunded relative to the transaction cost. Deriving a separate nonce lane from each nullifier also means duplicate withdrawals naturally become replacements, while unrelated notes can be processed independently. And my favourite detail is still the empty signature. We spent quite a bit of time getting all the pieces to work together, but the end result is a transaction where the proof itself is enough to authorise execution. There's no user ECDSA signature, no funded recipient wallet, and no designated relayer. The proof really is the signature.

