Q-256: a post-quantum standard for non-fungible tokens
| Status | Draft 0.3, 2026-12-05 (live on Robinhood Chain testnet) |
| Name | Q-256. P-256 and secp256k1 are the 256-bit curves a quantum computer breaks; Q-256 rests only on 256-bit hashes |
| Scope | Ownership, delegation, minting, content binding and provenance of non-fungible tokens |
| Reference implementation | src/ (Solidity, EVM), sdk/ (JavaScript wallet side), vectors/ (test vectors) |
The key words MUST, MUST NOT, SHOULD, SHOULD NOT and MAY are used as in RFC 2119.
Abstract
Every NFT in production today is owned through elliptic-curve signatures: secp256k1 ECDSA on EVM chains, Ed25519 on Solana, NEAR, Sui, Aptos and Cardano, and Schnorr over secp256k1 on Bitcoin. A cryptographically relevant quantum computer (CRQC) running Shor's algorithm recovers the private key from the public key, and almost every NFT holder's public key is already public. The standards themselves (ERC-721, ERC-1155, Metaplex, NEP-171, Ordinals) do not choose their cryptography. They inherit it from the chain's account model, and they add their own classical attack surface: admin keys, upgradeable contracts, off-chain signed orders and permits, bridges and mutable metadata.
Q-256 is a token standard in which no elliptic curve appears anywhere in the protocol's authority path. The only classical piece an account may use is a standard wallet key, held in a slot it can leave with one signature. It has six parts:
- A keyring of post-quantum accounts. An account is a 32-byte ID with a rotating commitment to a set of keys. The account is separate from its keys, as on NEAR. Any signature scheme can be used through an immutable verifier contract. The baseline scheme, WOTS-K, uses nothing but keccak-256 and verifies for about 74k gas on any EVM chain today.
- A token whose holders are accounts or code, never keys. A token moves only with a signature from its holder account's current key over that exact action, or by a contract that holds it or was approved by its holder. EOAs, including EIP-7702-delegated EOAs, are refused as holders and operators. The token has no owner, no admin and no upgrade path.
- Hash-anchored content and post-quantum provenance. Each token is signed into existence by a creator account and bound to the SHA-256 of its metadata. Its URI is a content identifier derived from that hash.
- Holdings. Every token has its own address that can hold ERC-20s and ETH, and only the token's holder can take them out. On Robinhood Chain, this puts Stock Tokens inside NFTs.
- A key slot that works with today's wallets. Every signature is EIP-712 typed data, so MetaMask and other standard wallets can sign and display it. A wallet key is the one classical part of an account, and it can be swapped for a post-quantum key with one signature, without moving anything.
- The Q256 token and vaults. A fixed-supply ERC-20 converts one-to-one, on request, into vault NFTs with on-chain art and their own address for Stock Tokens.
Hash-based one-time signatures are normally hard to use because the signer has to keep state. Q-256 keeps that state on chain: key k signs nonce k and commits to key k + 1, so a wallet needs only its seed and the chain. Expired authorizations can be retired, so a wallet never has to sign a second message with a used key.
1. Are existing NFTs quantum resistant?
No. This section explains why, layer by layer and chain by chain.
1.1 Threat model
- Shor's algorithm solves the discrete logarithm on any elliptic curve and factors RSA. Against a CRQC, ECDSA (secp256k1, P-256), EdDSA (Ed25519), Schnorr/BIP-340, BLS12-381 and BN254 pairings, KZG commitments and pairing-based SNARKs (Groth16, PLONK-KZG) give no security. RSA does not either.
- Grover's algorithm gives at most a square-root speedup on preimage search. A 256-bit hash keeps about 128 bits of security against preimages. Quantum collision search (Brassard–Høyer–Tapp) costs about 2^(n/3) in theory, but its memory requirement makes it no better than classical 2^(n/2) in practice. keccak-256, SHA-256 and BLAKE2b-256 remain sound. A 160-bit address keeps about 80 bits of collision resistance classically, which is already marginal.
- Exposure at rest vs. on spend. Where an address is a hash of the public key (Ethereum, Bitcoin P2PKH/P2WPKH, Cardano), the key is hidden until the owner first signs. Where the address is the key (Solana, Bitcoin P2TR, NEAR implicit accounts) or the key sits in the output (Bitcoin P2PK), it is exposed from the start.
- Long-range vs. short-range attacks. A slow CRQC can still break exposed keys at leisure (long range). A fast one could break a key between broadcast and inclusion and front-run the transaction (short range). Hiding keys behind hashes helps only against the slow attacker, and only until first use.
Almost every NFT holder has signed at least one transaction (a mint, an approval, a listing), so almost every holder's public key is on chain. For NFTs, "hidden until first use" protects almost no one.
1.2 The six layers of an NFT
Every NFT architecture studied here can be described by six layers. Each must be quantum-safe for the token to be.
| Layer | What it does | Typical cryptography today | Under a CRQC |
|---|---|---|---|
| L1 Ownership | Who can move the token | Chain account signature (ECDSA, EdDSA, Schnorr) | Broken: key recovered from public key |
| L2 Delegation | Approvals, operators, delegates, transfer hooks | Same as L1, plus operator EOAs | Broken through L1 and through EOA operators |
| L3 Off-chain authorizations | Marketplace orders (Seaport, Blur), permits (ERC-4494), lazy-mint vouchers, allowlist signatures, creator verification | EIP-712 + ECDSA, Ed25519 | Broken: anyone can sign as anyone |
| L4 Administration | Contract owner, proxy upgrade, update/mint/freeze authority, royalty settings, minting policy keys, contract-account keys | Admin EOA or multisig of EOAs | Broken: whole-collection takeover |
| L5 Content | tokenURI, metadata, media | IPFS CID (SHA-256), Arweave tx ID (SHA-256), on-chain data, HTTPS URLs | Hash-addressed content survives. HTTPS (RSA/ECDSA certificates) and server-controlled URLs do not |
| L6 Transport and settlement | Consensus, bridges, light clients, ZK compression, VRF reveals | BLS/Ed25519 validator signatures, guardian/oracle multisigs, Groth16, ECVRF | Mostly broken. Hash-based PoW, STARKs and Merkle trees survive |
1.3 Architecture survey
Ethereum and EVM chains
- ERC-721 (2018).
ownerOf: tokenId → address. Authority ismsg.sender, meaning an ECDSA-signed transaction from an EOA, or a contract. Per-tokenapprove, account-widesetApprovalForAll.safeTransferFromcallsonERC721Received. Metadata extensiontokenURI, which is free-form and often an HTTPS URL or a gateway URL under the deployer's control. - ERC-1155 (2019). Multi-token balances
(id, owner) → amount, operator approvals only, batch transfers,uri(id)templates. Same authority model. - Extensions. ERC-2981 royalties (receiver is usually an EOA). ERC-4907 rental (
userrole with expiry). ERC-5192 soulbound (locked). ERC-4494 permits (ECDSA or ERC-1271). ERC-6551 token-bound accounts (a smart account owned by whoever owns the NFT). ERC-7401 nestable and ERC-5773 multi-asset tokens. ERC-721C creator tokens (a transfer validator contract with its own owner). ERC-404 and DN404 (ERC-7631) hybrid fungible/non-fungible pairs. - Market layer. Seaport, Blur and most marketplaces take a
setApprovalForAllto a conduit or exchange contract, then settle EIP-712 orders signed with ECDSA, or ERC-1271 for contract wallets. Most collections areOwnableby an EOA, and many are upgradeable proxies. - Quantum view. L1 to L4 all reduce to ECDSA. EIP-7702 lets EOAs carry code, but the EOA key still overrides it. ERC-6551 makes things worse: every token-bound account's authority chains to the NFT owner's EOA, so one recovered key opens a tree of assets. Soulbound tokens (ERC-5192) are the worst case. They cannot be moved, so their holders cannot migrate to a safe key even when warned.
Solana
- SPL Token + Metaplex Token Metadata. A mint with supply 1 and decimals 0, a metadata PDA, a master-edition PDA, an
update_authoritykey, and acreatorsarray whoseverifiedflag is set by the creator's Ed25519 signature. Programmable NFTs (pNFTs) add rule sets for royalty enforcement. - Metaplex Core (2024). A single account per asset with an
ownerkey, an update authority and plugins (royalties, freeze, burn and transfer delegates, attributes). - Bubblegum compressed NFTs. Assets are leaves of an on-chain concurrent Merkle tree, hashed with keccak-256 (owner, delegate, nonce, data hash, creator hash). Off-chain indexers serve them through the DAS API. ZK Compression (Light Protocol) uses Groth16 proofs.
- Quantum view. The Solana address is the Ed25519 public key, so every owner, authority and delegate is exposed at rest, including wallets that have never signed. Program-derived addresses are off-curve and have no key, so they are safe. The Merkle trees survive, but the leaf owners are keys, and Groth16 is broken by a CRQC. Solana's Winternitz vault is an opt-in hash-based vault for SOL. Its first published version (v0.1, January 2025) omitted the WOTS checksum, which let anyone who saw one signature forge others. The Solana Foundation reports test clusters with post-quantum signatures and a 2027 target for post-quantum asset security (secondary sources).
Bitcoin
- Ordinals and inscriptions (2023). Content is inscribed in Taproot witness envelopes and bound to individual satoshis. The owner is whoever controls the UTXO that holds the sat. Ordinals wallets use P2TR outputs.
- Quantum view. A P2TR output contains the tweaked public key itself. Every inscription held in a Taproot address is therefore exposed at rest: a CRQC can derive the tweaked secret key and spend through the key path. This is the most exposed NFT ecosystem in production. BIP-360, now called Pay-to-Merkle-Root (P2MR), was merged into the BIP repository as a draft in February 2026. It removes the key-path spend so that keys stay hidden until spent. It adds no post-quantum signature, and nothing is activated.
NEAR
- Standards. NEP-171 core (
nft_transfer,nft_transfer_call→nft_on_transfer→nft_resolve_transfer). NEP-177 metadata, which already carriesmedia_hashandreference_hash, both SHA-256. NEP-178 approvals with approval IDs against races. NEP-181 enumeration, NEP-199 payouts and NEP-297 events. - Account model. Owners are account IDs, not keys. An account holds any number of access keys (full-access or function-call), which can be added and removed in one transaction. See section 2.
- Quantum view. NEAR NFTs become quantum-safe at L1 as soon as the owner's account holds only ML-DSA keys. The NFT contract does not change. L4 still matters: many NFT contracts are deployed on accounts that keep a full-access key so they can redeploy code. While that key is classical, the whole collection is classical. Function-call keys used by dapps and marketplaces are another classical path.
Other chains
| Chain | NFT standard | Owner representation | Key rotation | Notes |
|---|---|---|---|---|
| Cardano | CIP-25 (metadata label 721), CIP-68 (reference NFT + datum at a script) | Address = Blake2b-224 hash of Ed25519 payment key | No: move funds | Minting policies are often time-locked single-key scripts. Before the lock, the policy key can mint more |
| Tezos | FA2 (TZIP-12), TZIP-21 metadata | tz1 Ed25519 / tz2 secp256k1 / tz3 P-256 / tz4 BLS, hashed | No | Contract admins are keys |
| Flow | Cadence NonFungibleToken (NFTs are resources in account storage) |
Account address, with multiple weighted keys (P-256, secp256k1) | Yes, native | Like NEAR, the asset names an account, so rotation would carry over if a post-quantum algorithm were added |
| Sui | Objects with key + store, Display, Kiosk transfer policies |
Address = BLAKE2b-256(flag ‖ public key) | No | Mysten Labs proposes zero-knowledge proofs of knowledge of the EdDSA seed (ePrint 2025/1368, FC 2026) to move to post-quantum keys without changing addresses |
| Aptos | Digital Asset standard (objects) | Address with a rotatable authentication key | Yes | A post-quantum scheme could be added behind the same address |
| Cosmos | CW-721 (CosmWasm), x/nft, ICS-721 over IBC | Address = hash of secp256k1 public key | No | IBC light clients trust validator Ed25519 signatures, which a CRQC can forge |
| Algorand | ARC-3, ARC-19, ARC-69 (ASA with total 1) | Ed25519 address | Yes (rekeying) | Falcon is used in state proofs. Native Falcon accounts are reported for 2026 (secondary source) |
Cross-chain NFTs
Wormhole (a 19-guardian secp256k1 quorum), LayerZero ONFT (DVN attestations), ICS-721 (IBC light clients) and most other bridges verify classical signatures. A CRQC that forges a quorum can mint any bridged NFT on the destination chain. Bridged NFTs inherit the weakest chain plus the bridge.
1.4 What survives
Only the hash-based parts survive a CRQC:
- content hashes (IPFS CIDs, Arweave transaction IDs as content identifiers, NEP-177
reference_hash, on-chain data); - Merkle trees (compressed NFTs, allowlists);
- STARK and FRI proofs;
- Bitcoin proof-of-work.
Everything that says who may act is broken.
1.5 Conclusions that shape the design
- No deployed NFT standard is quantum resistant, and none can become so by itself. The standards never define cryptography. They inherit the chain's account cryptography, and they define classical attack surface of their own (L2 to L4).
- Fixing accounts fixes L1, and only L1. NEAR shows that once accounts can rotate to ML-DSA, account-named assets follow. But admin keys, off-chain signatures, operator EOAs, bridges and consensus stay classical until each one is addressed.
- Naming accounts instead of keys is the property that matters. NEAR, Flow and Aptos can migrate without moving assets. Solana, Sui, Cardano, Bitcoin and EVM EOAs cannot.
- Hashes are the one primitive every chain already has, verifies cheaply and trusts post-quantum. That makes hash-based signatures the conservative baseline. Lattice schemes are the efficient upgrade where chains provide them natively.
2. What NEAR is doing, and what Ethereum is doing
2.1 NEAR
- Live. ML-DSA (FIPS 204, ML-DSA-65 parameter set) is supported for account access keys on NEAR mainnet as of protocol upgrade 2.13 (July 2026). NEP-645, which specifies it, is still an open proposal. The public key (about 2 KB) travels with transactions, but the state trie stores only a SHA3-256 hash of it. Verification is charged a fixed gas cost per signature.
- Migration. One transaction adds an ML-DSA access key and deletes the Ed25519 key. The address does not change and no assets move. Rotation is voluntary, and Ed25519 and secp256k1 keys remain supported.
- Still classical. Block production and consensus (Ed25519). Chain Signatures: the MPC network that signs on 30+ other chains still produces threshold ECDSA/EdDSA, so the foreign-chain keys stay classical even when the NEAR account is post-quantum. Peer-to-peer transport, and confidential key derivation. Near One targets post-quantum consensus by the end of 2027 and says threshold post-quantum signing has no candidate yet. Falcon is under consideration and not adopted.
- Lessons Q-256 takes.
- (a) Separate the account from its keys.
- (b) Store keys as hashes.
- (c) Allow several keys per account.
- (d) Rotate in one action without moving assets.
- (e) Cover the layers NEAR does not: the asset layer still has to refuse classical admins and classical delegates, and has to anchor content to hashes.
2.2 Ethereum
- Accounts. Account abstraction is the path. EIP-8141 (frame transactions, draft, considered for the Hegotá fork) unlinks accounts from ECDSA keys so that accounts can choose their signature scheme and rotate keys.
- Precompiles. EIP-8051 (ML-DSA-44 and a keccak-based ML-DSA-ETH, 4,500 gas, draft), EIP-7619 (Falcon-512, draft) and EIP-7932 (a secondary signature algorithm registry, draft) are all unscheduled. The ethereum.org roadmap puts "PQ signature verification precompiles" on a later milestone and full post-quantum protection around 2029.
- Consensus. BLS is to be replaced by leanXMSS, a hash-based scheme, aggregated by leanVM. The Ethereum Foundation chose hash-based signatures for the most security-critical role.
- Today. Without precompiles, a lattice signature verified in Solidity costs about 4.9M gas (ML-DSA, ZKNox ETHDILITHIUM) or about 1.5M gas (Falcon, ZKNox ETHFALCON). That is too much for a token transfer. A WOTS-K signature in Q-256 verifies for about 74k gas.
3. Design goals
- G1. No elliptic curves in authority. No
ecrecover, no ERC-1271, no EOAmsg.sender, no BLS anywhere a token's ownership, delegation, minting or content is decided. - G2. Accounts, not keys. Holders are account IDs. Keys rotate under them without moving tokens.
- G3. Scheme agility. Any signature scheme can be adopted per account, without a governance step, through immutable verifier contracts.
- G4. Deployable today. The baseline scheme must verify on any EVM chain now, at a cost a token transfer can bear.
- G5. No administrator. Token contracts have no owner, no upgrade path and no privileged role other than the creator account, which is itself post-quantum.
- G6. Content is hash-anchored. Every token commits to the SHA-256 of its metadata, and its locator is derived from that hash.
- G7. Provenance survives the chain. Mint authorizations are post-quantum signatures that anyone can re-verify from calldata, years later, without trusting an indexer.
- G8. A path for existing NFTs. Legacy ERC-721 tokens can move behind post-quantum authority before Q-day, with their remaining risk stated plainly.
4. Specification
4.1 Conventions
H(x)is keccak-256.enc(a, b, …)is Solidityabi.encodeof static values (32-byte words).‖is byte concatenation.- Tags are
keccak256of ASCII strings, listed in section 7. - A key set commitment and an account ID are 32-byte values.
4.2 Keyring
4.2.1 Keys, key sets, accounts
- A key is a pair (verifier, fingerprint). The verifier is a contract implementing
IKeyVerifier(4.3). The fingerprint is whatever 32 bytes that verifier returns for that key. - A leaf is
H(enc(LEAF_TAG, verifier, codehash(verifier), fingerprint)). Pinning the verifier's code hash means that changing the code at the verifier's address, whether through a metamorphic redeploy or a 7702 re-delegation, invalidates every key that trusts it. - A key set is a binary Merkle tree over leaves, at most 16 levels deep. Internal nodes are
H(left ‖ right). The position of a leaf is given bykeyIndex: bit k set means the node at level k is the right child. A one-leaf set's root is the leaf. Leaves (128-byte preimage) and internal nodes (64-byte preimage) cannot be confused. - An account ID is the root of the account's first key set. An account with no stored state has commitment = ID and nonce = 0. Accounts need no registration: an ID can receive tokens before its keys have ever touched the chain.
- Each account stores a current commitment (the root of its current key set) and a nonce (uint64).
4.2.2 Authorization
struct Auth {
bytes32 account;
uint64 deadline;
bytes32 next; // commitment to move to; 0 = keep the current one
address verifier;
uint256 keyIndex;
bytes32[] keyPath;
bytes sig;
}
Every key, hash-based or classical, signs the same EIP-712 digest, so a standard wallet can display exactly what it signs:
domain = EIP712Domain(name "Q-256", version "1", chainId, verifyingContract = keyring)
message = Authorization(bytes32 account, uint64 nonce, uint64 deadline, address caller, <Action> action, bytes32 next)
digest = H(0x1901 ‖ domainSeparator ‖ hashStruct(message))
caller is the contract that asks the keyring to authorize, which is normally the token contract. action is a nested EIP-712 struct (Transfer, Withdraw, ToToken, …, listed in section 7), so a wallet shows, for example, action: Transfer { tokenId: 5, to: 0x…, data: 0x }. Because the outer type string depends on the action, the caller passes two values:
authTypehash: the hash of the fullAuthorizationtype string with the action's struct appended;action: the action'shashStruct.
src/libraries/Q256Types.sol holds every type string. sdk/q256.mjs builds the same typed data for wallets.
authorize(auth, authTypehash, action), called by caller, MUST:
- revert unless
block.timestamp ≤ deadline ≤ block.timestamp + MAX_WINDOW, whereMAX_WINDOWis 1 day; - compute the digest with the account's current nonce and
caller = msg.sender; - get
fingerprint = verifier.recover(digest, sig)by static call, and revert if it is zero; - compute the leaf, fold
keyPathbykeyIndex, and revert unless the result equals the account's current commitment, or its ID when there is no stored state; - let
next' = nextif non-zero, else the current commitment. Revert ifnext'is a spent leaf (a single-key set that could never sign again); - if
verifier.oneTime()is true: revert ifnext'equals the current commitment or the signing leaf is already spent, then mark the leaf spent. A spent leaf never authorizes again, in any account, even if a wallet rotates back to it or keeps it in a larger set. If the key is many-time (a wallet), revert (RotateOnly) ifnext'differs from the current commitment, unless the action is the keyring's ownRotate(). A wallet signature on an ordinary action can therefore never carry a key change the user could not read; - store
next', increment the nonce, and emitAuthorized(andKeysRotatedif the commitment changed).
rotate(auth) is authorize with caller = keyring and the action Rotate(). It changes keys and does nothing else.
retire(auth, caller, authTypehash, action), callable by anyone, MUST revert unless the authorization cannot execute: block.timestamp > deadline, or deadline > block.timestamp + MAX_WINDOW. Otherwise it performs steps 2 to 7 without running the action and emits Retired instead of Authorized.
4.2.3 Why retire exists
A one-time key that has signed an authorization must never sign anything else. A signature becomes public when its transaction is broadcast, but it is consumed only if that transaction succeeds. Anyone can make it fail: the submitter can give it too little gas, an operator can move the token first, a claim can take a token ID the creator was minting. After a failure the account's current key is still the exposed one.
The wallet then has three safe moves, and re-signing is never one of them:
- Rebroadcast the same bytes, if the action can still succeed.
- Retire the authorization once its deadline passes.
MAX_WINDOWbounds the wait to one day. An authorization whose deadline lies beyond the window can never execute, so it is retirable at once. - Rotate with another leaf of the current set (the recovery key, 6.2) at the same nonce. The exposed signature dies immediately because its nonce is gone.
How much a second signature costs the holder (blind security review, exact calculation over the digit distribution): with two signatures from one WOTS-K key, the median forgery needs about 2^60 hashes and 10% of pairs need 2^36 or less; with three, about 2^31; with four, about 2^20, which is seconds on a laptop.
4.3 Verifiers
interface IKeyVerifier {
function recover(bytes32 digest, bytes calldata sig) external view returns (bytes32 fingerprint);
function oneTime() external view returns (bool);
function scheme() external view returns (bytes32);
}
A verifier MUST be stateless. Its result MUST depend only on its arguments and its code, except that a smart-wallet verifier defers to the wallet contract that the key itself names. It MUST NOT be upgradeable. It MUST return zero for malformed input and MUST NOT revert on it. Schemes that cannot recover a key from a signature (ML-DSA, FN-DSA, SLH-DSA) carry the public key inside sig and return H(publicKey) after a successful verification.
Profiles:
| Profile | scheme() string |
One-time | Status |
|---|---|---|---|
| WOTS-K | q256.wots.keccak.n32w16.v1 |
yes | Normative (section 5). Post-quantum. Reference: src/verifiers/WotsKeccakVerifier.sol |
| Standard wallet | q256.secp256k1.eip712.v1 |
no | Normative. Classical. An ordinary Ethereum key signing the typed data with eth_signTypedData_v4. 65-byte r ‖ s ‖ v, v as 27/28 or 0/1, high-s refused. Fingerprint = the address. src/verifiers/Secp256k1Verifier.sol |
| Smart wallet | q256.erc1271.eip712.v1 |
no | Normative. The wallet contract decides, via ERC-1271. sig = wallet ‖ walletSignature. Fingerprint = the wallet address. The answer must be exactly one word equal to bytes32(0x1626ba7e), so echoing or padded answers fail. EIP-7702-delegated EOAs are refused, since their ECDSA key still rules them. As safe as the wallet's own validation: post-quantum once the wallet validates a post-quantum signature. src/verifiers/Erc1271Verifier.sol |
| ML-DSA-44 / ML-DSA-ETH | q256.mldsa44.eip8051.v1 |
no | Informative. Thin adapter over the EIP-8051 precompile once a fork ships it. sig = publicKey ‖ signature |
| FN-DSA-512 | q256.fndsa512.eip7619.v1 |
no | Informative. Adapter over EIP-7619, or a Solidity verifier on L2s |
| SLH-DSA-SHA2-128s | q256.slhdsa128s.v1 |
no | Informative. Stateless hash-based, about 7.9 KB signatures. Suited to cold recovery keys |
Because the verifier and its code hash are part of each leaf, an account adopts a new scheme by rotating to a key set that contains it. No registry, vote or token upgrade is involved.
4.4 Token (IQ256)
4.4.1 Holders
A holder is a bytes32:
- a keyring account ID, or
- a contract, encoded
bytes32((1 << 255) | uint160(address)). A value is a contract holder if and only if bits 160 to 254 are zero and bit 255 is set.
A conforming token MUST refuse a contract holder, and an operator, whose address has no code, or whose code is an EIP-7702 delegation designator (0xef0100 ‖ address, 23 bytes). It MUST call onQ256Received(operator, from, tokenId, data) on contract recipients and revert unless the call returns the function's selector. operator is the contract that moved the token by code, or zero when a signature authorized the move. The account that submitted a signed transaction is not authenticated and MUST NOT be passed, because a receiver that credits it (the ERC-721 habit) would credit whoever copied the transaction from the mempool. from and data are authenticated.
4.4.2 Authority
A token MUST accept exactly two kinds of authority:
- Account authority. A keyring authorization from the holder account over the action hash below, with
caller= the token contract. - Code authority.
msg.senderhas code that is not a 7702 designator, and is the contract holder, the token's approved operator, or an operator for all of the holder's tokens.
A token MUST NOT accept ECDSA, ERC-1271 or EOA msg.sender authority, and MUST NOT have an owner or admin role that can move, mint, freeze or re-point tokens.
4.4.3 Actions
| Function | Signer | Action hash |
|---|---|---|
transfer(auth, tokenId, to, data) |
holder | H(enc(TRANSFER_TAG, tokenId, to, H(data))) |
transferBatch(auth, ids, to, data) |
holder of all ids |
H(enc(TRANSFER_BATCH_TAG, H(packed(ids)), to, H(data))) |
approve(auth, tokenId, operator) |
holder | H(enc(APPROVE_TAG, tokenId, operator)) |
setOperator(auth, operator, approved) |
account | H(enc(OPERATOR_TAG, operator, approved)) |
burn(auth, tokenId) |
holder | H(enc(BURN_TAG, tokenId)) |
transferFrom(tokenId, to, data) |
code authority | none |
approveFrom(tokenId, operator) |
the contract holder | none |
setOperatorFrom(operator, approved) |
the contract holder | none |
Approvals are cleared on every move. Repeated IDs in a batch MUST fail rather than move twice. A token ID that has been burned MUST NOT be minted again: the reference implementation never clears a token's content hash, and treats a non-zero hash as "this ID has existed".
4.4.4 Events and introspection
event Transfer(bytes32 indexed from, bytes32 indexed to, uint256 indexed tokenId);
event Approval(bytes32 indexed holder, address indexed operator, uint256 indexed tokenId);
event OperatorSet(bytes32 indexed holder, address indexed operator, bool approved);
ERC-165 IDs: IQ256 = 0x3d8496ee, IQ256Content = 0x721a9735. A Q-256 token MUST NOT report ERC-721 (0x80ac58cd). Section 8 explains why it is deliberately not ERC-721 compatible.
4.5 Content and provenance (IQ256Content)
creator()is the keyring account that authorizes minting. It is immutable.contentOf(tokenId)is the SHA-256 of the token's metadata document. Clients MUST verify fetched metadata against it and MUST treat a mismatch as no metadata. Zero means the token is not hash-anchored (for example, a wrapped legacy token).tokenURI(tokenId)SHOULD beipfs://f01551220followed by the hex content hash. That string is a CIDv1 (multibase base16, raw codec0x55, sha2-256 multihash0x12 0x20), so the locator proves what it points to and any gateway or local node can serve it. Metadata documents SHOULD be a single raw block (at most 256 KiB, added with raw leaves and CIDv1). Media inside them SHOULD be referenced by CID and also carry asha256field.- Minting, signed by the creator:
mint(auth, Mint[])with actionH(enc(MINT_TAG, H(abi.encode(mints))));commitDrop(auth, root)with actionH(enc(DROP_TAG, root)), then anyone mayclaim(root, mint, proof). The leaf isH(H(enc(tokenId, holder, contentHash))), and the tree uses sorted pairs (the OpenZeppelin convention). One signature authorizes a drop of any size.
- Revisions. A collection deployed
revisablelets the creator signrevise(tokenId, contentHash)(actionH(enc(REVISE_TAG, tokenId, contentHash))), which emitsContentSetwith a revision counter, until the creator signsseal()(actionH(enc(SEAL_TAG))). A collection deployed non-revisable can never change content, and since burned IDs never return, a token ID's content can never be replaced by burning and re-minting. - Drops cannot be revoked once committed. A creator who also mints an ID directly that sits in a committed drop lets anyone race the mint with a claim; creators SHOULD keep drop IDs and direct-mint IDs apart.
Verifying provenance offline. Fetch the mint or drop transaction. Recompute the digest from (chain ID, keyring, creator account, nonce, deadline, token contract, action, next). Run the verifier's algorithm on the signature in calldata. Check that the fingerprint's leaf belongs to the creator's commitment at that nonce. Commitments chain back to the account ID through KeysRotated events, each of which was itself signed by the previous key, so the whole key history is a self-certifying log that starts at the account ID. No step needs an elliptic curve, an indexer or a live chain.
4.6 Migration of existing NFTs
Q256Wrapper is bound to one legacy ERC-721. A holder calls legacy.safeTransferFrom(eoa, wrapper, id, abi.encode(holderId)) before Q-day. The wrapped token then moves only under Q-256 rules, and unwrap(auth, id, to) returns the original.
Wrapping protects against theft of the owner's key. It does not protect against the legacy collection's own L4: an owner or upgrade key that can rewrite the contract can still take tokens out of the wrapper. Wallets SHOULD show the legacy collection's admin surface before wrapping. Tokens sent with plain transferFrom are not credited and stay in the wrapper. burn is refused on wrapped tokens, since it would strand the original. An approved operator contract can unwrap (unwrapFrom), as with any other move.
After Q-day, a legacy owner cannot be told apart from an attacker who recovered the same key. The only known rescue is a post-quantum proof of knowledge of the wallet seed that derived the key (Mysten Labs for EdDSA; ZKPoSP for BIP-32 HD wallets). Section 12 lists it as future work.
4.7 Holdings and Stock Collections (IQ256Holdings)
Tokens can hold assets. This is what puts Stock Tokens inside a Q-256 NFT.
- One holding address per token.
holdingOf(tokenId)is the CREATE2 address of a clone of the collection'sHoldingAccount, with salt = tokenId. The clone is EIP-1167 with a 6-byte prefix (51-byte runtime) that accepts plain ETH without delegating, so even a 2,300-gastransferreaches a deployed holding. It is known before the token or the clone exists. Anyone can send ERC-20s or ETH to it at any time, from any wallet or exchange, with a plain transfer. The clone is deployed on the first withdrawal. - Only the holder takes assets out.
withdraw(auth, tokenId, asset, amount, to)is signed by the holder account, with actionH(enc(WITHDRAW_TAG, tokenId, asset, amount, to)).asset= zero address means ETH.withdrawFromis the code path, and only the contract that holds the token can use it.- Operators cannot withdraw. But an approved operator has full power over the token, and so over what it holds: it can move the token to itself and withdraw as the new holder. Approve only contracts you would trust with the token.
- Holdings move with the token. Transferring the token transfers everything at its holding address, because only the holder can withdraw.
- No arbitrary calls. A holding account can only
sendwhat the collection tells it to. It never grants approvals, so nothing a seller sets up can outlive a sale. - Redeem, not burn.
burnreverts.redeem(auth, tokenId, assets, to)(actionH(enc(REDEEM_TAG, tokenId, H(packed(assets)), to))) burns the token and sends the full balance of each listed asset toto. The redeemer (redeemerOf(tokenId)) keeps the right towithdrawanything left in, or later sent to, the burned token's holding, so nothing is stranded. - Sale safety, enforced by the token.
- Every withdrawal increments
basketNonce(tokenId)and clears the token's single approval. - Plain
transferFromis reserved for the contract that holds the token. Operators must calltransferFromAtNonce(tokenId, to, data, expectedBasketNonce), which reverts if the basket changed since the operator looked. The check runs at the moment the token moves, so a seller who withdraws and re-approves in the middle of a fill (for example, from the payment callback) still cannot deliver an emptied token. - Escrow (4.8) is the other safe pattern: while the market holds the token, nobody else can withdraw.
- Every withdrawal increments
- Assets. Holdings support ERC-20s (anything with
transfer(address,uint256)) and ETH. NFTs sent withsafeTransferFromare refused. Anything sent another way that needs more thantransferto leave is stuck. - ERC-165 ID:
IQ256Holdings=0xc3d3941c.
Backed drops (StockCollection). The creator signs one Merkle root over leaves H(H(enc(BACKED_LEAF_TAG, tokenId, contentHash, backingAsset, backingAmount, feeAsset, feeAmount))). Anyone then calls claimBacked(root, leaf, holder, proof):
- The backing is pulled from the caller straight into the token's own holding address.
- The fee is pulled from the caller to the collection's immutable
payoutaddress. - The token is minted to
holder.
The backing never passes through the creator: the token is born holding it. ETH amounts are paid exactly in msg.value. The leaf fixes content, backing and fee, so nobody can mint a token cheaper or with different content.
In a Stock Collection, claimBacked is the only way to mint: the creator's mint and plain claim revert. So no token can exist without the backing its leaf names. Content is never revisable. A creator can still sign two leaves for the same token ID with different terms; the first claim wins, and every claimer pays exactly the leaf they claim.
Factory. StockCollectionFactory.create(creator, name, symbol, uriPrefix, payout, salt) deploys a collection at a CREATE2 address derived from (creator, salt). Anyone may call it. Naming a creator grants nothing, since every mint and drop still needs that creator account's post-quantum signature. This is how anyone launches a Q-256 collection in one transaction.
4.8 Reference market (escrow)
Q256Market (informative) shows how Q-256 tokens trade without reintroducing classical authority, and without basket races:
- List by a signed
transferof the token to the market's contract-holder ID, withdata = abi.encode(currency, price, payTo, expiry). The seller's post-quantum signature coversH(data), so the terms are as authenticated as the move. The market accepts only holder-signed moves (operator == 0,from != 0). - While listed, the market is the holder: the seller can neither move the token nor withdraw its holdings.
- Buy with
buy(token, tokenId, listingId, currency, price, buyer). Every listing gets a new ID, and the buyer names the ID, currency and exact price they saw. A seller who cancels, empties the token and relists, even in the same transaction as the buyer's purchase, creates a new listing, so the old order cannot fill. The proceeds go topayToin ETH or an ERC-20, and the token, with everything it holds, goes to the buyer's account or contract. - Cancel needs the seller's signature, which the market checks through the keyring with itself as caller, over
H(enc(H("q256.market.cancel.v1"), token, tokenId)). After expiry, anyone can return the token to its seller. - No owner, no fees, no royalties. Fee and royalty policy is a product decision, not part of the standard.
4.9 The Q256 token and vaults (Q256Vaults)
ERC-404 made one token equal one NFT, converting automatically on every transfer. Q-256 keeps the idea and makes the conversion an explicit action:
Q256Tokenis a plain ERC-20 with a fixed supply (10,000 whole tokens in the reference launch). It is minted in full at deployment to the launch address. Afterwards only the vault contract, which deployed it, can mint or burn, and never above the maximum. It has no owner. Holders are ordinary addresses: this is the liquid, classical form.toVault(holder, count)burnscountwhole tokens from the caller (only the caller's own) and mintscountfresh vault NFTs to the Q-256 accountholder. At most 20 per call.toToken(auth, tokenId, assets, to), signed by the vault's holder asToToken(uint256 tokenId,address[] assets,address to):- sends the full balance of each listed asset in the vault's holding to
to; - burns the NFT and records the holder as its redeemer;
- mints one token to
to.
Anything not listed stays claimable by the former holder (4.7). A contract holder uses
toTokenFrom.burnandredeemare disabled, so a vault can only leave by becoming a token.- sends the full balance of each listed asset in the vault's holding to
Invariant:
token.totalSupply() + liveVaults × 10^18 = maxVaults × 10^18, always, including inside receiver hooks and asset callbacks: every count, holder and mint settles before any external call. Fuzzed across 12,800 random actions per run in the reference tests.Vaults are Holdings tokens (4.7). Each has its own address for Stock Tokens and other assets. Only its holder takes them out, operators must bind the basket nonce, and selling the NFT sells what it holds.
Art is fully on-chain. Each vault's image is a two-dimensional lattice drawn from
keccak(salt, tokenId), with its shortest vector marked, the problem behind lattice-based post-quantum signatures. Everything is computed in integers:- two basis vectors are taken from the seed's low bytes;
- one of eight exact rotations, built from Pythagorean triples such as (3, 4, 5), turns the lattice without any trigonometry;
- the shortest vector is found by exhaustive search over coefficients from -10 to 10;
- the hue comes from further seed bits.
Any implementation reproduces the image byte for byte; the site's build script does, and is checked against the deployed contract.
tokenURIis a base64 JSON data URI with a base64 SVG image,contentOfis SHA-256 of that JSON, andpreviewSvg(id)shows any ID's art. The metadata lists hue, rotation, number of points and the shortest vector's length. IDs only increase, so every conversion back and forth draws new art (the ERC-404 "reroll") and a new holding address. Anyone can send assets to a future ID's address in advance, so a new vault can arrive with gifts in it.Why not automatic conversion: ERC-404-style minting on every transfer makes DEX trades mint and burn NFTs (gas, denial of service), and it binds NFTs to ERC-20 addresses, which is exactly the classical key this design avoids. Here, trading costs what any ERC-20 trade costs, and moving to the vault is a deliberate step: trade it as a token, hold it as a vault.
5. WOTS-K: Winternitz one-time signatures over keccak-256
Parameters: n = 32 bytes, w = 16, len1 = 64, len2 = 3, len = 67.
- Digits. For a 32-byte digest,
d_0 … d_63are its nibbles, most significant first.C = Σ_{i<64} (15 − d_i), which lies in [0, 960]. Thend_64 = (C >> 8) & 15,d_65 = (C >> 4) & 15,d_66 = C & 15. - Chain step.
F(i, j, x) = H(pubSeed ‖ uint256(1 << 248 | i << 8 | j) ‖ x). Stepjof chainiis domain-separated by position and by the key'spubSeed, which gives WOTS+-style resistance to multi-target attacks across keys and chains. - Keys. The secret chain heads are
sk_i = H(enc(skSeed, i)). The chain tops arepk_i = F(i, 14, … F(i, 0, sk_i)), 15 steps. The fingerprint isH(pubSeed ‖ uint256(2 << 248) ‖ pk_0 ‖ … ‖ pk_66). - Sign.
sig = pubSeed ‖ s_0 ‖ … ‖ s_66, withs_i=sk_iadvancedd_isteps (from step 0 to step d_i − 1). Length 2,176 bytes. - Recover. Advance each
s_ifrom stepd_ito step 14, then hash the tops as above. Return 0 if the length is not 2,176. - Why the checksum matters. Anyone holding one signature can advance any chain, which raises the corresponding message digit. Raising any message digit lowers
C, which lowers at least one checksum digit, and lowering a digit requires a keccak preimage. Without the checksum, one signature is enough to forge others. That is the flaw in the first Solana Winternitz vault release. The reference tests demonstrate the attack and its failure (test_checksumBlocksDigitBumpForgery). - Security. Security reduces to second-preimage and preimage resistance of keccak-256 with tweaks: about 256 bits classical and about 128 bits against Grover. Signing a second, different digest with the same key breaks it. Sections 4.2 and 6 exist to make that impossible in normal use.
6. Wallet requirements
6.0 Standard wallets: the key slot
Users do not need a new wallet. The reference app works like this:
- Every Ethereum address has a Q-256 account,
walletAccount(address) = leaf(Secp256k1Verifier, address). Nothing needs registering, and tokens can be sent to it before its owner ever signs. - To act, the wallet signs the keyring's typed data with
eth_signTypedData_v4, showing the action's fields. Anyone, such as a relayer, then submits it, so the user needs no gas. - The wallet key is the account's one classical part, and it sits in a slot. One signed
Rotate()moves the account to a post-quantum key set, and nothing the account holds moves. That set can hold WOTS-K keys, or a smart wallet (ERC-1271) that validates post-quantum signatures, which is the path a wallet vendor's future post-quantum accounts would take. - The honest claim: the protocol is post-quantum, wallet keys are replaceable, and replacing one takes a single signature. Until an account rotates, a quantum attacker who recovers its wallet key can sign for it. Users who want protection now can add a WOTS-K key to the set at any time.
6.1 One-time discipline
- A wallet MUST NOT sign two different digests with the same one-time key. It MUST record (key, digest) in durable storage before a signature leaves the device, and refuse any other digest for that key. The reference
OneTimeSigner(sdk/q256.mjs) does this with a journal: the same request returns the same bytes, and any other request at that nonce throws. - If a signed authorization fails or is not included, the wallet MUST rebroadcast the same bytes, retire it after its deadline, or rotate with the recovery leaf (4.2.3). It MUST NOT re-sign at that nonce.
- Deadlines SHOULD be short (the reference default is 30 minutes) and MUST be within
MAX_WINDOW. - Inputs MUST be typed exactly. The blind review found that a wallet library which read a hex string as raw bytes, or a decimal string as hex, signed something other than what the user meant; the failed transaction then exposed the key, and the natural retry reused it. The reference SDK accepts only bigints, exact-width byte arrays and exact-width 0x-hex, and checks every signature against its key before returning it.
- The reference
OneTimeSignerrefuses to start without an explicit journal (fileJournalin apps,memoryJournalonly in tests): a journal lost on reload is exactly how a key ends up signing twice. - Wallets SHOULD NOT keep signed one-time authorizations off chain. Gasless off-chain listings need a many-time scheme (ML-DSA, SLH-DSA). With such a scheme, the account nonce works as a cancel-all counter, like Seaport's.
6.2 Key sets
Wallets SHOULD give every account at least two leaves. The reference profile pairs them by nonce: the set for nonce k is [hotLeaf(k), recoveryLeaf(k)].
- The hot key is derived from the wallet seed (6.3) and signs everyday actions.
- The recovery keys come from a separate seed on a cold device. The cold device exports only their public leaves (for example, the next 10,000), so the hot wallet can commit to them without holding their secrets.
- Either key can sign at nonce k, and either way the account moves to the set for k + 1. The recovery key is how a wallet escapes an exposed hot signature at once (4.2.3), and how it recovers from a lost hot device.
Rotating to a set that still contains a spent one-time leaf is allowed but useless: the keyring refuses that leaf when it signs again.
6.3 Deterministic derivation
acct = H(enc(H("q256.wallet.account.v1"), masterSeed, chainid, keyring, verifier, accountIndex))
skSeed = H(enc(H("q256.wallet.sk.v1"), acct, k))
pubSeed = H(enc(H("q256.wallet.pub.v1"), acct, k))
Key k signs nonce k and commits to key k + 1. The only wallet state is the seed and the signing journal (6.1). The current nonce is read from the chain. Including chainid, keyring and verifier means the same seed never produces the same one-time key on two chains or under two verifier deployments. Account IDs are therefore per chain. Section 12 discusses a shared cross-chain identity.
7. Typed data and tags
Signed actions (EIP-712 struct definitions; the Authorization type string appends the action's definition, as Q256Types.sol and sdk/q256.mjs do):
| Action | EIP-712 definition | Caller |
|---|---|---|
| Transfer | Transfer(uint256 tokenId,bytes32 to,bytes data) |
token |
| TransferBatch | TransferBatch(uint256[] tokenIds,bytes32 to,bytes data) |
token |
| Approve | Approve(uint256 tokenId,address operator) |
token |
| SetOperator | SetOperator(address operator,bool approved) |
token |
| Burn | Burn(uint256 tokenId) |
token |
| Mint | Mint(MintItem[] mints)MintItem(uint256 tokenId,bytes32 holder,bytes32 contentHash) |
collection |
| Drop | Drop(bytes32 root) |
collection |
| Revise | Revise(uint256 tokenId,bytes32 contentHash) |
collection |
| Seal | Seal() |
collection |
| Unwrap | Unwrap(uint256 tokenId,address to) |
wrapper |
| Withdraw | Withdraw(uint256 tokenId,address asset,uint256 amount,address to) |
holdings token |
| Redeem | Redeem(uint256 tokenId,address[] assets,address to) |
holdings token |
| ToToken | ToToken(uint256 tokenId,address[] assets,address to) |
vaults |
| Cancel | Cancel(address token,uint256 tokenId) |
market |
| Rotate | Rotate() |
keyring |
Other tags (keccak-256 of the string):
| Constant | String |
|---|---|
LEAF_TAG |
q256.keyring.leaf.v1 |
BACKED_LEAF_TAG |
q256.backedLeaf.v1 |
| wallet derivation | q256.wallet.account.v1, q256.wallet.sk.v1, q256.wallet.pub.v1 |
8. Rationale
- Why not ERC-721 compatible. ERC-721's
ownerOfreturns an address, and every wallet, marketplace and indexer treats that address as a key holder that can sign. A compatible facade would invite integrations to grant authority to EOAs again. Q-256 uses different event signatures so indexers cannot confuse the two. A read-only adapter for display is possible and harmless. - Why bytes32 holders. An account ID is a hash commitment, not an address. 32 bytes keeps 128-bit collision resistance even against quantum search. 20-byte addresses keep about 80 bits classically, which is already within reach.
- Why a separate keyring. It is the NEAR account model on an EVM chain. One account holds tokens across many collections. Keys rotate once for all of them. Token contracts stay small and never parse signatures.
- Why hash-based by default. It is the only post-quantum family every EVM chain can verify today at token-transfer cost (about 74k gas, against 1.5M to 4.9M for lattice schemes in Solidity). It rests on the weakest assumption (hash security). Ethereum chose the same family for consensus. Lattice schemes plug in through verifiers once precompiles exist.
- Why
callerin the digest. It binds every signature to the contract that consumes it, so one collection's authorization cannot be spent in another, and nothing but the intended contract can burn the nonce. - Why deadlines, a window and
retire. Without deadlines, a signed authorization could execute at any point in the future. Without a maximum window, a failed authorization with a far deadline would freeze its account for as long as the deadline says. Withoutretire, an expired one-time authorization would trap the account (4.2.3). - Why record spent leaves. It costs about 22,000 gas per signed action, and it turns "a one-time key signs once" from a wallet promise into a chain rule. It closes rotations back to an old key and spent leaves kept in a new set, both of which the blind review exploited.
- Why pin the verifier's code hash. It makes the scheme part of the key. A verifier cannot be swapped under an account even on chains that still allow metamorphic contracts.
- Why CIDv1 raw URIs. The locator is computed from the on-chain hash. Nobody can re-point it, and any client can verify it.
9. Security considerations
- Transaction senders are still ECDSA. On today's EVM chains, whoever submits a transaction signs it with ECDSA. In Q-256 that key only pays gas. An attacker who forges a relayer's transaction can submit authorizations, but cannot create or alter them. Front-running a Q-256 authorization executes exactly what the holder signed.
- Malicious verifiers. An account that trusts a verifier which accepts anything has no security. This is the holder's choice, made at key-set construction. Wallets MUST only build key sets from audited, known code hashes. Token contracts are unaffected.
- One-time key reuse is the main operational risk of WOTS-K, and it comes from failed transactions, not from malice (4.2.3). The keyring enforces what it can see: a one-time leaf authorizes at most once, ever, and accounts cannot be bricked onto a spent single key. It cannot see a second signature that never reached the chain; only the wallet can prevent that (6.1).
- Account ID collisions. An account ID matches the contract-holder pattern with probability 2^-96. Matching a specific contract would require a keccak preimage.
- Contract holders and operators are only as safe as their code. Q-256 refuses EOAs and 7702-delegated EOAs, but it cannot read a contract's mind. A token sent to an ERC-4337 or Safe-style smart account whose owners sign with ECDSA, or approved to an executor such an account controls, is under ECDSA authority again. The blind review demonstrated both. "No ECDSA key can move a token" holds for tokens held by keyring accounts and by contracts without classical keys; wallets SHOULD warn before sending a token to, or approving, a contract whose authority they cannot classify.
- Metamorphic contracts and 7702. Code hashes are pinned for verifiers. Operators and contract holders are checked for code, and for not being a 7702 designator, both when approved or received and when they act. A contract approved in the same transaction that creates and self-destructs it could come back with different code. Holders should approve only contracts that already exist.
- Consensus and bridges. Q-256 secures the token layer. If the chain's validators sign with BLS or Ed25519, a CRQC can attack consensus itself (long-range forks, light-client forgery). Q-256 cannot fix that. It removes everything above it. Bridges for Q-256 tokens MUST NOT rely on classical committee signatures. A STARK light client is the intended path.
- Content. A token's content hash is immutable unless the collection is revisable and unsealed. The creator account is the only actor who can revise it, and it is post-quantum.
- Issuer controls on Stock Tokens reach the collection too. Real Stock Tokens check the spender as well as the parties to a transfer. If the issuer blocks a collection's address, every
claimBackedin it stops, and so does every fee-paying claim ifpayoutis blocked. Withdrawals are unaffected, because the holding is the sender. This was verified on a mainnet fork. - 160-bit addresses. Holding addresses are 20 bytes, like every EVM address. A malicious creator chooses the token IDs, so with about 2^80 work (a birthday search over IDs and key pairs) they could find an ID whose holding address they also control as a key. They could then drain that token's backing with the Stock Token's ECDSA
permit. 2^80 is beyond any known attacker today but below post-quantum targets. It is a limit of the EVM's address size, not of this design. A quantum attacker targeting an existing holding needs a 160-bit preimage (about 2^80 Grover iterations). - Holdings: what is and is not protected. Q-256 protects the claim on assets at a holding address. It cannot protect an asset from its issuer: Stock Tokens can be blocked, burned, paused or upgraded by Robinhood's keys. Per-token holding addresses keep any such action to one token. Assets sent to the holding address of a burned token are lost. Assets sent before mint go to whoever the token is minted to. A token's value can be reduced by its holder at any time, so buyers rely on escrow or the basket nonce (4.7).
- Standard-wallet keys are classical, by design. An account whose key set holds a
Secp256k1Verifierleaf is exactly as quantum-safe as that wallet key, until it rotates. The protocol around it is not weakened: every token, holding, mint, content hash and market rule stays post-quantum, and the move to a post-quantum key needs no asset transfer. Marketing MUST NOT call such accounts quantum-safe; "post-quantum protocol, replaceable keys" is accurate. - Smart-wallet keys trust the wallet. An ERC-1271 key is as strong as the wallet's validation and upgrade rules. The verifier forwards all gas on purpose, because post-quantum wallets may need millions of gas to verify. A hostile wallet can only waste the gas of transactions made for its own account.
- The Q256 token is classical. ERC-20 balances belong to addresses, so converting to a vault is the step that moves value under Q-256 rules. The conversion contract cannot be paused or administered, and the supply invariant holds on every path, including reentrancy through receiver hooks (all conversion paths are non-reentrant).
- Art is predictable. Anyone can preview the art of the next IDs, so collectors may race for IDs whose art they like. This is the known ERC-404 "reroll" dynamic, not a protocol fault.
- Censorship and griefing. A holder's nonce moves only when an authorization the holder signed is executed: by the bound contract, for the signed action, before the deadline, or retired after it (or at once, if its deadline lies beyond the window). Anyone may submit it, and doing so only carries out what the holder signed. Gas griefing through a heavy verifier affects only accounts that chose it.
10. Launch chain and mapping to other chains
10.1 Robinhood Chain (launch chain)
Q-256 launches on Robinhood Chain: an Arbitrum Nitro layer 2, chain ID 4663 (testnet 46630), with ETH as gas and data posted to Ethereum blobs.
- Stock Tokens. Robinhood's API (
api.robinhood.com/rhj/assets) lists 205 Stock Tokens on chain 4663, all active (read 2026-12-05). Each is an ERC-20 with 18 decimals behind a beacon proxy.- Dividends and splits change an on-chain multiplier (
uiMultiplier(), ERC-8056) and never balances, so a holding address needs no special accounting. Value = balance × price, where the Chainlink feed price already includes the multiplier. - Identify Stock Tokens by contract address from that registry, never by ticker.
- Dividends and splits change an on-chain multiplier (
- Issuer powers seen in the token bytecode: mint,
adminBurnfrom any address, block addresses, pause, oracle pause, multiplier updates,permit, and roles kept in an external access-controlled registry. Upgrades happen through one beacon for all tokens. - What Q-256 adds.
- The claim on a Stock Token held by a Q-256 token needs a hash-based signature.
- A holding address has no secp256k1 key, so no
permitcan ever be signed for it. - Each token has its own holding address, so a block, burn or freeze at one address touches one token.
- What Q-256 cannot fix. The issuer's own keys can upgrade the beacon, mint, burn and block. That trust in Robinhood is the same for every Stock Token holder, and it is classical until Robinhood says otherwise.
- Deployment.
script/DeployRobinhood.s.sol(saltq256.v0.2) deploys Keyring, WotsKeccakVerifier and StockCollectionFactory through the CREATE2 deployer0x4e59b448…956C, so the addresses are fixed in advance. Simulated on a fork of block 130,600,000: 8.7M gas in total, about 0.00035 ETH at 0.04 gwei. Predicted addresses (bytecode as of this draft; any code change moves them): Keyring0x1eE7Fb783E0a869c34f1E4C0ABdDB83c2Cd7768e, WotsKeccakVerifier0x77F1B40C988E8868d318b50212b1636A3c0E4e34, StockCollectionFactory0xe01455aAb18DFcA3068100BEE579EC9b15D39Cf2. A signed transfer of about 295k gas costs about 0.000012 ETH there. - Live on testnet (chain 46630), draft 0.3: Keyring
0x7495910bA39D96757d16E6D17DEA44083881e3F7, WotsKeccakVerifier0x7E9d8c055848cC45ea418F384482681D1f779E6c, Secp256k1Verifier0x884289DDb6fBD3a092ed6A825dd5037e0419C721, Erc1271Verifier0x7d28EdE7c37849B96fC81991581eEF87007B5f8f, StockCollectionFactory0x1359eD96D23CCcd17bf7d1993e87B458579EAdAc, Q256Vaults0xa66595D69903c250775EC9944E01CC8277798E9D, Q256Token0x0c77058D7f4FaA7a601e27F138161e1af8108Bb9(deployments/robinhood-testnet.json).script/RehearseVaults.s.solran the vault flow there in 15 transactions, all successful. The site's lattice tiles are byte-identical to the contract'spreviewSvgfor every tile shown, and the decodedtokenURIof a live vault matches its tile. A Stock Collection rehearsal ran on draft 0.2. Testnet has no Stock Tokens, soscript/RehearseTestnet.s.soluses mocks. It ran the whole flow in 20 transactions, all successful: a signed drop, two backed claims, a top-up, a signed withdrawal, a signed listing and a sale through the market, and a signed redeem. Measured gas: commitDrop 245k, claimBacked 161k, first withdraw 332k, signed listing transfer 320k, buy 73k, redeem 351k. - Robinhood's terms bind front ends and copy, not contracts.
- Call them "Stock Tokens", never "tokenized stocks" or "tokenized equities" (Robinhood Chain terms 5.7(j)).
- Do not use Robinhood Chain marks in NFT metadata or artwork (5.7(h)).
- Stock Tokens may not be offered or sold to U.S. persons, and the docs name other restricted jurisdictions.
- The sequencer excludes transactions from sanctioned addresses.
- A token that holds Stock Tokens may itself be treated as a security in some places: get counsel before selling backed drops.
- Verified on a mainnet fork (
test/fork/RobinhoodFork.t.sol, real AAPL, NVDA and USDG):- a backed claim with an AAPL backing and a USDG fee;
- a top-up with NVDA by plain transfer;
- a transfer between post-quantum accounts;
- a withdrawal that deploys the holding clone;
- a redeem that burns the token and returns both Stock Tokens. The multiplier was untouched throughout.
10.2 Other chains
- NEAR. The keyring is native: account IDs with ML-DSA access keys. A conforming NEP-171 contract SHOULD:
- be deployed on an account with no full-access keys (a locked contract), or whose keys are all ML-DSA;
- require
reference_hash(SHA-256 of the metadata) on every token; - accept approvals only for contract accounts, or require ML-DSA-only accounts as approved operators;
- record creator provenance as an ML-DSA-signed mint;
- refuse function-call keys as a path to
nft_transferfor high-value tokens.
- Solana. A keyring program holding WOTS-K accounts, using the keccak syscall. Tokens owned by PDAs controlled by that program. Metaplex Core assets owned by those PDAs, with their update authority set to a PDA or removed.
- Sui and Aptos. A keyring Move module. Holders are objects owned by that module. On Aptos, a post-quantum authentication key added natively later makes the module unnecessary for L1.
- Bitcoin. Not possible today without new opcodes. P2MR (BIP-360) plus a future post-quantum signature opcode would let inscriptions sit behind hash-committed post-quantum keys.
11. Costs
Measured on the reference implementation (Solidity 0.8.28, optimizer 10,000 runs, Prague) by an independent test suite with forge test --isolate: each call is its own transaction with cold storage, which is what a user pays. "Transaction" adds the 21,000 base and calldata (a signed request is about 2.5 KB).
| Operation | Execution gas | Transaction (est.) |
|---|---|---|
WOTS-K recover, best / median / worst digest |
22,000 / 74,000 / 134,000 | |
transfer, account to account |
236,000 | 295,000 |
transfer, account to contract (receiver hook) |
288,000 | 347,000 |
transferBatch, 5 tokens, one signature |
278,000 | 338,000 |
approve / setOperator |
256,000 / 254,000 | 315,000 / 313,000 |
burn |
226,000 | 285,000 |
mint, 1 token / 10 tokens |
236,000 / 700,000 | 295,000 / 770,000 |
commitDrop (any size, one signature) |
209,000 | 268,000 |
claim, one token (no signature) |
86,000 | 113,000 |
rotate / retire |
221,000 / 213,000 | 279,000 / 272,000 |
transferFrom by a contract (no signature) |
42,000 | 65,000 |
Where the gas goes in a signed action: about 74,000 for WOTS-K verification, about 40,000 for 2.5 KB of calldata, about 22,000 to record the spent leaf, and the account and token storage writes.
For comparison, an ERC-721 transfer costs about 50,000 gas, and lattice verifiers written in Solidity cost about 1.5M (Falcon) and 4.9M (ML-DSA) for verification alone. On rollups the signature goes into blobs and the difference is small.
Deployment: Keyring 870,000; WotsKeccakVerifier 208,000; Q256Collection 2.7M; Q256Wrapper 2.0M. On Robinhood Chain, the shared contracts plus the factory take 8.7M gas.
Per key type, full transactions on a fresh account (independent test suite, --isolate):
| Operation | WOTS-K | Standard wallet | Smart wallet |
|---|---|---|---|
| transfer | 260,000 | 128,000 | 134,000 |
| list (signed transfer into the market) | 304,000 | 170,000 | 177,000 |
| first withdrawal (deploys the holding) | 302,000 | 168,000 | 174,000 |
| toToken with one asset | 351,000 | 218,000 | 224,000 |
| rotate | 188,000 | 53,000 | 59,000 |
Unsigned: toVault of one vault, 133,000; of twenty, 600,000. Verifying alone: WOTS-K about 84,000, ECDSA about 4,400, ERC-1271 about 10,500 plus the wallet's own check.
Standard-wallet signatures (reference tests, warm state, execution gas): a signed transfer is about 100,000, against about 130,000 to 236,000 with WOTS-K. toVault (1 vault) is about 121,000. toToken sweeping one asset with a wallet signature is about 229,000. Rendering a vault's art is about 350,000 in a view call (free to read).
Holdings (reference tests, warm state, execution gas): claimBacked with an ERC-20 backing and fee, about 197,000; first withdraw of a token (deploys its holding clone), about 282,000; later withdrawals, about 134,000.
12. Open questions and roadmap
- Cross-chain identity. One account ID on many chains without key reuse: a genesis tree with one leaf per chain, or a many-time cold key that authorizes per-chain hot keys.
- Post-quantum bridging. Move a Q-256 token by proving source-chain state with a STARK light client, never with committee signatures.
- Lattice verifiers. An ML-DSA adapter as soon as EIP-8051 or an equivalent ships, and an SLH-DSA Solidity verifier for cold keys.
- Seed-proof rescue. A STARK proof that the prover knows the BIP-39/BIP-32 seed behind a legacy EOA, accepted by a wrapper after Q-day, so owners who missed the window can still migrate (following ePrint 2025/1368 and ZKPoSP).
- Marketplace profile. A standard escrow contract (code authority) with post-quantum signed listings.
- Royalties. An ERC-2981 equivalent where the receiver is a holder (
bytes32), not an EOA. - Formal review. External audit of the keyring and WOTS-K, and submission as an ERC once the interfaces settle.
13. Review history
2026-12-05, draft 0.1. Two reviewers with no context, each working on a comment-stripped copy of the code, given only the promises the system makes to users: one adversarial security review, one independent test suite (150 tests, including fuzzing and invariants). Neither found a way for an outsider to move a token while the wallet behaves correctly. They found:
| Finding | Severity | Resolution |
|---|---|---|
| A failed transaction exposes an unconsumed one-time signature, and re-signing leads to forgery (account takeover demonstrated from 4 re-signs) | High | MAX_WINDOW; far deadlines retirable at once; recovery-leaf profile (6.2); journaling OneTimeSigner (6.1) |
| SDK read hex strings as raw bytes, leaking most of a key's chains | High | Strict input types; every signature checked against its key before release |
Keyring only refused next == current, so a spent key could become current again |
Medium | Spent-leaf record; spent single-key sets refused as next |
| A burned token ID could be minted or claimed again, changing its content even in a sealed collection | Medium | Burned IDs never return |
| SDK read decimal strings as hex and truncated large numbers | Medium | Strict input types |
The receiver hook credited the transaction submitter as operator |
Medium | Zero operator for signed moves |
| Tokens held by ECDSA-controlled smart accounts are under ECDSA authority | Medium | Documented (9.5); cannot be enforced on chain |
burn on a wrapped token stranded the original |
Low | Refused |
| Contract holders could not approve | Low | approveFrom, setOperatorFrom |
| Key derivation did not include the verifier address | Info | Added (6.3) |
2026-12-05, round 3 (holdings and Stock Collections). A fresh blind security review, with real-Stock-Token fork tests, found no critical or high issue. Nobody can take assets from a holding they don't control, mint a listed token below its signed terms, or reuse a signature.
| Finding | Severity | Resolution |
|---|---|---|
| Buyer protection had holes: holder-wide operator approvals survived withdrawals, and a seller could withdraw and re-approve during a fill | Medium | Basket nonce enforced when the token moves: operators must use transferFromAtNonce; plain transferFrom is for the holder contract only |
| A deployed holding refused ETH sent with the 2,300-gas stipend | Low | Custom clone runtime answers plain ETH without delegating; fallback for ETH with calldata |
redeem stranded assets it was not told about |
Low | The redeemer keeps a claim on the burned token's holding |
| The creator could mint listed IDs unbacked, or revise content after a sale | Low | Stock Collections mint only through claimBacked; content is never revisable |
| An operator can empty a basket by moving the token to itself | Info | Documented: operators have full power over the token and its holdings |
| Issuer blocks on the spender stop all claims in a collection | Info | Documented (9.9) |
| 160-bit CREATE2 collision by a malicious creator (about 2^80) | Info | Documented (9.10) |
2026-12-05, round 4 (wallet keys, EIP-712, the Q256 token and vaults). A blind security review and an independent suite of 321 tests (every promise under all three key types, fuzzing, invariants, mutation checks, and 68 SDK-signed calls cross-checked with viem) found no critical issue. Nobody could forge a signature, break the supply rule at the end of a transaction, or take assets from a vault they do not hold.
| Finding | Severity | Resolution |
|---|---|---|
| A market purchase did not lock the listing the buyer saw: a cancel, withdraw and relist landing just before it could deliver an emptied token, or charge a different currency | High | buy names the listing ID, currency and exact price |
| The SDK signer defaulted to an in-memory journal, so a reload could make a one-time key sign twice | Medium | The signer refuses to start without an explicit journal |
A wallet signature on any action could carry a key change (next) that wallets show as an unreadable hash |
Low | Many-time keys change keys only through Rotate() (RotateOnly) |
| The supply rule was visibly off inside receiver hooks and asset callbacks, mid-transaction | Low | All bookkeeping and the token mint settle before any external call |
| The ERC-1271 check read only 4 bytes, so an echoing contract "signed" anything; EIP-7702 accounts passed as smart wallets | Low | Exactly bytes32(0x1626ba7e) in exactly 32 bytes; 7702 designators refused |
| A one-time key in a multi-key set could name itself as the next set and freeze the account | Low | The spent check on next runs after the signing leaf is marked |
| Anyone can send assets to a future vault's address | Info | Documented: a new vault may arrive with gifts |
14. References
- NEAR, "Quantum-Safe NEAR: The Roadmap to Post-Quantum Security": https://www.near.org/blog/near-quantum-safe-roadmap
- NEAR mainnet release: https://www.prnewswire.com/news-releases/near-protocol-brings-quantum-safe-signing-to-mainnet-302829646.html
- Quantum exposure report, NEAR: https://quantumtracker.org/reports/blockchains/near-protocol.html
- ethereum.org, post-quantum roadmap: https://ethereum.org/roadmap/security/quantum-resistance/
- EIP-8141 frame transactions: https://eips.ethereum.org/EIPS/eip-8141
- EIP-8051 ML-DSA precompile: https://eips.ethereum.org/EIPS/eip-8051
- EIP-7932 secondary signature algorithms: https://eips.ethereum.org/EIPS/eip-7932
- EIP-7619 Falcon-512 precompile: https://eips.ethereum.org/EIPS/eip-7619
- ZKNox ETHDILITHIUM: https://github.com/ZKNoxHQ/ETHDILITHIUM. Gas survey: https://github.com/AppliedPQC/pqc-research/issues/35
- Baldimtsi, Chalkias, Roy, Sedaghat, "Post-Quantum Readiness in EdDSA Chains": https://eprint.iacr.org/2025/1368
- ZKPoSP: https://eprint.iacr.org/2026/1508
- Solana Winternitz vault checksum issue: https://solanacompass.com/news/winternitz-shield-solana-foundation-researcher-releases-tool-for-the-missing-checksum-in-solana-winternitz-v01
- BIP-360 (P2MR) overview: https://www.spark.money/research/bitcoin-bip-360-quantum-resistant-address-format
- FIPS 204 (ML-DSA), FIPS 205 (SLH-DSA), draft FIPS 206 (FN-DSA); RFC 8391 (XMSS); SPHINCS+.