Skip to content
QORECHAIN
Register

Post-Quantum dApp

QVault

A vault a leaked ECDSA key cannot drain.

Share on X

About

On Q-Day every secp256k1 key becomes public. QoreChain already guards its Cosmos lane with mandatory hybrid signatures, but EVM transactions are still signed with secp256k1 alone: whoever holds the classical key can spend inside any open EVM window, and any contract that trusts msg.sender is theirs. QVault closes that gap. Every action that moves value or changes authority — withdraw, change owner, set guardian, freeze, unfreeze — requires an ML-DSA-87 signature by the key the chain itself holds for the owner, verified on-chain via the pqcVerify precompile. msg.sender is never used for authorisation: anyone can relay a signed operation, and the classical key grants nothing. A guardian with its own post-quantum key can freeze the vault but cannot move funds. Built for the Q-Day Drill: we hand over the drill account's ECDSA key and expect the attacker to keep nothing but the fee budget of a narrowly scoped EVM window.

How it's made

Solidity (Foundry) + TypeScript. Architecture - QVault.sol reads the owner's key from the chain's PQC registry via pqcKeyStatus (0x0A02) and checks signatures with pqcVerify (0x0A01). The vault stores no key, so rotating the key on chain (MsgRotatePQCKey) rotates it for the vault automatically. - The signed digest binds domain, chain id, vault address, operation, nonce, deadline and payload — no replay across vaults, chains or operations; recipient and amount cannot be swapped by a relayer. - Owner and guardian use separate nonces, so a guardian freeze never invalidates a pending owner signature. - Fail-closed: if the precompiles are inactive (as on mainnet today) they return empty data and every call reverts. Kits and network features - @qorechain/pqc — deterministic ML-DSA-87 signing in the client. - PQC key registration with proof of possession, scoped EVM window (allowed target = the vault, max-value = fee budget), Solidity PQC signature check and key status. What was hard - A registered PQC key is not proof of ownership: anyone can register someone else's public key. QVault requires possessionProven, otherwise a copied key would let one address pass as another — covered by a dedicated test. - An inactive precompile answers with success and empty data; the contract must decode strictly so this fails closed, not open. - Signature size: 4,627 bytes of ML-DSA-87 in calldata dominate the ~0.3M gas of a withdrawal. - Docs disagree on when the PQC precompiles were activated on testnet, so the first on-chain step is to check active_static_precompiles before deploying. Tests: 19 Foundry tests including a leaked-ECDSA attacker, replay, recipient/amount tampering, cross-vault and cross-chain replay, guardian limits, copied-key-without-possession, inactive precompile, and fuzzed signatures.

Timeline

QVaultPost-Quantum dApp

Pushed 1 commit to main

  • e051b91 v2: timelock + guardian veto, guardian agent, dashboard with recording; AI_USAGE.md · oxxroad
QVaultPost-Quantum dApp

Pushed 3 commits to main

  • 7d9cd6c README: withdraw client and drill tool have run on testnet · oxxroad
  • c82f7fc Deploy via ethers; record testnet deployment · oxxroad
  • f98f8c3 Add drill-account tool and rework withdraw client · oxxroad
QVaultPost-Quantum dApp

Newly verified on chain: EVM window (incl. scoped)

QVaultPost-Quantum dApp

New project.

Comments and questions

  • No comments yet.