docs

The hash-based identity, attestation and vault protocol behind every Qupad launch. Implemented in src/PQ.sol and src/Vault.sol.

ETHEREUM MAINNETKECCAK256WOTS(W=16) + MERKLE(H=8)

What this is

Every account on Ethereum is an elliptic curve public key. The day that curve falls, every balance sitting in an ordinary account is spendable by whoever reaches it first, and there is no migration afterwards because a curve break is retroactive.

Qupad signs each launch with a one-time key whose security rests on nothing but a hash being hard to invert, and holds the proceeds in a vault that has no curve-based path out of it. That assumption is the oldest in the subject and the only one nothing has dented, including the December 2026 result against structured lattices.

Identity

An identity is 256 Winternitz one-time keys under a Merkle tree of height eight. The tree root plus a public seed is the public key; a hash of the two is the address.

  1. Your wallet signs one fixed message. ECDSA is deterministic under RFC 6979, so the same wallet always returns the same 65 bytes.
  2. Those bytes, optionally mixed with a passphrase, seed a key derivation function.
  3. From that seed, 256 keys of 67 chains each are derived and hashed into a tree.
  4. The root is registered on chain with register(). A root can be filed once and never changed.

Secrets never leave the browser and nothing is stored: every secret is recomputed from the seed when it is needed. A wallet-only identity is re-derivable by anyone who recovers the wallet key after a break, which is what the passphrase closes.

Signing a launch

One launch spends exactly one key. The digest commits to the coin, so a signature lifted from one launch is worthless on any other.

// each of 67 chains is walked part way and stopped
ski = H(seed ‖ ADRS(3, leaf, i))
σi = Fdi(ski)        d = the message digits, base 16

// the checksum is what makes it unforgeable
C  = Σ (15 − di)  ≤ 960 < 16³

Raising a message digit is free for a forger, because a verifier only ever hashes forward. But raising one lowers the checksum, and lowering a checksum digit means walking a chain backwards, which is a preimage of keccak256.

Verifying

A verifier finishes every chain, rebuilds the leaf, and climbs eight levels to the root. It is valid only if the climb lands on the registered root.

verify: F15−di(σi) =? pki
leaf  = H(pubSeed ‖ ADRS(1, leaf) ‖ pk0 ‖ … ‖ pk66)
root  = climb(leaf, authPath)        8 levels

1,005 keccak rounds in total. No pairing, no curve, no precompile, and no API of ours: a signature can be checked with a hash function alone, by anyone, forever.

Why keccak and not SHA-256

The reference designs for this scheme use SHA-256 because that is what the standards use. On the EVM that costs real money: SHA-256 is a precompile, so every one of the thousand-odd hashes pays call overhead on top of its own cost, while keccak256 is an opcode. Same 256-bit output, same Grover margin, several times the gas.

The vault

A vault is a row in contract storage, not an account. It has no key of the ordinary kind, so there is no ECDSA path out: the wallet that pays the gas cannot move the balance, and neither can anyone who breaks a curve.

digest = keccak256(DOMAIN, chainid, address(this),
                   id, leaf, token, to, amount)

Every field of the spend is inside the digest, so a signature relayed by a stranger cannot be redirected by a single wei, and it cannot be replayed onto another chain or another deployment. Anyone may submit it, which means a vault owner who has run out of ether is not locked away from their own money.

One key, one message, enforced by the chain

Sign twice with one Winternitz key and a stranger forges the third message. Most implementations police that in a database. We police it in storage. One bit per key, and nobody can clear it.

Gas and limits

itemvaluenote
signature2,404 B67 chains, an 8 step path, the leaf index
verify207,760 gas1,005 keccak rounds plus the climb
vault spend302,813 gasverification, calldata, burn and payout
keys per identity256rotation is signed by the tree it replaces
security128 bitskeccak256 second preimage, after Grover

At one gwei a vault withdrawal is roughly a dollar; at thirty it is roughly twenty five. That is fine for a vault you draw on occasionally and too expensive to put in front of every trade, which is worth knowing before designing around it.

Threat model

The adversary can eventually forge ECDSA signatures, whether through a cryptographically relevant quantum computer or an unexpected classical advance.

assetbeforeafter a break
ETH in an ordinary accountsafeexposed, the address is the public key
ETH in a Qupad vaultsafesafe, spending needs a hash-based signature
who launched a coinwallet signaturethe attestation still verifies
identity from a wallet alonesafere-derivable by whoever holds the wallet key
identity with a passphrasesafesafe, given real entropy in the passphrase

Verify it yourself

Nothing here depends on trusting this site. The repository carries a second implementation written from this document rather than from the contract, and the suite checks the two against each other.

forge test                  # 20 tests, verifier and vault
node js/pq.js selftest    # the independent signer

The suite rejects forged chains, forged authentication paths, a signature moved to another leaf, another identity's root, a second use of one key, and the checksum attack the scheme exists to stop.

LAST UPDATED 3 DECEMBER 2026 SHORT SPEC ↗