Q-frame

Post-quantum frame txs & 2D nonces on staked mempools with Arkiv DB-Chain.

Q-frame

Created At

ETHGlobal Mumbai

Project Description

Quantum computers running Shor's algorithm will compromise Ethereum's ECDSA cryptography. While NIST has standardized quantum-resistant algorithms (NIST FIPS 205 / SLH-DSA / SPHINCS+), verifying their deep hash trees requires over 260,000 gas—far exceeding Ethereum’s 100,000 gas canonical mempool validation ceiling. Furthermore, post-quantum One-Time Signatures (OTS) introduce a cryptographic danger: a leaf key can never sign twice under the same nonce without leaking private key material. Traditional linear nonces cause head-of-line blocking, and traditional Replace-By-Fee (RBF) destroys key security by re-signing under the same nonce.

Q-FRAME solves this with an end-to-end post-quantum execution pipeline:

  1. EIP-8141 Frame Transactions: Decouples verification, execution, and gas sponsorship via the APPROVE opcode without heavyweight account abstraction predeploys.
  2. ERC-8421 Staked Mempool on Hegotá Devnet: Senders stake economic collateral (0.012 ETH) into a registry to unlock an expanded 2,000,000 gas validation envelope, protecting nodes from DoS.
  3. EIP-8250 2D Keyed Nonces: Derives 12 isolated parallel channels (Leaves 0..11) via keccak256(wallet, leafIndex), enabling concurrent post-quantum transactions.
  4. Cryptographic Safe Fee-Bumping: When gas spikes, Q-FRAME burns the exposed OTS leaf key and allocates a fresh channel for higher-gas re-submission, preserving OTS invariants.
  5. Zero-State Device Recovery: Scans on-chain state on a new device and applies an automated +16 Safety Gap, resuming allocation safely past dropped mempool transactions.
  6. Arkiv DB-Chain Ephemeral Journal: Synchronizes leaf channel reservations on Arkiv Rabdi Testnet using native 10-minute auto-expiring TTLs. Dropped mempool frames automatically self-prune without central servers or cleanup gas.

How it's Made

Q-FRAME was built from scratch across smart contracts, decentralized database infrastructure, a modular TypeScript SDK, and an interactive studio:

• Smart Contracts & Alternative Mempool (Ethrex Hegotá Devnet, Chain ID 3151908): We developed EIP-8141 Frame Transaction validation logic and the ERC-8421 Stake Registry in Solidity using Foundry. Senders stake 0.012 ETH on Hegotá to be admitted into the alternative mempool with an expanded 2,000,000 gas limit.

• Arkiv DB-Chain Integration (Rabdi Testnet, Chain ID 7794095): We integrated @arkiv-network/sdk v1.0.1 to create an on-chain ephemeral write-ahead journal. We defined the qframe.leaf-journal schema with 4 indexed columns (wallet, leafIndex, nonceKey, action) and committed leaf reservations with native 10-minute TTLs (ExpirationTime.fromMinutes(10)). This allows cross-device synchronization where dropped transactions cleanly self-destruct at the storage layer without manual state maintenance.

• Production SDK (@q-frame/sdk): We packaged our key derivation, EIP-8250 channel allocation, safe-bump router, and Arkiv client into an independent npm package (q-frame-sdk@0.1.1). We verified it with an isolated 3rd-party consumer app running on port 3001 passing 8/8 automated E2E test suites.

• Notable Hacky / Innovative Engineering: Traditional Replace-By-Fee (RBF) is fatal for post-quantum OTS keys because re-signing under the same nonce leaks the private key. We engineered a cryptographic "Safe Bump" mechanism that mathematically marks the old leaf as burnt, increments a local fee tier, derives a fresh 2D nonce channel, and commits the transition to Arkiv with an auto-expiring lease.

• Frontend Web Studio: Built with Next.js 16 (Turbopack) using Swiss International Typographic design principles. Features EIP-6963 multi-wallet discovery (MetaMask, Phantom, Rabby, Coinbase), real-time gas comparison simulators, interactive channel state grids, and a persistent Write-Ahead Journal.

background image mobile

Join the mailing list

Get the latest news and updates

Q-frame | ETHGlobal