Search projects, hackathons, sponsors and tech

    ← All projects

    Himitsu

    Private trading without an app relayer, powered by EIP-8141 frame transactions.

    Demo

    About

    Himitsu is a private trading protocol that replaces an application relayer with native EIP-8141 frame transactions. It explores how users can authorize private spends and have gas paid by an onchain sponsor while submitting transactions directly from their browser to an Ethereum-compatible node. Private applications often rely on a relayer to submit transactions and pay gas, avoiding the need to fund a fresh recipient wallet. Himitsu moves that coordination into the transaction itself. Each withdrawal or swap contains four frames: check expiry, verify the user’s zero-knowledge proof, approve gas sponsorship, and execute the operation. Users deposit ETH or hUSD into a privacy pool and save a secret note that controls their funds. When they want to withdraw or swap, their browser generates a zero-knowledge proof locally. This proves authorization to spend an unspent note without explicitly identifying its original deposit. The secret note stays on the user’s device, and the proof binds the spend to the intended transaction. An onchain sponsor checks the operation and fee limits before agreeing to pay gas. The pool then completes the withdrawal or swaps through Uniswap V2 and sends the output to the chosen recipient. No dedicated application relayer, hosted proving server, or separate recipient gas funding is required for these supported operations. Himitsu runs on an EIP-8141-enabled Ethrex devnet. It includes ETH and hUSD deposits, withdrawals, bidirectional swaps, browser-based proof generation, and a transaction explorer showing individual frame results and the gas payer. Himitsu demonstrates how native frame transactions can simplify private application infrastructure. It reduces direct deposit-to-spend linkage, while amounts, timing, and address reuse can still affect privacy.

    How it's made

    We built Himitsu around native EIP-8141 frame transactions on an Ethrex devnet. The main engineering goal was to replace an application-operated relayer with a transaction that handles proof-based authorization, gas sponsorship, and execution onchain. The frontend uses Next.js, React, and TypeScript, with Family ConnectKit and Wagmi for wallet connections and deposits. For withdrawals and swaps, the browser constructs the frame transaction and submits it directly through RPC. The application does not require a dedicated relayer, bundler, hosted proving service, or indexer. The privacy system uses Circom circuits, Groth16 proofs, and Poseidon hashing. Deposits create amount-bound commitments in a Merkle tree, while users keep a secret note containing their spending credentials. We use snarkjs and circuit WASM inside a browser Web Worker to generate proofs locally without blocking the interface. The browser reconstructs the tree from onchain events, so note secrets and Merkle witnesses stay on the user’s device. Each private spend has four frames: an expiry check, proof verification, gas-payment approval, and execution. The privacy pool contract is the transaction sender. It authorizes execution based on the proof, while a separate, prefunded paymaster authorizes gas payment after checking the permitted operation, frame structure, and fee limits. This separates spending authority from payment authority without requiring an operator’s signature for each transaction. One particularly interesting detail is binding the proof to the exact transaction. We represent the full 256-bit transaction authorization digest as two 128-bit circuit inputs. The proof is carried in the transaction’s arbitrary-signature entry, whose raw proof bytes are excluded from that digest. This avoids a circular dependency where generating the proof would change the message being proved. We also built custom EVM bytecode helpers for frame introspection and native approval instructions. For trading, we integrated the official Uniswap V2 core contracts with a locally deployed WETH/hUSD liquidity pair. The pool transfers the exact swap input directly to the pair, enforces the minimum output, and sends the result to the recipient. Consuming the note and executing the swap happen within one contract call, so a failed swap rolls back the spend. Uniswap provides the exchange functionality while Himitsu handles private authorization and sponsorship. A notable low-level fix was patching Ethrex’s mempool validation to expose earlier frame results to later verification frames. Our paymaster needs to inspect the preceding validation result, and the patch makes that information available during simulation as well as execution. We also built an explorer that displays frame outcomes, gas usage, and the actual gas payer, making the native transaction flow visible during the demo. The prototype runs against a pinned EIP-8141 implementation with test assets, with automated tests covering transaction encoding, sponsorship rules, note recovery, and failure handling.