QRDXDocs

Exchange operations

Every operation an exchange transaction can carry, its parameters, who may send it, and its gas.

An exchange transaction's op_type is the number or the name. Amounts, sizes and prices are decimal strings with at most 18 decimal places. Every operation is all-or-nothing: one that cannot execute is refused whole, changes nothing, and still pays its gas. Exchange transactions explains the envelope and signing.

Fee = gas × gas_price (at least 1 gwei = 10⁻⁹ QRDX per gas), paid in QRDX and burned. At the minimum price, 40,000 gas costs 0.00004 QRDX.

Operations 56–83 and the free trading lane

They arrive with qrdx-node's 2026-10 release, from a fresh genesis. A node without them refuses them as an unknown operation type; perp_getFeeSchedule answering is a quick check that a node has them. On such a node the exchange's gas floor is 0.1 gwei, and a trading operation (an order, cancel, modify, trigger, TWAP, swap, leverage change, or a batch only of those) sent with gas_price 0 pays nothing while the account has free actions: exchange_getFreeActions(address) says whether its next one would go free, and why not.

Spot

Op#ParamsGas
CREATE_POOL1token0, token1, fee_tier (100 | 500 | 3000 | 10000), pool_type (STANDARD | SUBSIDIZED), initial_price (token1 per token0 of the sorted pair), stake_amount (QRDX)150,000
ADD_LIQUIDITY2pool_id (or token0 + token1 [+ fee_tier]), tick_lower, tick_upper (multiples of the tick spacing), amount (the liquidity L)90,000
REMOVE_LIQUIDITY3pool_id, position_id, amount? (L; default all, 0 collects fees only). Owner only60,000
SWAP4token_in, token_out, amount_in, min_amount_out, deadline? (block time), venue? (auto | amm | clob), pool_id?. Or path ([A, B, C, …], up to 4 hops) in place of token_in / token_out: each hop spends what the one before bought, and the whole swap is undone short of min_amount_out65,000 a hop, + 10,000 per resting order visited
PLACE_ORDER5pair (tokenA:tokenB, either order), side (buy | sell), order_type (limit | market; stop_loss | take_profit | oco, below), price, amount (base); tif? (gtc | ioc | fok | alo), hidden?, display_size? (an iceberg), and for a buy tp? / sl? ({trigger_price, price?})40,000
PLACE_ORDER (trigger)5order_type stop_loss | take_profit | oco, trigger_price, amount, price? (its limit; none: a market order at most 10 % through), an oco's tp_price, tp_limit?. Judged on the pair's last order-book trade; escrowed when placed40,000 + max_makers? (default 20) × 10,000
CANCEL_ORDER6order_id, pair (a spot trigger's too: its escrow comes back)25,000
MODIFY_ORDER59pair, order_id, amount (what should be left), price. A smaller amount at the same price keeps the order's place40,000 + matching
CANCEL_ALL57scope? (all | spot | perps), market?: every resting order, trigger and TWAP of the sender in scope20,000 + 5,000 each
BATCH60actions: 1–20 {op, params} of PLACE_ORDER, CANCEL_ORDER, MODIFY_ORDER, SWAP, PERP_DEPOSIT, PERP_WITHDRAW, PERP_SET_LEVERAGE, PERP_ORDER, PERP_CANCEL, PERP_TRIGGER, PERP_MODIFY, CANCEL_ALL, TWAP_ORDER, TWAP_CANCEL, run in order, all or nothing10,000 + each action's
TWAP_ORDER61duration (60 s – 24 h), slices? (default one every 30 s, at most 60), max_slippage? (default 3 %), max_makers? (per slice, default 5); perps: market_id, side, size, reduce_only?; spot: token_in, token_out, amount_in (escrowed)40,000 + slices × (10,000 + makers × 10,000), paid when placed
TWAP_CANCEL62twap_id (a spot TWAP's unspent escrow comes back)25,000
REMOVE_POOL17pool_id. The creator, once no position remains; refunds the stake60,000

Native QRDX is named QRDX (any casing) in place of a token address.

Perpetuals

Op#ParamsGas
CREATE_MARKET12base_token (e.g. BTC), max_leverage? (default 20)100,000
PERP_DEPOSIT18amount: collateral from the wallet into the clearinghouse40,000
PERP_WITHDRAW19amount: at most withdrawable40,000
PERP_SET_LEVERAGE20market_id, leverage, mode (cross | isolated)20,000
PERP_ORDER21market_id, side, size, price, reduce_only?, tif? (gtc default | ioc | fok | alo), hidden?, display_size?, tp? / sl? ({trigger_price, limit_price?, max_makers?}: reduce-only triggers sized to the order, the first to fire cancelling the other)60,000 (+ each attached trigger's)
PERP_CANCEL22market_id, order_id (a trigger's too)25,000
PERP_TRIGGER56market_id, side, kind (sl | tp), trigger_price (on the mark), size or position: true (the whole position, whatever it is when it fires), limit_price?, reduce_only?, max_makers? (1–100, default 20)40,000 + max_makers × 10,000
PERP_MODIFY58market_id, order_id, size (what should be left), price; for a trigger trigger_price, limit_price, size60,000 + matching
PERP_ISOLATED_MARGIN76market_id, amount (negative takes margin back, keeping the initial margin)30,000
SCHEDULE_CANCEL77time (block time, at least 5 s ahead): cancel every order, trigger and TWAP then; no time clears it20,000
VAULT_DEPOSIT23amount: free collateral into the backstop vault, for shares40,000
VAULT_WITHDRAW24shares, after the lockup40,000
ORACLE_VOTE25prices ({"BTC": "65000.5", …}). Validators only30,000

An order's id is the first 16 characters of its transaction hash; the receipt returns it too.

On nodes from the 2026-10 release a market has an order grid (sz_decimals in perp_getMarket): sizes in whole lots of 10^-sz_decimals, and prices of at most 5 significant figures and 6 − sz_decimals decimals (an integer always fits). An order, trigger or modify off the grid is refused. A buy stop and a sell take-profit fire as the mark rises to the trigger; a sell stop and a buy take-profit as it falls. Validator-priced markets are listed by governance (list_market); CREATE_MARKET lists a bonded deployer's dex:ASSET market, with at least 10,000 of liquidity for its book.

Native tokens

Op#ParamsWhoGas
TOKEN_DEPLOY13name, symbol, decimals (18), total_supply (0), max_supply?, mint_authority?, freeze_authority?, and extension parametersanyone120,000
TOKEN_TRANSFER14token_address, to, amount, memo? (≤ 256 bytes)any holder40,000
TOKEN_MINT26token_address, amount, to?the mint authority40,000
TOKEN_BURN27token_address, amount, from?a holder; another's: its operator or the permanent delegate30,000
TOKEN_APPROVE28token_address, spender, amount (0 revokes)any holder25,000
TOKEN_TRANSFER_FROM29token_address, from, to, amount, memo?a spender, an operator, or the permanent delegate45,000
TOKEN_SET_AUTHORITY30token_address, authority (mint | freeze | metadata | fee | withdraw | pause | permanent_delegate), new_authority (empty renounces)the current authority25,000
TOKEN_FREEZE / TOKEN_THAW31 / 32token_address, accountthe freeze authority25,000
TOKEN_UPDATE_METADATA33token_address, name?, symbol?, uri?, fields?the metadata authority30,000
TOKEN_SET_TRANSFER_FEE34token_address, transfer_fee_bps, max_transfer_fee? (applies 100 blocks later)the fee authority25,000
TOKEN_WITHDRAW_FEES35token_address, to?the withdraw authority40,000
TOKEN_PAUSE / TOKEN_RESUME36 / 37token_addressthe pause authority25,000
TOKEN_AUTHORIZE_OPERATOR / TOKEN_REVOKE_OPERATOR38 / 39token_address, operatorany holder25,000

NFTs

Op#ParamsWhoGas
NFT_CREATE_COLLECTION40name, symbol, uri, max_supply?, royalty_bps?, royalty_recipient?, update_authority?, mint_authority?, non_transferable?anyone120,000
NFT_MINT41collection, to?, uri?, name?, token_id?the mint authority60,000
NFT_TRANSFER42collection, token_id, to, from?, memo?the owner, its approved account or operator35,000
NFT_BURN43collection, token_idthe same25,000
NFT_APPROVE44collection, token_id, spender (empty clears)the owner or its operator25,000
NFT_SET_APPROVAL_FOR_ALL45collection, operator, approved?any owner25,000
NFT_UPDATE46collection, token_id?, name?, symbol?, uri?, royalty_bps?, royalty_recipient?the update authority30,000
NFT_SET_AUTHORITY47collection, authority (update | mint), new_authoritythe current authority25,000

Staking

Op#ParamsWhoGas
STAKE_DEPOSIT15stake_amount (at least 100,000 QRDX, debited from the sender), validator_public_key (ML-DSA-65, hex)the validator's account150,000
STAKE_EXIT16— : the sender's validator starts exitinga validator80,000
STAKE_DELEGATE53validator, amount (QRDX, at least 1; joins the pool after the warm-up)anyone60,000
STAKE_UNDELEGATE54validator, shares (or "all", which also refunds what is warming up)a delegator40,000
STAKE_SET_COMMISSION55commission_bps (0–10,000; from the next epoch)a validator25,000

From the 2026-10 release a validator stakes at least 1,000 QRDX and a delegation is at least 0.01 QRDX.

Consensus explains the validator lifecycle and delegation pools; Staking and delegation walks through delegating.

Governance

Op#ParamsWhoGas
GOV_PROPOSE48action (system_spend | freeze_master | approve_fork), memo? (≤ 280 characters); system_spend: wallet, to, amount; approve_fork: fork, height, definition_hasha committee validator100,000
GOV_VOTE49proposal_id, support (true | false)a validator in the proposal's snapshot30,000
GOV_VETO50proposal_id, amount (QRDX locked until the proposal resolves)anyone, during the timelock50,000
GOV_EXECUTE51proposal_idanyone, after the timelock80,000

Governance explains the lifecycle.

Bridge

Op#ParamsWhoGas
BRIDGE_WITHDRAW52token_address (a bridged token), amount, to (the recipient on the source chain, 0x…)any holder60,000

Deposits are not an operation: validators attest them in their ORACLE_VOTEs. Bridge explains both directions.

Acting for an account

Op#ParamsWhoGas
AGENT_APPROVE63agent (a 0xPQ key), valid_until? (block time; 0: until revoked), name?, max_notional_per_day?. The agent may sign trading operations, never withdrawals or transfersthe account30,000
AGENT_REVOKE64agentthe account or the agent20,000
SUBACCOUNT_CREATE65name?: a 0xSUBA… account the master signs foranyone50,000
SUBACCOUNT_TRANSFER66subaccount, asset, amount, direction (to_sub | from_sub)the master40,000
VAULT_CREATE67amount (at least 100), profit_share? (default 10 %, at most 50 %), name: a copy-trading vault the leader tradesanyone100,000
REFERRAL_REGISTER / REFERRAL_JOIN68 / 69code (3–16 of a-z, 0-9, _)anyone (join once, before 10,000 of volume)30,000
APPROVE_BUILDER_FEE78builder, max_fee_rate (0 revokes; at most 0.1 % perps, 1 % spot)the account25,000
ACCOUNT_POLICY70action: add_controller / remove_controller (controller), own_key (enabled), delay (seconds), guardians (guardians, threshold, recovery_delay), cancel (change_id). Signed by the own key, a change waits out the delaythe account or a controller (as signer)40,000
ACCOUNT_RECOVER75account, new_controller ("" withdraws the backing)a guardian40,000

A transaction signed by someone other than its sender (an agent, a controller, a sub-account's master, a vault's leader) carries signer, which is appended to the signed bytes as \x00signer:<address>, and takes its nonce from the sender|signer lane (exchange_getNonce(address, signer)).

Names (QNS)

Op#ParamsWhoGas
QNS_REGISTER71name (label.qrdx, 3–59 of a-z, 0-9, -), years? (1–10), target? (default the sender)anyone80,000 + the price
QNS_RENEW72name, yearsanyone40,000 + the price
QNS_SET_RECORD73name, key (address or a text record), valuethe name's owner30,000
QNS_SET_PRIMARY74name ("" clears): the sender's reverse recordanyone25,000

A year costs 0.0125 QRDX for 5 or more characters, 32× that for 4 and 128× for 3 (qns_price(years)), paid to the treasury. A name is a native NFT; qns_resolve, qns_reverse, qns_getName and qns_namesOf read them.

Deployer markets and tickers

Op#ParamsWhoGas
DEPLOYER_BOND79amount, dex (the first bond names the namespace: 1–8 lowercase letters and digits)anyone40,000
DEPLOYER_UNBOND80amount, or claim: true 14 days latera deployer (keeping 1,250 QRDX while it runs markets)40,000
DEPLOYER_SET_ORACLE81market_id, pricethe market's deployer (or its agent)25,000
DEPLOYER_HALT82market_id: settles it for good at its oracle pricethe market's deployer200,000 + settling
TICKER_CLAIM83token_address, max_price?: the token's symbol as its unique ticker, at the Dutch auction's price (250 QRDX falling to 25), burnedthe token's creator50,000

Retired

Operations 7–10 (OPEN_POSITION, CLOSE_POSITION, PARTIAL_CLOSE, ADD_MARGIN) belonged to an earlier perpetuals engine and are refused; use PERP_*. Operation 11, UPDATE_ORACLE, sets an oracle price from a configured reporter on development networks only; public networks configure none, and prices come from validators' ORACLE_VOTEs.

On this page