QAI: post-quantum testnet token¶
Testnet only, valueless
QAI and tEUR are valueless test assets on testnet 20777. QAI is not money, not a stablecoin and cannot be redeemed for real euros; it is not offered for sale. Since 14 November 2026 QAI is issued only by a bonding curve: you buy it with tEUR, a test euro from a faucet, and you can always sell it back to the same contract. The price can fall when holders sell. A token designed to gain value would need a legal assessment before any real-money use.
Live contracts (testnet 20777)¶
| Contract | Address |
|---|---|
| QAI bonding curve | 0xb56aD500C2750D7cDc434e70fA73e39090353fd1 |
QAI token (tQAI, 6 decimals) |
0x52C2839432783637C563322C7D4cb34EBADfB6c3 |
tEUR test euro (tEUR, 18 decimals, faucet) |
0x7D7409F65e2C0286D2C7705A714941A6fc4768Fc |
| QuantumAccountRegistry | 0x5719E5c0f0D42efa6F14DD3eDF289cFb219d0421 |
| QuantumReserve (PQAI treasury, pinned in genesis) | 0xd374eA7DE49E821689b2Da4688e02F1d063f7940 |
Public JSON-RPC: https://rpc-testnet.pqwerai.com (reads and raw signed transactions; chain ID 20777).
What is different about QAI¶
On most EVM chains a token transfer is authorized by an ECDSA signature: the sender's account signs the transaction. A large enough quantum computer could forge ECDSA signatures.
A QAI balance belongs to a Quantum Smart Account (a 32-byte account ID), not to an 0x… address.
Every action on a balance needs a signature from a standardized post-quantum scheme:
| Key | Algorithm | Used for |
|---|---|---|
| Operational key | ML-DSA-65 (FIPS 204) | transfers, redemption requests, approvals, routine key rotation |
| Recovery key | SLH-DSA-SHAKE-192s (FIPS 205) | replacing a lost or stolen operational key, after a delay |
| Messaging key (optional) | ML-KEM-768 (FIPS 203) | encrypting backups and messages to a recipient |
The transaction that carries a QAI signature is still an ordinary PQWERAI transaction. Anyone can send
it, for example a relayer, and that sender only pays the PQAI gas. Neither the transaction sender nor any
0x… address has authority over QAI. QAI has no approve or transferFrom, and no owner or admin
address.
What is not post-quantum
QAI authorization is post-quantum. The PQWERAI chain as a whole is not: ordinary PQAI
transactions (ECDSA), Smartnode votes (Ed25519) and peer-to-peer transport still use classical
cryptography. See the security and migration report in the repository
(audit/QAI_PQ_SECURITY_AND_MIGRATION_2026-11-12.md).
Keys and the wallet¶
The qai-wallet command-line tool (qai/wallet in the repository) creates and stores your keys:
qai-wallet keygen -kind operational -out op.json -password-file op.pw
qai-wallet keygen -kind recovery -out rec.json -password-file rec.pw
- Each key is stored encrypted: Argon2id (256 MiB) derives a key from your passphrase, and AES-256-GCM encrypts the key file. Passphrases are read only from files, never from command arguments.
- Use different passphrases, and keep the recovery key offline and separate from the operational key. It exists to rescue the account when the operational key is lost.
- Back up the recovery key by sealing it to an ML-KEM-768 key that you keep elsewhere:
qai-wallet seal …/qai-wallet open …. qai-wallet destroy -keystore FILE -confirm DESTROYoverwrites and deletes a key file. If no other copy of that key exists, you cannot undo this.
The wallet builds every message it signs locally, from your inputs plus a pinned chain.json
(chain ID, genesis hash, registry address). It never signs bytes supplied by a node or a relayer, so they
cannot change what you approve.
Using an account¶
- Create:
qai-wallet create -chain chain.json -op op.json … -recovery rec.json …prints your account ID and the arguments forQuantumAccountRegistry.createAccount. Both keys prove possession by signing the creation message. - Transfer:
qai-wallet transfer … -to <account> -amount <base units> -nonce <n> -key-version <v>prints the arguments forQAIToken.transfer. A relayer submits them. If you pay the relayer, the fee and the fee recipient are part of what you sign, so the relayer cannot change them. - Sell back to the curve:
qai-wallet curve-sell … -curve <curve> -amount <base units> -min-out <tEUR wei> -pay-to <0x address> -nonce <n> -key-version <v>prints the arguments forQAIBondingCurve.sell. Any relayer can submit them; the tEUR goes to the-pay-toaddress you signed.
Every signature is bound to the chain ID, the genesis hash, the registry and the contract it is meant for. It carries your account's next nonce and expires after at most 24 hours. A signature cannot be replayed, reused on another chain or contract, or kept for later use.
Recovery¶
If you lose your operational key, qai-wallet recover signs with your recovery key and with a new
operational key. After the account's recovery delay (at least one hour; you choose it
when you create the account), anyone can finalize the change. While a recovery is pending, all
ordinary operations of the account are frozen.
If someone steals your recovery key and starts a recovery, cancel it with your operational key
(qai-wallet cancel-recovery). The account stays frozen for a cooldown period after a cancellation.
Then replace the stolen recovery key: this needs your operational key and the old recovery key.
How QAI is issued: the bonding curve¶
QAI exists only when someone pays for it. The curve contract is the token's only minter.
| Rule | Value |
|---|---|
| Base curve | 1 tEUR per QAI at zero supply, +0.10 tEUR for every 1,000,000 QAI in circulation: base(s) = 1e12·s + s²/20 tEUR wei, s in 6-decimal units |
Floor multiplier k |
starts at 1.0 (1e18); never decreases |
Buy n |
pay ceil(k·(base(s+n) − base(s))) + 0.5% fee |
Sell n |
receive floor(k·(base(s) − base(s−n))) − 0.5% fee |
| After every trade | k = max(k, reserve / base(supply)) |
Every payment and every fee stays in the curve's reserve and creates no QAI, so each trade raises k. The lowest
price QAI can ever trade at from then on is k × 1 tEUR (floorPrice()). Buyers pay the current k, so they never
dilute existing holders, and the reserve always covers k · base(supply), so every holder can sell at any time.
What nobody can do:
- mint without paying: there is no other mint path; the founder holds no QAI and has no special key;
- withdraw: tEUR leaves the curve only when a holder sells; there is no fee pot and no withdrawal function;
- stop sellers: 2-of-3 ML-DSA-65 governors can only pause buys; sells can never be paused, and governors
cannot change the formula,
k, the reserve or anyone's balance.
Get tEUR and buy QAI¶
tEUR is an ordinary ERC-20 test token: any address can claim 1,000 tEUR once per UTC day.
RPC=https://rpc-testnet.pqwerai.com
TEUR=0x7D7409F65e2C0286D2C7705A714941A6fc4768Fc
CURVE=0xb56aD500C2750D7cDc434e70fA73e39090353fd1
cast send $TEUR "faucet()" --rpc-url $RPC --private-key $KEY
cast send $TEUR "approve(address,uint256)" $CURVE 1000000000000000000000 --rpc-url $RPC --private-key $KEY
cast call $CURVE "quoteBuy(uint256)(uint256,uint256)" 1000000 --rpc-url $RPC # cost and fee for 1 QAI
cast send $CURVE "buy(bytes32,uint256,uint256)" $QAI_ACCOUNT_ID 1000000 $MAX_PAY --rpc-url $RPC --private-key $KEY
cast call $CURVE "floorPrice()(uint256)" --rpc-url $RPC # lowest possible price, tEUR wei
The QAI go to a Quantum Smart Account ($QAI_ACCOUNT_ID, created with qai-wallet create), never to the 0x
address that paid. maxPay protects you if the price moves before your transaction is mined.
The 120% reserve stack (paused)¶
Before the curve, QAI was designed to be minted only against attested (simulated) customer euros with 120% coverage
(QuantumMintController, QuantumReserveVault, QuantumRedemptionManager, QuantumBurnController, deployed on
14 November 2026). No QAI was ever minted there. Its minting is paused by a 2-of-3 governor approval; the
contracts stay on chain and governors could resume them.
Costs¶
| Action | Gas |
|---|---|
| Create account (ML-DSA and SLH-DSA proofs of possession) | ~691 000 (live 20777) |
| Transfer (relayed, with fee) | ~204 000 (local fixture) |
| Buy on the curve | ~200 000 (live 20777) |
| Sell to the curve (ML-DSA-65 signed) | ~229 000 (live 20777) |
| Start recovery (SLH-DSA) | ~657 000 (local fixture) |
These figures assume the native pq-verify/v1 precompiles. Without them, verifying ML-DSA in contract
code costs about 21.6 million gas per signature, more than a block can hold.
Found a problem? Report a documentation issue · Build testnet-rc1+7a33c77104