Skip to content
Testnet featureTestnet: yesMainnet: Not availableSoftware: Core bad4a06ea · protocol pqwerai-v8-testnet/1Updated

QAI: post-quantum testnet token

Testnet only, valueless

tQAI (the testnet QAI token; on-chain symbol tQAI) and tEUR are valueless test assets on testnet 20778. tQAI is not money, not a stablecoin and cannot be redeemed for real euros; it is not offered for sale. Nothing in this guide promises a price, a minimum price or a return.

Economy under redesign (CR-0136)

PQWERAI is removing its own euro token. The tEUR bonding curve and the paused 120% reserve stack below stay on chain as legacy test contracts and behave exactly as coded, but they are no longer the target design. Euro and dollar value is planned to come only from external, issuer-authorized stablecoins (USDC, EURC) through a bridge, which is not implemented yet. The new QAI model has not been decided. The post-quantum accounts, keys and recovery described here are unaffected.

Contracts on testnet 20778

Contract Address
QAI bonding curve (legacy test contract; buys paused since block 5,112, tx 0x6991c8a2…cea2; sells stay open) 0xb56aD500C2750D7cDc434e70fA73e39090353fd1
Curve QAI token (tQAI, 6 decimals; legacy) 0x52C2839432783637C563322C7D4cb34EBADfB6c3
tEUR test euro (tEUR, 18 decimals, faucet; legacy) 0x7D7409F65e2C0286D2C7705A714941A6fc4768Fc
120% stack QAI token (legacy, minting paused) 0x520AA82aec3a82dF8C9D3F5aFa940245B6E0115B
QuantumAccountRegistry 0x5719E5c0f0D42efa6F14DD3eDF289cFb219d0421
ML-DSA-65 / SLH-DSA-192s verifiers 0xdA4182Fa0a69a57573a03DD5db924533C0589139 / 0x8779Fd4Cd289a652837dd2c4ad052b6DFD9d1d6D
QuantumReserve (tPQAI treasury, pinned in genesis) 0xcebDE02DF19270F4E56423607806AAeC6561A945

Addresses come from the 20778 deployment record. Public JSON-RPC: https://rpc-testnet.pqwerai.com.

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 tPQAI 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 tPQAI 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 DESTROY overwrites 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

  1. Create: qai-wallet create -chain chain.json -op op.json … -recovery rec.json … prints your account ID and the arguments for QuantumAccountRegistry.createAccount. Both keys prove possession by signing the creation message.
  2. Transfer: qai-wallet transfer … -to <account> -amount <base units> -nonce <n> -key-version <v> prints the arguments for QAIToken.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.
  3. 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 for QAIBondingCurve.sell. Any relayer can submit them; the tEUR goes to the -pay-to address 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 tQAI at zero supply, +0.10 tEUR for every 1,000,000 tQAI in circulation: base(s) = 1e12·s + s²/20 tEUR wei, s in 6-decimal units
Floor multiplier k starts at 1.0 (1e18); the code never lowers it (contract behaviour, not a price promise)
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 contract quotes sells from k; floorPrice() returns k × 1 tEUR, the quote at zero supply. This describes how the legacy test contract computes its quotes. It is not a price, a floor or a redemption promise: tQAI and tEUR have no monetary value, buys on this curve are paused since block 5,112, and the QAI economy is being redesigned.

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    # legacy tEUR on 20778
CURVE=0xb56aD500C2750D7cDc434e70fA73e39090353fd1   # legacy curve on 20778; buys paused since block 5,112, so buy() is refused
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 tQAI
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                           # k × base price at zero supply, tEUR wei (as computed by the contract)

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). On chain 20778 it was deployed on 27 November 2026 as a legacy test contract with minting paused; the economy is under redesign.

Costs

Action Gas
Create account (ML-DSA and SLH-DSA proofs of possession) ~691 000 (measured before the chain 20778 launch)
Transfer (relayed, with fee) ~204 000 (local fixture)
Buy on the curve ~200 000 (measured before the chain 20778 launch)
Sell to the curve (ML-DSA-65 signed) ~229 000 (measured before the chain 20778 launch)
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-20778+83ff5b69f0