DocsSecurity model

Security model

Status: devnet only, not audited, custom WOTS implementation. Do not treat QVAULT as production custody.

Trust boundaries#

Component Trusted for Not trusted for
Your browser and device Generating and holding the phrase, WOTS signing –
QVAULT program (on-chain) Enforcing the signature and the fund flows – (see upgrade authority)
Connected wallet (fee payer) Paying fees and rent Any authority over vault funds
RPC provider and the site's gateway Relaying reads and transactions Correctness (it can censor or lie, but it cannot forge a spend)
QVAULT operators Serving the web app Seeing your phrase: it is never sent anywhere

Threat model#

Threat Outcome
A quantum attacker recovers your wallet's Ed25519 key They cannot move vault funds, because the fee payer has no authority over them. They can only take what is in that wallet.
A quantum attacker attacks the vault They must forge a WOTS signature: about 2^96 quantum or 2^192 classical work (Cryptography).
Front-running: someone copies a broadcast spend and submits it with their own fee payer Identical outcome. Every destination and amount is inside the signature, so they only pay the fees and rent. Tested.
Replay of a used signature Rejected. A spent vault is a tombstone and never Open again, even after new deposits, and its address cannot be re-opened. Tested.
Changing the amount, recipient, next vault, action, mint or program The signature fails. Tested.
A griefer pre-funds or pre-opens the next vault's address Tolerated. Creation handles prefunded accounts, and a pre-opened vault is accepted if it is Open with the right hash. Tested.
Non-canonical token accounts, Token-2022 Rejected. Tested.
The signature leaks before execution (dropped transaction, RPC, mempool) Harmless. Only the signed message can execute, and the checksum prevents derived forgeries.
A second, different signature from the same vault key Weakens the key enough to make forgeries feasible. See the one-signature rule.
A mint's freeze authority freezes the vault's token account See freeze authority.
A malicious or compromised RPC Can delay, censor or misreport state. Cannot forge a spend.
Phrase leak (malware, screenshot, shared backup) Total loss of every vault in the chain. Protect it like a wallet seed.
Upgrade authority compromise Total loss is possible. See upgrade authority.

The one-signature rule#

A WOTS key reveals part of itself with each signature. One signature is safe. Two signatures on different messages from the same key reveal enough chain values to make forging further messages feasible. Re-sending the same signed message is always safe, because signatures are deterministic.

The program spends each vault exactly once. The remaining risk is on the client: signing a second, different withdrawal for a vault whose first withdrawal never landed. The web app prevents this in code:

  • Preflight before signing. Every check that could make a spend fail on-chain runs before the key is used: balances, recipient rules, rent, token accounts, freeze state, the next vault, transaction size and fee-payer funds. A spend that would fail is never signed.
  • SpendGuard. Before the one-time key signs, the app persists a record in the browser's local storage, keyed by program id and vault hash. The record holds the SHA-256 of the signed message and the transaction bytes. All of this is public once broadcast, and none of it is secret.
  • Any other message for that vault is refused, with a clear error and a re-broadcast option. A corrupt record also refuses (fail closed).
  • Re-broadcast rebuilds the original spend for whichever wallet is connected, with a fresh blockhash, after checking that it matches the stored message hash. Pending spends resume after a page reload.

Once the wallet dialog opens, the spend counts as signed#

The spend transaction reaches your wallet with the WOTS signature inside it, and many wallets simulate transactions through their own RPC. From that moment QVAULT treats the signature as public. If you decline in the wallet, that vault is still committed to that exact spend. You can re-broadcast it later, from any wallet, but the app will not sign a different withdrawal from the same vault. The review screen states this before you confirm.

If a committed spend can no longer execute, for example because the vault's balance dropped below the signed amount, the vault stays locked until it can. Depositing enough to cover the signed amount makes it executable again. This is deliberate: stuck funds are recoverable, while a weakened key is not.

Freeze authority#

Some SPL mints have a freeze authority that can freeze any holder's token account. If the vault's account for a mint is frozen, a spend that binds that mint cannot execute. Mitigations:

  • Preflight warns when a mint has a freeze authority, and refuses to sign a spend that binds a frozen account.
  • Spends that do not bind that mint are unaffected, so SOL and other tokens can still move.
  • One spend binds at most one mint, and other tokens are swept afterwards, so one hostile token cannot block the rest.

Upgrade authority#

The program is deployed as upgradeable, and its upgrade authority is an ordinary Ed25519 key. Whoever controls that key, including a future quantum attacker who derives it from its public key, could deploy a malicious version and drain every vault. On devnet this is an accepted, documented risk.

Before any mainnet deployment, the program will be made immutable, or its upgrade authority will be put behind a hash-based (WOTS) or multisig scheme. The decision will be published with the audit. Until then, "zero elliptic curves" describes vault withdrawals, not the whole system.

Audit status#

Not audited. The program has 30 integration and unit tests running the real binary against the real SPL Token and ATA programs. The SDK has 22 tests, including bit-for-bit vectors shared with the program. The web layer has its own test suite. None of this replaces an independent audit, which comes before any mainnet decision (see Roadmap).

Known limitations#

  • Devnet only. Custom WOTS implementation, not audited.
  • Each spend moves SOL plus one token mint; other mints are swept afterwards. Classic SPL Token only.
  • Each spent vault keeps its rent (504,700 lamports on devnet) as a permanent tombstone.
  • About 450k–640k compute units per spend. On mainnet, priority fees would scale with that.
  • The largest transaction (WithdrawToken) is 1,207 of 1,232 bytes. A priority-fee instruction fits, but a memo does not.
  • A new recipient account must receive at least the rent-exempt minimum; preflight checks this.
  • Chain discovery assumes the linear chain (the next vault is index + 1).
  • The phrase is the only backup. There is no recovery service.
  • Local storage holds the SpendGuard records. Clearing site data on one device while a spend is pending removes that device's protection against signing a second message for that vault. The on-chain state still prevents a double spend, but not the key weakening. Finish or re-broadcast pending spends first.

Responsible disclosure#

If you find a vulnerability in the program, the SDK or the web app, please report it privately to TODO-LEAD before disclosing it publicly. Include the affected component, steps to reproduce and the impact. Devnet funds have no value, so please do not demonstrate issues against other users' vaults; use your own.