How Qelys works
A specification of the hash-based identity, attestation and proof protocol behind every launch. Everything below is implemented in src/lib/pq and runs identically in the browser and on the server.
#Overview
Each user holds a post-quantum identity: an XMSS-style Merkle tree over 256 Winternitz one-time signature (WOTS) keys, deterministically derived from an Elysium (EVM) wallet signature. The tree root is the public key; a hash of the root is the user's pq1… address.
Every launch consumes one leaf. That leaf signs a digest of the coin's identity (token address, creator, name, ticker, image) and also owns the launch salt that fixes the token address. The signature is pinned into the coin's IPFS metadata, which Montra records on chain as the token's metadata URI, so anyone can check provenance with nothing but SHA-256, after any elliptic-curve break.
#Threat model
We assume an adversary who can eventually forge secp256k1 signatures, either via a cryptographically relevant quantum computer (Shor's algorithm) or via an unexpected classical advance against elliptic-curve discrete log. An EVM address is a hash of its public key, but the key is public the moment the account sends its first transaction, and every wallet that has launched a coin has sent one: for active accounts there is no hash shield.
| Asset | Pre-break | Post-break |
|---|---|---|
| HYPE / tokens in secp256k1 accounts | safe | exposed (move them into the quantum vault) |
| Coin provenance (who launched it) | wallet signature | WOTS attestation + anchor |
| Login / account ownership | wallet signature | WOTS challenge-response |
| PQ identity (hardened) | safe | safe, given passphrase entropy |
| PQ identity (wallet-only) | safe | re-derivable by the attacker |
#Primitives
Every hash in the protocol is SHA-256 with n = 32 bytes. Security reduces to second-preimage resistance of SHA-256; Grover's algorithm lowers this to roughly 2128 quantum work, which remains out of reach.
Tweakable hash
Following SPHINCS+, each call is domain-separated by a public seed and a 32-byte address ADRSthat pins it to exactly one position in the structure. This prevents multi-target attacks: an adversary cannot amortise a preimage search across many chains or users.
#WOTS one-time signatures
Winternitz parameter w = 16 trades signature size against hashing: each 4-bit digit of the message selects a position on a hash chain of length 15.
| Symbol | Value | Meaning |
|---|---|---|
| n | 32 | hash output, bytes |
| w | 16 | chain length + 1 |
| len₁ | 64 | ⌈8n / log₂ w⌉ message digits |
| len₂ | 3 | ⌊log₂(len₁(w−1)) / log₂ w⌋ + 1 checksum digits |
| len | 67 | chains per key |
Message encoding
The 32-byte digest is split into 64 nibbles d₀…d₆₃. A checksum over the "remaining distance" of every chain is appended as three more base-16 digits:
The checksum is what makes the scheme unforgeable: to change a message digit upward (which needs only extra hashing from a public σᵢ), a forger necessarily lowers C, and inverting a checksum chain requires a SHA-256 preimage.
Sign & verify
σᵢ = Fdᵢ(skᵢ) · verify: F15−dᵢ(σᵢ) ≟ pkᵢ
Signing costs Σdᵢ hashes, verification Σ(15−dᵢ); together exactly 67 × 15 = 1,005. Because σ reveals intermediate chain values, a key that signs two different messages leaks enough to forge a third. Leaf reuse is therefore refused at the database level (see leaf ledger).
#Merkle identities
The 67 chain ends of leaf i compress to one node, and 256 such leaves form a binary tree of height 8. The root, together with pk.seed, is the identity's 64-byte public key.
nh,j = SHA-256(pk.seed ‖ ADRS(2, h, j) ‖ nh−1,2j ‖ nh−1,2j+1)
A full signature is (leaf, σ, a₀…a₇): 4 + 67·32 + 8·32 = 2,404 bytes. Verification recomputes the leaf from σ and climbs 8 levels; it is valid iff the result equals the registered root.
#Key derivation
No new seed phrase. The wallet signs a fixed message with personal_sign; secp256k1 signatures from a regular wallet use RFC 6979 deterministic nonces, so the same wallet always produces the same 65 bytes. Before the first registration the message is signed twice and a wallet whose two signatures differ (some smart-contract and MPC wallets) is refused, since it could never re-derive its keys. An optional passphrase is stretched with scrypt and mixed in, contributing entropy the curve never sees.
Qelys — Post-Quantum Identity Derivation v1 Signing this message derives your hash-based (WOTS/XMSS) keys locally in your browser. It is not a transaction and costs nothing. Never sign this exact message on any other site. Wallet: 0x7a3F…9c1E Domain: Qelys Version: 1
Tree generation is 256 × 1,072 ≈ 274k SHA-256 calls and completes in about half a second in a modern browser. Secrets live only in memory for the tab's lifetime.
#Registration
Registration binds the wallet and the root in both directions. One statement is signed twice: by the wallet (secp256k1) and by leaf 0 (WOTS). The server verifies both before storing the public key; leaf 0 is burned as the genesis signature.
Qelys — Register Post-Quantum Identity Wallet: 0x7a3F…9c1E PQ address: pq1Hn3…W8k Root: 3f9a1c…e07b Public seed: b41d02…9c55 Tree height: 8 Scheme: WOTS(w=16,SHA-256)+Merkle
#On-chain anchor
A registration in our database is only as trustworthy as our database. The anchor writes the root to Elysium: a 0-value transaction from the wallet to itself whose calldata is the memo below, producing a public timestamp from the era when secp256k1 signatures were still unforgeable. After a break, any claim about who owns a root can be checked against the earliest anchor.
Qelys:v1:anchor:pq1Hn3…W8k:3f9a1c…e07b
#Launch attestation
Leaf i signs a domain-separated digest over the coin's public fields, sorted by key. The same leaf deterministically owns the launch salt, and Montra's factory derives the token address from (launcher, salt, config), so the address itself is a commitment to the identity. In the digest the token address fills the mint field.
The create (+ optional dev buy) is one call to Montra's factory: launch() deploys the token, its Uniswap v4 pool and the first buy in a single transaction, so nothing can trade ahead of the dev buy. A quantum launch goes through the PqLauncher contract instead, which makes the same call and delivers the dev buy straight into the creator's quantum vault in that transaction; it mixes the creator into the salt, so nobody else can claim the address. The server builds the call and dry-runs it from the launcher's wallet; the wallet sends it. The server never broadcasts: it marks a coin live only after reading the receipt and checking the transaction is exactly the call it built, from the launcher, and that Montra created this token.
Metadata extension
The pinned JSON carries the full attestation, so verification needs neither our API nor our database:
{
"name": "…", "symbol": "…", "image": "ipfs://…",
"website": "https://qelys.xyz/coin/<token>",
"pqc": {
"version": 1, "chain": "elysium",
"scheme": "WOTS(w=16,SHA-256)+Merkle(h=8)",
"pqAddress": "pq1…", "root": "…", "pubSeed": "…", "height": 8,
"messageHash": "…",
"signature": { "leaf": 4, "wots": "<4288 hex>", "auth": ["…" ×8] }
}
}Creator fees
Montra fixes a coin's creator-fee recipients at launch. Every Qelys coin names the platform treasury as the only recipient (100%), so Montra pays it directly, with no splitter contract; the launching wallet signs and pays gas, and is recorded as the creator in the attestation. Fees accrue in Montra's hook until the keeper claims them; the Revenue page shows how they are split (buyback and burn, pools, treasury).
#Signature schemes
Creators choose how a launch is signed. WOTS + Merkle is the identity's root of trust and burns one leaf per launch. The three NIST schemes are many-time keys derived from the same identity seed; each is certified once by a WOTS leaf signing a binding digest, after which it signs any number of launches.
| Scheme | Standard | Assumption | Signature | Public key |
|---|---|---|---|---|
| WOTS + Merkle | RFC 8391 style | SHA-256 second preimage | 2,404 B | 64 B |
| ML-DSA-65 (Dilithium) | FIPS 204 | Module-LWE / SIS lattices | 3,309 B | 1,952 B |
| SLH-DSA-SHA2-128s (SPHINCS+) | FIPS 205 | SHA-256 (stateless) | 7,856 B | 32 B |
| Falcon-512 (FN-DSA) | FIPS 206 draft | NTRU lattices | ≤ 666 B | 897 B |
| ML-DSA-87 (Dilithium5) | FIPS 204, level 5 | Module-LWE / SIS lattices | 4,627 B | 2,592 B |
| SLH-DSA-SHAKE-128f (SPHINCS+) | FIPS 205 | SHA-3 / SHAKE256 (stateless) | 17,088 B | 32 B |
| Falcon-1024 (FN-DSA) | FIPS 206 draft, level 5 | NTRU lattices | ≤ 1,280 B | 1,793 B |
| ed25519 + ML-DSA-65 (hybrid) | IETF composite draft | either curve or lattice must hold | 3,373 B | 1,984 B |
certs = WOTS.sign(H("bind" ‖ pq-address ‖ s ‖ H(pks)), leaf)
d = H("launch" ‖ creator ‖ image ‖ mint ‖ name ‖ scheme ‖ symbol)
The hybrid is a composite signature: a single seed expands (SHAKE256) into an ed25519 key and an ML-DSA-65 key, and a signature is both signatures concatenated. It verifies only if both verify, so it is secure as long as either assumption survives. SLH-DSA-SHAKE swaps the SHA-2 family for SHA-3, so the two SPHINCS+ options rest on different hash designs.
A scheme attestation carries its signature, the scheme public key and the WOTS certificate, so verification needs only the identity root: check the certificate against the root, then the signature against the certified key. The digest commits to the scheme id, so a signature can never be replayed under a different scheme. Implementations are@noble/post-quantum, audited and dependency-free.
#Proof of possession
A challenge-response login that never consults secp256k1. The server issues a 32-byte nonce valid for five minutes; the client signs SHA-256("pqc.market/proof/v1\n" ‖ leaf ‖ nonce ‖ wallet) with its next unused leaf.
| Check | Failure |
|---|---|
| challenge exists, matches wallet, unused, unexpired | 404 / 409 / 410 |
| XMSS.verify(digest, σ, registered root) | verified: false |
| INSERT (identity, leaf) into leaf ledger | 409 leaf already used |
The leaf ledger's primary key (identity_id, leaf_index) makes one-time use a database invariant; the challenge is consumed even on failure, so a nonce cannot be retried.
#Wallets
A Qelys wallet is a secp256k1 keypair derived from the identity seed (HKDF(sk.seed, "pqc.market/wallet/v1", index)), re-derived in the browser after unlock and never stored. Registration is a statement signed by the derived key itself, so the server only ever holds public addresses.
Every transfer is dual-signed: the derived key signs the Elysium transaction (what the chain enforces), and a post-quantum key signs a transfer digest whose hash rides along in a calldata memo. Rotating a wallet sweeps everything to a freshly derived address and retires the old one.
Be clear about the boundary. Elysium still enforces only the secp256k1 signature on-chain. The post-quantum half is a quantum-proof record of authorization: after a curve break it lets an owner prove which transfers they signed and which were forged, but it does not stop a forged transfer from executing. Holding value under hash-based keys needs an on-chain verifier contract: that is the quantum vault below, and the reason these wallets are labelled identity-derived rather than quantum-secured.
#Quantum vault
The vault is an Elysium contract (PqVault) that holds HYPE and ERC-20 balances at a CREATE2 address which only a WOTS signature verified on-chain can spend. There is no secp256k1 path: the wallet that pays the gas cannot move vault funds, and neither can anyone else who breaks a curve.
A withdrawal signs one digest with vault[i]'s one-time key. It binds the chain, contract, vault, recipient, token, amount and the hash of vault[i+1], so the signature authorizes that exact spend and nothing else:
The 2,176-byte payload goes in a single transaction: the withdraw call deploys the vault's minimal-proxy clone, walks the 67 hash chains (45 to 990 SHA-256 calls), checks that the result derives the vault's address, pays the recipient, rolls everything else into vault[i+1] and turns vault[i] into a permanent tombstone. Deposits that arrive at a retired address afterwards can be swept by anyone, only ever to the next vault the tombstone names.
One key, one message. Two WOTS signatures from one key leak enough to forge a third. Before anything is broadcast, the browser records the spend, keyed by an HMAC only the identity owner can compute, and every retry or second device replays that record. Signing is deterministic, so a replay produces the identical signature. The vault index itself lives on-chain: it is the first vault that is not a tombstone.
The remaining dependency is how the identity is derived. A wallet-only identity is re-derivable by whoever holds the wallet key, so a post-quantum attacker who recovers that key could also derive the vault keys. A passphrase-hardened identity closes that gap.
#Post-quantum pools
Pools are built on the vault contract; there is no separate pool contract. A position is a chain of vaults owned by a pool identity, derived from your identity under its own domain, so pool funds never mix with your personal vault and every withdrawal is the same on-chain WOTS spend described above.
You can deposit HYPE. The first deposit registers the position by its first vault's key hash; the server derives the address from that hash, so every registered position is a real WOTS-locked vault. To find where a position lives now, anyone can follow its tombstones, since each retired vault names the next one.
Yield is the pools' 20% of platform revenue, paid in HYPE into each position's live vault on a fixed schedule, pro-rata by USD value. A position's weight is the smaller of its value now and its value at the previous payout, so a deposit starts earning from the payout after it lands. Payouts go through the PqPayout contract from a public rewards wallet, and the pools page totals them from the chain.
What this protects. Withdrawing needs a valid WOTS signature over the exact recipient, mint, amount and next vault. A forged or stolen secp256k1 signature can't produce one. The remaining dependency is the same as the vault's: a wallet-only identity is re-derivable from the wallet key, and a passphrase-hardened identity closes that gap.
#Quantum holder rewards
A coin can launch with quantum holder rewards: half of its creator fees go to the people who hold it in a quantum vault. The coin's on-chain creator is still the treasury, like every launch; the mode is recorded with the launch, and the payouts are made from a public rewards wallet.
Fees per coin are read from Montra's own trade data. Every swap in the coin's Montra pool adds to its creatorFees, paid in the pool's quote token, so the amount a coin has earned is the sum over its trades, in its quote token. The holders' share is half of that, converted to HYPE at payout time.
Who earns: vault chains that hold the coin. A vault registers itself by its first key hash; the server derives the address from the hash, so only real WOTS-locked vaults count, and follows tombstones to the live vault. Rewards are paid in HYPE into that vault, so only a hash-based signature can move them. Taking the smaller of the current and previous holding means a deposit starts earning from the payout after it lands. Each PqPayout payment logs an event naming the coin, so anyone can total what a coin's holders have received from the chain.
#Encrypted launches
An encrypted launch is sealed for a minute before the coin exists. The creator's browser encrypts the coin's details (mint address, name, ticker, description, image) with AES-256-GCM under a fresh random key and publishes only the ciphertext and its SHA-256. The home page shows the sealed launch counting down; nobody, the server included, can see what the coin is.
When the countdown ends, the creator signs the launch and the key goes with it. Before anything is pinned or any leaf is burned, the server decrypts the ciphertext with that key and checks every field against the coin being launched; one difference and the launch is refused. The ciphertext, key and commitment are stored with the coin, so its page can decrypt them in your browser and show they open to exactly that coin.
Cypherpunk-class cryptography. Authenticated encryption plus a hash commitment is the commit-then-encrypt pattern that Zcash's shielded notes are built on: a note is committed on-chain and its contents encrypted, readable only with the key. Encrypted coins trade against HYPE; the pair is part of what gets sealed.
Why AES-256. Symmetric encryption only loses half its key length to Grover's quantum search, so a 256-bit key keeps about 128 bits of security against a quantum computer, the same post-quantum margin as SHA-256. The coin itself is public once it launches, like every coin on Elysium: the seal hides what's coming, not what's live.
#War mode
War mode launches bunker-proof coins: the coin's identity is signed by four independent post-quantum algorithms from two different families of hard problems, so forging its provenance means breaking hash functions and lattices.
Each of the three armor plates signs the coin's scheme-specific launch digest with a key certified by the creator's WOTS root, the same chain as a single-scheme launch. The server checks all four, and every certificate, before any leaf is burned; the coin page re-checks them in your browser. The coin's metadata pins each plate's SHA-256, and the full signatures are kept with the launch.
The dev buy goes into the creator's quantum vault, as in a Quantum launch. Arming an identity binds the three extra keys once, using one one-time leaf each.
#Security analysis
- Forgery
- Reduces to SHA-256 second-preimage resistance under the tweakable-hash model; ~2¹²⁸ quantum work.
- Key reuse
- Prevented server-side by the leaf ledger. A malicious server could accept reuse; clients should never sign twice with one leaf, and the UI always fetches the next free index.
- Wallet compromise
- Wallet-only identities are re-derivable by anyone holding the wallet key, including a post-break attacker. Hardened identities additionally require the passphrase.
- Server compromise
- Cannot forge attestations (no secrets held). Can censor or lie about registrations, which is why the on-chain anchor and IPFS copy exist.
- Capacity
- 256 signatures per identity. Rotation to a fresh tree signed by the old tree's next leaf is on the roadmap.
#Parameters
| Item | Value |
|---|---|
| Hash | SHA-256 |
| WOTS | w = 16, 67 chains, 2,144 B |
| Tree | height 8, 256 leaves |
| Signature | 2,404 B |
| Public key | root ‖ pk.seed, 64 B |
| Address | pq1 ‖ base58(SHA-256(dom ‖ pk.seed ‖ root)[0..20]) |
| Passphrase KDF | scrypt N = 2¹⁵, r = 8, p = 1 |
| Seed KDF | HKDF-SHA256 |
| Launch salt KDF | HKDF-SHA256(sk.seed, 'pqc.market/mint/v1', u32be(leaf)) |
| Chain | Elysium (chain id 99901), coins on Montra |
| PqVault | 0x09D5980f2C3319FCEfbA8cbC964a62c30098cB5e |
| PqLauncher | 0xcf1018cDf76008fd141129642634310b96d370C7 |
| PqPayout | 0xc188Edf7aB0DC3a0d374a7c2c2B9527D6a1eFC42 |
#Verify it yourself
Every coin page has a Verify button that runs this in your browser. The equivalent in code:
import { launchDigest } from "@/lib/pq/messages";
import { verify } from "@/lib/pq/xmss";
const meta = await fetch(metadataUri).then((r) => r.json());
const d = launchDigest({
mint, creator, name: meta.name, symbol: meta.symbol,
image: meta.image, leaf: meta.pqc.signature.leaf,
});
const { valid, computedRoot } = verify(d, meta.pqc.signature, {
root: meta.pqc.root, pubSeed: meta.pqc.pubSeed, height: meta.pqc.height,
});