Lifeboat: PQ Vault

Post-quantum secure vault, using Frame transactions, ENSv2 & WorldID Kit

Lifeboat: PQ Vault

Created At

ETHGlobal Mumbai

Project Description

  • Every EOA that has ever sent a transaction has its public key on-chain. A sufficiently powerful quantum computer running Shor's algorithm can recover the private key from that public key. That covers most of the ETH, tokens and NFTs on Ethereum.
  • "Migrating" to a PQ wallet doesn't really work today. If you point your EOA at a PQ verifier with EIP-7702, your old ECDSA key still works at the protocol level. An attacker who recovers it can still drain you or re-delegate the account. EF and Nethermind researchers list this as one of the two open blockers for PQ accounts.
  • PQ signatures don't fit the public mempool. EIP-8141 caps validation work at MAX_VERIFY_GAS = 100,000. Hash-based PQ signatures cost far more to verify, so the public mempool refuses them. The EF alt mempool (ERC-8421) exists to accept exactly these transactions.
  • Users can't wait for a hard fork, and wallets can't sign PQ yet. People need protection now without giving up MetaMask-style UX.

Our angle: we can't kill the old ECDSA key, so we take its power away. It keeps day-to-day convenience but loses the power to move funds fast.


How it works

Funds sit in a Lifeboat vault (a frame-transaction smart account), not in the bare EOA balance. The vault answers to two keys with very different powers.

| Key | Who holds it | What it can do | |---|---|---| | Hot key (ECDSA, e.g. MetaMask) | Daily wallet | Start a withdrawal, which only executes after a timelock (e.g. 24h) | | Lifeboat key (post-quantum, hash-based WOTS+/XMSS) | Cold device or paper | Veto any pending withdrawal, move funds instantly, revoke the hot key entirely, rotate keys |

The attack story, which is also the demo:

  1. The attacker recovers the ECDSA private key (we play the "quantum attacker" on stage and literally paste the key).
  2. The attacker calls requestWithdrawal to drain the vault. It enters a pending state with a timelock.
  3. The watcher alerts the owner. The owner signs a veto with the PQ Lifeboat key.
  4. The veto goes out as an EIP-8141 frame transaction. The public mempool rejects it (verification exceeds 100k gas), but the alt mempool admits it.
  5. The withdrawal is cancelled and the funds stay put. Optionally, the owner "cuts the cord" and revokes the ECDSA key's role completely.

Why this matters beyond the demo: if Ethereum later hard-forks to disable ECDSA, every Lifeboat account already has a registered PQ key. Those accounts are rescued for free, with no seed proofs and no emergency process.


Architecture

On-chain (alt mempool devnet)

  • LifeboatVault: frame-tx account code.
    • The VERIFY frame accepts either an ECDSA signature (restricted to requestWithdrawal) or a WOTS+ one-time signature plus a Merkle path to the stored XMSS root.
    • State: pqRoot, nextLeafIndex (one-time keys, never reused), hotKey, pending[id] {to, amount, unlockTime}.
    • Actions:
      • requestWithdrawal (hot key)
      • executeWithdrawal (anyone, after timelock)
      • veto(id) (PQ)
      • instantMove (PQ)
      • revokeHotKey (PQ)
      • rotatePQRoot (PQ + World ID, see below)
    • The vault pays its own gas on the PQ path, so there is no ECDSA anywhere and no relayer.
  • Keyed nonces (live on the devnets) let a veto land independently of pending hot-key actions.

Off-chain

  • PQ signer: a local CLI/browser tool that holds the XMSS tree and signs WOTS+ messages. Keys never leave the device.
  • Watcher: an open-source script that watches WithdrawalRequested events and alerts the owner.
    • It can optionally hold a pre-signed "panic freeze" that can only delay funds, never move them. If it leaks, the worst case is a griefing delay.
  • Frontend: shows vault status, pending withdrawals, timelock countdowns, and a "veto" button that triggers the PQ signer.

How it's Made

Lifeboat is a quantum-veto smart-contract vault: an everyday ECDSA "hot key" can only start a timelocked withdrawal, while a post-quantum key can veto, instant-move, revoke the hot key, or rotate the root. The security claim is that even an attacker who fully recovers your ECDSA key with a quantum computer can start a drain but can never complete one before the PQ key cancels it.

The stack is a pnpm monorepo. The core is a Solidity + Foundry contract (LifeboatVault.sol) with a hand-rolled WOTS+/XMSS post-quantum signature verifier — hash-based one-time keys committed to an XMSS Merkle root, verified on-chain via a Merkle authentication path, with an (epoch, leafIndex) "used-leaf" map so one-time keys can never be replayed. The matching signer is a dependency-free TypeScript PQ library (wots.ts + xmss.ts). An SDK (viem), an operator CLI, and a watcher that streams withdrawal events and holds a pre-signed panic-freeze ready to broadcast round it out. The frontend is Next.js 14 (App Router) + wagmi + viem + Zustand, with both an in-browser local-demo mode and a live Sepolia mode. We also shipped an ERC-7579 executor module and an ENS EAC-registry guard so the vault can plug into existing smart accounts.

Partner tech — World ID (v4): we gate the most dangerous action, rotating the PQ root, behind a World ID proof of personhood (IDKit + idkit-server), making human recovery a hard requirement an attacker can't forge. The relying-party context is signed server-side with an RP key that never touches the browser. We layered on risk-based spend policies (daily limit / allowlist for instant sends), an M-of-N guardian quorum (Ledger or social recovery), an inheritance dead-man's switch, and a low-power emergency-freeze role.

Notably hacky bits: (1) Because every field of the action digest is a static 32-byte word, abi.encode collapses to a plain concatenation — so our TS signer reproduces the exact on-chain keccak digest byte-for-byte without an ABI encoder, keeping the PQ signer zero-dependency. (2) wagmi's connector barrel transitively drags in @coinbase/cdp-sdk's @x402/* payment modules; we stripped them with a webpack IgnorePlugin namespace regex plus resolve.fallback falses for bufferutil/utf-8-validate to keep the browser bundle from exploding — the one surgical hack that made the whole DApp build.

background image mobile

Join the mailing list

Get the latest news and updates

Lifeboat: PQ Vault | ETHGlobal