HOLOS QUANTUM

Quantum vault

The quantum vault holds HYPE, USDC and any Elysium coin under two signatures. Every withdrawal needs your wallet's own signature and a post-quantum signature made by your quantum key in your browser. Funds in the vault stay put even if an elliptic-curve key is broken, because no withdrawal goes through on the wallet signature alone.

Contract: 0x780552A171fd5452355691C28920c07C7E732C95 on Elysium (chain 99901). Open it in the app at /app/vault.

Why two signatures

A wallet address that has sent a transaction has published its public key: every signature carries it. A large enough quantum computer could compute the private key from that public key. Hash-based signatures rest only on the hash function, here keccak256, so the quantum key stays sound where elliptic-curve keys do not. The vault asks for both: msg.sender must be the account, and the call must carry a valid one-time signature from the account's quantum key. The quantum check shows on which chains an address has already exposed its public key.

The quantum key

PieceValue
Seed32 bytes from crypto.getRandomValues, generated in your browser
One-time keys1,024 WOTS+ keys, w = 16, 64 message digits plus 3 checksum digits = 67 chains of 15 steps
Hashkeccak256, 32-byte outputs
TreeMerkle tree of height 10 over the 1,024 public leaves (XMSS style)
On chainThe Merkle root, stored per account as pqRoot
Signatureleaf index, public seed, 67 chain values, 10 auth path nodes: 2,528 bytes of calldata

From the seed, the browser derives a secret seed and a public seed. Chain i of key l starts at keccak256(skSeed || word(3, l, i, 0)) and each step hashes keccak256(pubSeed || word(0, l, i, j) || x). The 67 chain ends compress into the leaf with keccak256(pubSeed || word(1, l, 0, 0) || ends), and tree nodes are keccak256(pubSeed || word(2, level, index, 0) || left || right), where word(t, a, b, c) = t << 128 | a << 64 | b << 32 | c. Every hash carries the public seed and its position, so no two hashes in the tree share an input domain.

Deriving the 1,024 keys takes about 1.1 million keccak256 calls. The app splits them across Web Workers and shows the progress; it takes a few seconds, and the public leaves are cached so the next unlock is instant.

What a withdrawal signs

digest = keccak256(abi.encode(
  keccak256("HolosQuantumVault.v1.withdraw"), chainid, vault, account, token, to, amount, leafIndex))

The digest is read as 64 base-16 digits plus a 3-digit checksum. The signature reveals chain i at position digit[i]; the vault hashes each chain to its end, compresses the leaf, climbs the auth path and compares the result with the account's root. The checksum makes any other message need a chain value that was never revealed.

Each key signs once. The vault records spent keys in a bitmap keyed by the root, so a key never signs twice, even if the same root is registered on two accounts or registered again later. The app counts them as "3 / 1,024 quantum keys used" and picks the lowest free key, merging the chain bitmap with its local record.

Rotation

rotateRoot(newRoot, sig) moves the account to a fresh set of 1,024 keys. It needs the wallet and a signature from an unused key of the current root over keccak256(abi.encode(ROTATE_DOMAIN, chainid, vault, account, newRoot, leafIndex)). The app keeps the last two keys of a root free so a rotation and an exit cancel are always possible.

Slow exit

For a quantum key that is lost:

  1. requestExit(token, to, amount) with the wallet signature only. It opens after 14 days. A new request replaces the pending one and restarts the clock.
  2. cancelExit(account, sig) cancels it with any valid quantum signature over keccak256(abi.encode(CANCEL_DOMAIN, chainid, vault, account, exitNonce, leafIndex)). Anyone can submit it, so a watcher can cancel for you even if your wallet has no gas. The nonce is bound, so an old cancel cannot be replayed on a later request.
  3. executeExit() after 14 days pays min(requested, balance) and retires the account's quantum key, so a fresh one can be registered with setRoot. Spent keys of the old root stay recorded.

A broken elliptic-curve key alone can start an exit but cannot finish it while you watch: the app shows a pending exit in a red banner with a Cancel button, and the vault emits ExitRequested, ExitCancelled and ExitExecuted.

Where the key lives

The seed never leaves your browser. The app shows it once as a backup code (8 groups of 8 hex characters plus a check group) and as a downloadable file, then stores it in localStorage encrypted with AES-GCM 256 under a key derived from your passphrase (PBKDF2-SHA256, 310,000 iterations). Holos Quantum servers read balances and quote routes; they never receive the seed, the passphrase or a signature before you send it. The backup is the key: whoever holds the code can sign, and a lost code with a forgotten passphrase leaves the slow exit as the way out.

Landing in the vault from any chain

depositFor(account, token, 0) pulls min(allowance, balance) from the caller and credits account. A Relay request with call execution uses it: the solver delivers USDC on Elysium and runs USDC.approve(vault) and vault.depositFor(you, USDC, 0) in the same fill. In the app, "Land in the quantum vault" quotes this route from Base, Ethereum, Arbitrum, BNB Chain or HyperEVM. Checked on 2026-12-03: one fill from HyperEVM credited 0.112049 USDC to the deployer's vault account, which then withdrew it with a quantum signature.

Contract

FunctionWhoWhat
setRoot(root)The accountRegisters the quantum key while none is set
rotateRoot(newRoot, sig)The account, with a quantum signatureMoves to a new root
deposit(token, amount), depositFor(account, token, amount)AnyoneERC20 deposit; amount = 0 pulls what the caller approved and holds
depositNative(), depositNativeFor(account), plain transferAnyoneHYPE deposit
withdraw(token, to, amount, sig)The account, with a quantum signaturePays out from the account's balance
requestExit, executeExitThe accountSlow exit, 14 days
cancelExit(account, sig)Anyone holding a quantum signatureCancels a pending exit
sweepSurplus(token)OwnerSends only what the vault holds above the sum of user balances (stray transfers) to the owner
verify, recoverRoot, withdrawDigest, usedBitmap, usedCount, surplusViews

The vault tracks every user balance and the total per token; sweepSurplus can never reach them. Gas of a withdrawal on Elysium, measured: 175,000 to 201,000 gas including calldata, about 0.0002 HYPE at 1 gwei. Verification is about 1,000 keccak256 calls in assembly.

Tests and checks

28 Foundry tests: signatures produced by the TypeScript signer verify in Solidity through a generated fixture (withdraw, last key, rotation, exit cancel, a withdrawal after rotation), plus valid and invalid signatures, tampered chains, wrong auth paths and public seeds, wrong message, wrong account, key reuse, rotation, slow exit and cancel, surplus sweep, native and ERC20, reentrancy, and two fuzz tests (any message withdraws; any single bit flip is rejected). On Elysium, with cents: root registered, HYPE and USDC deposited and withdrawn with browser-format signatures, an exit requested then cancelled with a quantum signature, a stray transfer swept back.

API

EndpointReturns
GET /api/quantum-check?address=Nonce per chain (Ethereum, Base, Arbitrum, BNB Chain, HyperEVM, Elysium) and how many chains show the public key
GET /api/quantum-vault?account=Root, keys used, pending exit, vault and wallet balances
GET /api/quantum-route?from=&symbol=&amount=&account=A Relay quote whose fill lands in the vault

Scope

The vault protects what is inside it. Coins in a plain wallet stay under that wallet's key alone. The wallet signature is still required for every withdrawal, so the account's wallet must remain available; the quantum key is the second factor that a broken elliptic-curve key cannot provide. No external review of the contract has been published.