Sealed, quantum-safe swaps on EIP 8141 that bots can't touch.
Description
LeanSeal is a quantum-safe wallet and sealed transaction protocol built on EIP-8141 and ERC-8421, combining post-quantum cryptography, time-locked encryption, and on-chain execution enforcement to make Ethereum transactions private until execution and resistant to sandwich attacks. Just think that we are removing the 3rd party defi guys who says they can stop our attacks but works on contract orchestrations and we are someone who does that directly using alt-mempools and PQ signatures. The idea builds on a concept discussed by Vitalik Buterin at Cypherpunk: encrypting a transaction package with the information needed by its intended recipient, locking it for a predetermined number of time steps, and allowing it to be broadcast or revealed only after that time has elapsed. We took this concept further by turning time-locked encryption into an executable transaction lane, where encrypted orders move across a network of nodes and become available for execution only at their designated drand round.
Today, every swap on Ethereum exposes its intent before execution. Bots monitor public mempools, buy ahead of transactions, and sell immediately afterward, extracting value from user slippage. We measured this firsthand: a small swap on our chain suffered a 3% loss to a sandwich attack. At the same time, conventional ECDSA wallet keys face a long-term threat from sufficiently powerful quantum computers.
Existing MEV protection relies heavily on private relays, builders, or protected RPC endpoints. This replaces public exposure with trust in intermediaries. We wanted to eliminate that dependency by enforcing transaction validity and execution rules at the protocol and EVM levels.
We protocolised EIP-8141 and extended the ERC-8421 alternative mempool infrastructure to make this possible.
Quantum-Safe Wallets
LeanSeal accounts verify NIST SLH-DSA post-quantum signatures directly on-chain inside the transaction's VERIFY frame. Signature verification costs approximately 154k gas, exceeding the public mempool's 100k verification cap. We extended the alternative mempool's staked verification budget and precompile support to admit these transactions.
Sealed Transaction Lane
Orders are encrypted against future drand rounds and submitted as hash commitments. Our custom ERC-8421 mempool distributes time-locked orders between nodes under publicly published admission rules. Before the designated round, nobody, including the operators, can reveal the order. Once the round arrives, any node can decrypt and submit it for execution. This creates sealed order flow on public infrastructure without private relays or privileged access.
On-Chain Fair Execution
A custom Uniswap v4 hook enforces batch settlement directly inside the EVM. Orders are revealed and settled together at one clearing price per side. Every unauthorized swap is rejected by the hook, preventing bots from inserting front-runs around the batch. Protection is enforced by the pool itself, not by a trusted third party.
Measured Results
A swap that suffered a 3% loss in the public mempool experienced 0% loss through LeanSeal. Every attempted bot front-run was rejected, both locally and on the live hackathon devnet.
Designed for Individuals and Institutions
Individuals can authenticate using Face ID or fingerprint, with quantum-safe keys generated directly inside the browser. Their first transaction deploys the wallet, verifies the post-quantum signature, and completes a sponsored deposit without requiring ETH.
Institutions receive a dedicated trading interface for sealed block trades, supporting buy and sell orders, amounts, price limits, vault balances, and withdrawals. Large-order size and direction remain hidden until execution.
Why It Matters
LeanSeal demonstrates a new transaction architecture for Ethereum. By protocolising EIP-8141, extending ERC-8421, and combining them with drand and Uniswap v4, we bring programmable post-quantum verification, time-locked transaction delivery, and enforceable fair execution together.
LeanSeal is built across six technical layers, connecting post-quantum cryptography, programmable transaction validation, alternative mempool infrastructure, time-locked encryption, and Uniswap v4 execution.
Technologies: Solidity, C, Rust, Yul, EIP-8141.
We built an EIP-8141 smart account that reads arbitrary signature data using SIGDATACOPY, validates it against the protocol transaction sighash using TXPARAM 0x08, and authorizes execution through APPROVE.
The wallet integrates open-source SPHINCS+ verifiers supporting NIST SLH-DSA-SHA2-128-24 and the research scheme leanSphincs-s, with a dedicated Yul frame module.
One major engineering challenge was signature generation. The reference SLH-DSA signer required approximately 354 seconds per signature. We forked and optimized it using 16 threads, ARMv8 SHA-256 instructions, and a 128 MB tree cache, bringing signing time down to approximately 3 seconds.
We also implemented EIP-1167 minimal proxy wallets with public keys appended to their bytecode (45 + 104 bytes), eliminating storage writes. This reduced wallet creation from approximately 2.7M to 412k state gas.
Technologies: ERC-8421, Bun, TypeScript, libp2p.
We extended the Ethereum Foundation's ERC-8421 sidecar to support high-cost post-quantum verification and custom transaction lanes.
Our contributions include the staked verification budget supporting up to 1M gas, hash precompile support through CALLING-040, a customMempools plugin extension point, and a dedicated custom_mempool_v1 gossip topic.
During integration, we discovered that the live devnet incorrectly rejected the SHA-256 precompile as an undeployed contract, preventing NIST wallet verification. We isolated and reported the issue, which was subsequently fixed.
On top of this infrastructure, we implemented our sealed mempool as a custom plugin. It has an IPFS CID-based identifier referencing publicly published admission rules, REV-010 through REV-060, and its own gossip network. Nodes exchange drand-time-locked reveal tickets, while keepers coordinate scheduled reveals and settlements.
Technologies: Solidity, Uniswap v4, PoolManager.
We developed SealedPoolHook to enforce commit, reveal, and settle execution in rounds of four blocks.
Users submit encrypted orders, which become available at the designated drand round. During settlement, PoolManager.unlock and flash accounting allow us to net opposing buy and sell orders at the pool price, execute only the remaining imbalance, and provide one clearing price per side.
The beforeSwap callback rejects unauthorized swaps, ensuring that trades cannot bypass the batch settlement mechanism.
A particularly hacky implementation detail was mining a CREATE2 salt to obtain a hook address with exactly the required beforeSwap permission bit. We also use extsload to read pool pricing data directly from PoolManager storage.
Technologies: drand, tlock-js.
Orders are encrypted against future drand rounds. Before the designated round, nobody, including our own operators, can decrypt them. Once the round arrives, anyone can reveal them.
We combine this with on-chain hash commitments to ensure that nodes cannot replace or modify orders during the reveal process.
This removes the need for a centralized decryption authority and enables publicly verifiable time-locked execution.
Technologies: WebAuthn PRF, HKDF, Rust, WebAssembly.
We wanted quantum-safe wallets to be usable without exposing users to complicated key management.
A passkey's PRF output is processed through HKDF to derive a seed for the quantum-safe key. Our Rust leanSphincs-s signer is compiled into a 67 KB WASM module, generating keys inside the browser in approximately 0.3 seconds and signing in approximately 30 milliseconds.
Private keys never leave the browser or get stored on our servers.
Another unusual engineering solution is our browser-based signing bridge. Server-side scripts use a lightweight signer CLI stand-in that forwards signing requests to the user's active browser tab through Server-Sent Events. The returned signatures are independently verified using the native verifier before being accepted.
Technologies: ethrex, Lighthouse, Docker, DigitalOcean, pm2, Caddy.
Locally, we run an ethrex EIP-8141 branch alongside Lighthouse through Docker. Our public deployment runs on the hackathon devnet, with two sealed-mempool nodes hosted on DigitalOcean, managed through pm2 and exposed using Caddy with automatic HTTPS.
Each public demo visitor receives an isolated session, run queue, and spending limits. RPC access uses

