Skip to content
QLab
On this page

Threat model

This page says what QLab protects, against whom, and what it relies on. Where a defence is not built yet it is marked planned. Requirement IDs (FR-*, SR-*) refer to backend/docs/ARCHITECTURE.md.

Assets#

AssetWhy it matters
Provenance of a coin"This coin was launched by wallet W" must stay checkable after ECDSA is broken.
Identity secret seed (skSeed)Controls every one-time key, scheme key, derived wallet key and vault key of the identity.
One-time keysA WOTS key that signs two different messages can be forged from (see why reuse is fatal).
Vault fundsHeld by a contract at an address computed from the vault's public key. Only a verified hash-based signature can spend them.
Derived-wallet fundsOrdinary secp256k1 accounts derived from the identity.
SessionsLogins via Sign-In with Ethereum (EIP-4361) or post-quantum proof of possession.

Adversaries#

A1. A quantum-capable attacker, after ECDSA is broken#

Can: recover the secret key of any account whose public key is known, which is every account that has sent a transaction or signed a message. So they can sign transactions and messages as any wallet, including calls to the anchor contract and personal_sign outputs.

Cannot (by design):

  • produce a hypertree signature under your identity root, because that needs skSeed, which comes from your wallet's signature and, if you set one, your passphrase;
  • replace your origin anchor. The QuantumAnchor contract keeps the first identity a wallet anchors as its origin for good; it has no owner and no function that changes or removes an entry. An attacker holding your wallet key can anchor a root of their own, but only as a later entry, and verifiers accept a later identity only when the origin's own hash-based key certified it (SR-2, built, spec §11);
  • spend from the vault: the contract accepts only a hash-based signature at a live leaf, and the signature itself names the recipient, the token and the amount. The account that sends the transaction pays the gas and decides nothing (built, spec §16);
  • change a coin that is already launched: the token has no owner, its liquidity is locked in a contract with no way out, and its fee split is fixed in the locker at launch.

Can still, and nothing in QLab changes this:

  • move funds held in any ECDSA account: your wallet, the tokens it holds, identity-derived wallets;
  • claim what the locker has credited to your wallet and redirect your future creator fees: claimFees and setCreatorFeeRecipient are ordinary wallet calls. The same goes for holders' rewards;
  • re-derive your identity if it has no passphrase. The secret seed is derived from your wallet's signature over a fixed message; anyone who holds the wallet key can recompute that signature. A passphrase closes this: it goes into skSeed through Argon2id (64 MiB, 3 passes) and the app accepts it only at an estimated 2^60 guesses or more (or a generated six-word phrase). It is not unguessable in principle: with your wallet key, pubSeed and any signature you have published, each passphrase guess can be checked, at the cost of one Argon2id run plus a few hashes. Passphrase entropy is what protects you. (pubSeed itself is derived without the passphrase, so it reveals nothing about it.)
  • register first if you never anchored. Provenance relies on an anchor made while ECDSA was still secure. An identity anchored after the break proves nothing.
  • act as the owner of the launch factory, if its keys are broken. The owner can change the terms of future launches (launch configs, launch fee, protocol share, pricer, pause) and the treasury address that the protocol's share is credited to. It cannot touch a launched pool, locked liquidity, a launched coin's fee split or anyone's credited fees.

A2. A malicious or compromised QLab gateway#

Can: refuse service, censor, delay listings, show wrong market data, build bad transaction requests.

Cannot change the fee split of an existing coin: the locker stores the protocol's share when the coin launches and applies it at every collection, and the creator's side is covered by the launcher's signature (feeCreatorBps, holdersBps).

Cannot (by design):

  • make your browser reuse a one-time key: the browser ledger takes max(local, server) and refuses a second message at a used index (SR-1, built);
  • learn your secrets: keys are derived and used in the browser, and the gateway only ever sees public keys and signatures;
  • slip changes into a transaction you sign. Every prepared transaction request is decoded in the browser and checked against what you attested or entered before the wallet is asked to sign (@app/txbuild/verify): contract address, function, every argument and the native value. Values the bytes cannot prove on their own (the predicted token address, the launch fee, the protocol share, the opening tick, the least a trade must return) are read by the browser over its own RPC connection, not taken from the gateway. The decoded call list is shown for review (SR-5, built). On submit the gateway accepts only a transaction whose sender, target, value and input equal the prepared request (SR-3, built). A compromised gateway could still prepare a bad request; the check in the browser is what stops it;
  • point you at other contracts: see trust anchors;
  • move vault funds or sit between you and the vault: your wallet sends a withdrawal itself, and there is no relay;
  • attach a wallet to your identity (SR-5, built) or forge provenance: there is no server-held signing identity and no imports (SR-9).

A3. A phishing site#

Can: ask your wallet to sign the QLab derivation message.

Mitigations: the message names qlab and the chain id and says that any other site asking for it is phishing (built). With a passphrase, the signature alone does not reveal skSeed. Wallets that do not sign deterministically are refused by a sign-twice check, and smart-contract wallets, which have no ECDSA key of their own, cannot derive an identity (built).

A4. A lying RPC node or IPFS gateway#

Can: hide or delay data, serve stale state, serve other bytes.

Cannot: forge signatures or anchors. The verifier recomputes everything from the bytes it gets and re-hashes the metadata to its CID where the CID allows it, so a lying source can make verification fail but cannot make a forgery pass. When an endpoint cannot be reached the verifier reports "no verdict", never "not verified". Use more than one source if you suspect censorship.

A5. A hostile token#

Can: block or pause transfers, refuse a recipient, or keep a cut of each transfer, so that a signed vault spend can't execute as signed.

Mitigations: before any vault key signs, the vault client simulates the exact payment the vault would make (eth_call with the vault as sender; where the node supports state overrides, a probe measures what the recipient really receives). A token that blocks the vault or the recipient, a paused token, a fee on transfer and a contract that refuses the native coin are caught there (SR-11, built). A withdrawal that reverts consumes nothing, and a stuck signature never forces key reuse: landing any spend at a newer leaf advances the vault's leaf counter, and every older signature, including the stuck one, can never execute. A launch can only be quoted in the native coin or in an ERC-20 that passed the pricer's exact-transfer proof (a small amount is moved out and back, and both legs must arrive exactly); that proof is a filter, not a guarantee.

A6. Front-runners and other users#

  • A vault withdrawal carries its signature as calldata, so anyone can copy it from a pending transaction and send it first. It can only perform the exact signed spend, to the signed recipient; copying gains nothing.
  • A pending launch shows the token's address. Someone can create a pool for that address first; the launch then reverts and has to be retried with a new salt, so a new token address. Sending the launch through a private RPC endpoint avoids this.
  • The opening price is bounded: the launch names the range of opening ticks it accepts and reverts outside it, so moving the reference price just before a launch does not make it open cheap. An optional anti-snipe window makes early buys pay a high swap fee that falls to the pool's fee.
  • Spam and cost amplification are bounded by rate limits on every route (SR-6, built).
  • Fake "new coin" notifications are impossible: only the server publishes on the WebSocket (SR-6, built).

A7. Another chain#

Every digest binds the chain id as a 32-byte big-endian integer, and so does key derivation (built, SR-7). A testnet signature never verifies on mainnet, and testnet keys are different keys. The vault contract rebuilds the spend digest from block.chainid, the vault factory's address and its own address, so a withdrawal signed for one deployment is useless on any other.

Trust anchors#

What the web app treats as given, and where it comes from:

AnchorSource
Chain idPinned in the web build. Every digest, every prepared request and the RPC endpoint the browser reads from are checked against it.
Contract addresses (launch factory, locker, router, anchor contract, vault factory and vault implementation)Set at deployment and pinned in the web build. They are never taken from an API response.
Vault addressComputed locally from the vault's public key and the pinned vault factory and implementation. Before a spend the client also checks that the code at that address is the minimal clone of the pinned implementation.
Token address of a launchComputed by the browser (predictTokenAddress over its own RPC connection) before the attestation is signed.
Verifier inputsThe standalone verifier takes the launch factory and the anchor contract from you, or from a table pinned in its own build. It never asks a server which contracts to trust.

If you run your own build or the standalone verifier, take the addresses from a source you trust and compare them with what a block explorer (BscScan) shows.

Why reusing a one-time key is fatal#

A Winternitz signature reveals intermediate values of its 67 hash chains, chosen by the message it signs. A key that signs one message stays secure; a key that signs two different messages can give an attacker enough to sign other messages under it. That is why the one-time-key ledger exists, and why the vault accepts each leaf at most once and retires every older leaf when a newer one is used.

Trust assumptions#

We rely onIf it fails
SHA-256 preimage and second-preimage resistance (about 128-bit security against Grover search for 32-byte outputs)All hash-based guarantees fail.
The wallet's personal_sign being deterministic and kept secret at the time you derive and anchorKeys change between sessions (refused by the sign-twice check), or leak.
BNB Chain's ledger ordering and finality for anchors"First anchor" loses its meaning.
Your browser and device not being compromisedMalware can read skSeed while the identity is unlocked.
PancakeSwap Infinity (pool manager, vault, position manager)Third-party contracts that hold every pool's tokens; QLab doesn't control them.
Correctness of the QLab contractsFunds in a vault, locked liquidity or credited fees could be at risk. The vault and the anchor contract have no owner and no upgrade path; the launch factory has an owner with the limited powers listed under A1. An independent audit is planned.
The Chainlink BNB/USD feedOnly the USD figures shown in the app. No contract of ours reads it.

Out of scope#

  • Price risk, rug pulls and market behaviour of memecoins.
  • The security of PancakeSwap, wallets and RPC providers, and the classical cryptography of the chain itself.
  • Protecting ECDSA accounts from a quantum attacker. Only the vault does that, and only for funds deposited into it.