Qelid technical spec

Draft of 3 December 2026. Version 1 of the vault, its factory and the fee config are built and deployed on BNB Chain testnet, and the app for it is at app.qelid.com. Staking, the paymaster and the treasury are still plans. The signature construction needs review by a cryptographer before any audit.

Components

Component What it is When
Scanner Web page that checks a wallet’s key exposure Live
QELID token Flap tax token (their contract, not ours) Launch
Treasury Multisig that receives the project share of the tax Launch
Vault ERC-4337 smart account with a post-quantum owner check On testnet
Vault factory Deploys vaults at predictable addresses On testnet
Fee config Holds fee rates, caps and tier discounts, behind a timelock On testnet
Staking Locks QELID and reports a tier After the vault
Paymaster Lets vault users pay gas in QELID After staking

Network: BNB Smart Chain mainnet (chain ID 56), testnet (chain ID 97).

On testnet, as deployed on 3 December 2026:

Contract Address
Vault factory 0x74BFf9bbc1a7D75CC15F86Ed336C4a8AF5B4249F
Fee config 0x117Eb9B245787C4D30F7B4107F2BcC46d1c5a74B
Timelock that owns the fee config 0x14D0570d6B32C4Cff12b029C4EfFDCA156FE7E47
Test token, tUSD 0x7652f572100Cf684aFb59Ee160f063E9Cf2323FB

Nothing is deployed on mainnet.

Scanner

Input: one address. No wallet connection.

Checks, through a public BNB Chain RPC endpoint:

  1. eth_getCode: if the address has code, it is a contract.
  2. eth_getTransactionCount: if greater than zero, the address has signed at least one transaction and its public key is on-chain.

Results:

Finding Message
Sent transactions > 0 Public key is exposed on BNB Chain
Zero sent, no code Public key not yet exposed on BNB Chain
Has code A contract; exposure depends on the keys that control it

Limits to state on the page:

Privacy: the address goes from the visitor’s browser straight to the RPC endpoint. Qelid’s server never receives it, so it has nothing to log.

Later additions: more chains, value at risk, a shareable result card, alerts for stakers.

Vault

Design rules

  1. One owner check, and it is post-quantum. No ECDSA key has any authority over a vault, including for recovery or upgrades.
  2. Immutable. No proxy, no admin, no upgrade path. A new version means a new vault that users move to by choice.
  3. Small. Version 1 does transfers and nothing else, to keep the audit narrow.

Account model

Getting an operation to the chain

A vault has no ordinary key, so it cannot post a transaction itself. Any ordinary wallet can carry a signed operation to the EntryPoint and pay the gas; the vault pays it back in the same transaction. The app calls this the gas wallet. It can be the user’s browser wallet or a throwaway one the app makes.

The gas wallet has no authority. It cannot change an operation’s destination, amount, gas terms or next key, because all of them are signed. A bundler service can do the same job later without any change to the vault.

Version 1 signature: Winternitz one-time keys

Parameter Value
Hash keccak256
Digit size 4 bits (w = 16)
Chains 67 (64 for the message, 3 for the checksum)
Signature size 67 × 32 bytes = 2,144 bytes
On-chain key One 32-byte hash committing to all 67 chain ends

Key rotation. A one-time key must never sign two different messages. So:

Hash domain separation. Every hash step takes publicSeed, address, value. The public seed is a 32-byte value fixed per vault when it is created. The address is the key’s id, the chain number and the position in the chain. So no two hash steps anywhere in a vault’s keys share an input prefix, and work done attacking one vault or key does not carry to another.

The first draft used the vault’s own address in place of the public seed. That is circular: the vault’s address depends on its first key, and the key would depend on the address.

Key ids. A main key’s id is epoch, index. The index counts operations; the epoch counts completed recoveries and starts the index again from zero. Recovery keys have their own range of ids.

Key derivation. All keys come from one 24-word backup phrase (256 bits, in BIP-39 words). From the phrase and the chain ID the client derives a root secret, and from the root a secret for each chain of each key. The chain ID is mixed in so the same phrase gives unrelated keys on testnet and mainnet. The factory also uses the chain ID as its deployment salt, so one set of keys never lands on the same address on two chains.

Measured cost on BNB Chain testnet, 3 December 2026, over two full runs. Each figure is the gas of the whole transaction that carried the operation. Checking a signature costs more for some messages than others, so the same operation varies from one time to the next:

Operation Gas
Send BNB 240,000 to 255,000
Send a token 274,000 to 282,000
Rotate key only 183,000 to 208,000
First operation, which also creates the vault 1,676,000
Start a recovery 214,000
Finish a recovery 82,000

Checking the signature is about 86,000 of that for a typical message and 166,000 at worst. At the testnet’s gas price of 0.1 gwei, a BNB send cost the vault about 0.000035 BNB. The vault pays the gas wallet slightly more than the gas wallet spends, so that the gas wallet does not run dry.

The one-time-key hazard

Signing two different operations with the same key leaks enough to forge a third. The contract cannot prevent this, because the leak happens the moment the second signature exists, on-chain or not.

Version 1 keeps the single chained key and handles the hazard in three ways:

A Merkle tree of one-time keys (as XMSS uses) would let a stuck operation be abandoned by moving to the next leaf, at the cost of a larger signature. It remains an option for a later version.

The record lives in one browser. Signing with the same phrase from two devices at once is not protected against.

Operations in version 1

No arbitrary contract calls. Staking and unstaking QELID come with the staking contract.

Fees

Recovery

Optional, and hash-based only:

Inheritance and multi-key vaults are tier features built on the same mechanism.

Where keys live

In version 1 on testnet, the backup phrase is kept in the browser’s storage, unencrypted. That is acceptable for test funds only. Encrypting it, and deciding between a browser extension and a mobile app, come before mainnet.

Version 2: ML-DSA

Staking

Paymaster

Treasury

What the vault does not protect

Test plan

  1. Unit tests for signature verification against independently generated test vectors. Done: the contract verifies signatures made by the app’s signer, and the reverse.
  2. Fuzzing of the verifier with malformed signatures. Done.
  3. Invariant tests: no path moves funds without a valid signature; fees never exceed the ceiling; a used key is never accepted again. Done.
  4. A full run through a vault’s life against the real EntryPoint: create, deposit, send, fail, rotate, recover, cancel. Done on a local copy of BNB testnet. The main path (create, send, rotate, recover) was run again on testnet itself with the real waiting period.
  5. Gas benchmarks on BNB testnet for every operation. Done; figures above.
  6. A public testnet period with a funded vault as a bounty.
  7. Independent audit of the vault, factory and fee config before mainnet.

Open questions

  1. Are plain QELID transfers taxed? This decides whether staking needs a workaround.
  2. Which stablecoins are fee-bearing at launch?
  3. Where do client keys live on mainnet: browser extension, mobile app, or both?
  4. Which bundler service, if any, alongside the gas wallet?
  5. Does version 1 keep the single chained key, or move to a Merkle tree of keys before the audit?