XOD — exchange integration guide
Short version: credit only final blocks, verify instead of trusting, withdrawal keys stay with the exchange.
Source of truth: the rule book (XIP-8) and node/src/api.rs. Full path list: /dev/api.html, /static/api/openapi.yaml.
1. Asset facts
| field | value |
|---|---|
| name / ticker | XOD / XOD |
| type | native layer-1 coin of xod-mainnet |
| decimals | 8 (amounts in the API are micro-XOD: 1 XOD = 100 000 000) |
| max supply | 1 000 000 000 XOD; premine 100 000 000 XOD (10 %: sale 9 %, team 1 %); block reward 20 XOD (1 % to the team) |
| consensus | RandomX proof of work (CPU) + AMV finality seal (⅔+1, BFT) |
| signatures | every transfer and block: Ed25519 + ML-DSA-65 (FIPS 204), both halves required |
| block time | ~15 s; transfers per block ≤ 8 192; transfer ≤ 64 KiB |
| fee | ≥ 0.0001 XOD per transfer, burned (the receiver gets the full amount) |
| networks | mainnet only — there is no public test network; integrate with small amounts on mainnet |
| wXOD (bridge) | SPL token on Solana; XOD sent to the bridge is real. Whether the bridge is open on the current network and the only valid contract addresses — /dev/agents/bridge.md |
| explorer | /explorer |
| whitepaper | /whitepaper/ |
| source code, audit | not public yet / no external audit yet — published by the team when ready |
2. Connecting
- Site API (convenient):
https://<node IP>/…(any node; the list — /entry). - Nodes directly (recommended for exchanges): TLS 1.3 only, key exchange
X25519MLKEM768, self-signed certificate with
a pinned SPKI from the node list; a wrong pin — refuse. An exchange node package (signed 2 of 3 by the team keys)
is provided on request.
- Read from at least two nodes and compare the hash of the final block at the same height. A mismatch — stop
deposits and withdrawals and contact the team.
- Errors: HTTP 4xx/5xx with
{"error": "CODE", "detail": "…"};503— busy, retry.
3. When a transfer is final
- A block is final when its height ≤
finalized_height(GET /finality): the AMV seal ⅔+1 twice in a row. Usually
2–3 blocks after inclusion (~30–60 s). With the open AMV (a later era) finality becomes checkpoint-based, ~16 min;
finalized_height stays the one number to watch.
- Finality is never rolled back: two final blocks on different branches stop the node itself (
FINALITY_CONFLICT). - Stop signals:
update_requirednot empty,finality_laggrowing, differentfinalizedon two nodes.
4. Deposits
- Give every customer their own ordinary address
x01…(62 characters, lowercase), created by the exchange wallet. - Scanner: for
hfrom the last processed + 1 tofinalized_height:GET /block/<h>/txs; creditamount_microof every transfer whosetois yours. Key: the transferid(never credit twice). Store "processed up to h" and the block hash. - Trust-minimised check: the block hash matches on two nodes; the summary matches the block bytes (
raw); optionally the balance viaGET /account/<address>with its SMT proof to the finalstate_root. - A new account is created only by an incoming transfer ≥ 1 XOD; tell customers "minimum first deposit 1 XOD".
5. Withdrawals
- Withdrawal keys live on the exchange machine; the node gets only a signed transfer.
nonce = account.nonce + mempool.pending + 1(≤ 64 pending per account).- Transfer JSON:
wire_version 3,chain_id "xod-mainnet",genesis_hash,fee_micro ≥ 10000,priority_fee_micro ≤ 50000,expiry_height ≤ height + 1440, Ed25519 + ML-DSA-65 signature. The first transfer of an account carries the keys. POST /tx→id; the same transfer again gives the sameid(no double spend).- Wait for
GET /tx/<id>=final;dropped+code— not included; afterexpiry_heightsign a new one. - Ready tool: the
xodCLI (xod wallet send,xod wallet tx <id>), signed 2 of 3, self-checking.
6. Address kinds
| prefix | what | for exchanges |
|---|---|---|
x01 | ordinary account | deposit addresses — only these |
x0t1 | one-time address (era 1) | never a deposit address (receives once); withdrawing to it is fine |
x0c1 | Photon 0 channel account (era 1) | never a recipient |
x0n1 | node id | not a money address |
7. Security contact
Vulnerabilities: see SECURITY.md in the release (acknowledgement within 72 h). Do not send keys or passwords to anyone —
the team never asks for them.
exchanges.md · API · llms.txt
8. Your own node, turnkey
The exchange runs its own node; the team never holds the exchange keys. One script — xod-cage (Ubuntu 22.04/24.04):
xod-cage --apply— the cage: userxod, systemd hardening, firewall only for the node ports, SSH untouched.xod-cage --keygen <dir>— node keys are created on the server (/var/lib/xod/security, 0700/0600); only the public part leaves (host_public.json).xod-cage --write-config—node.toml(no reward address — mining off; the admin port stays on loopback).xod-cage --install <dir>— the node binary: installed only if the release is signed 2 of 3 by the team keys, not older than the installed one, and the node's own--check-configmatches the pinned genesis and keys.xod-cage --network— the node sees ≥ 2 peers, the pinned genesis and a growing finality.xod-cage --check— any time, changes nothing.
Machine: 4 cores, 8 GB RAM, SSD, a public IP (P2P port open). Updates: the next signed release, same --install.
9. Verify, do not trust
- Every answer of a node is a hint. The light client checks the header chain and the ⅔+1 AMV seal itself (
/headers,/finality,/epochs) and an account by its SMT proof to the finalstate_root(/account/<address>→proof). - Release check by yourself:
xod_release_tool verify-published <release dir>— the same 2-of-3 check the cage does. - Post-quantum channel to the same API:
wss://(XOD-WIRE-1, open package/wire xodwire).
10. wXOD on Solana
- XOD (this chain) and wXOD (an SPL token on Solana) are different assets: list the one you actually hold. wXOD is backed by XOD locked in the network and minted only against XOD locked in the bridge reserve (1 : 1).
- Bridge status and the only valid addresses: /dev/agents/bridge.md. The Solana bridge opens after checks and an audit; the Ethereum bridge of the previous chain is closed. The way back wXOD → XOD (burn on the bridge) is on from block 1 (genesis rule 1).
- The daily mint limit is shared by all networks; the bridge can be paused by the team multisig.
11. Network changes (eras)
- Rules change only by an era record (team 2 of 3 + 90 % of miners) with a height
not_before; nodes announce it in/status(update_required, era warnings) long before the height. Watch/statusand the release list. - Coming eras: open AMV (miners join the finality council), subnets, hash-time locks (HTLC). None of them changes addresses, transfers or deposits;
finalized_heightstays the one number to watch.
12. Listing checklist
- Own node (§8) + a second source for the final hash (§2).
- Deposit scanner by
finalized_height, key = transferid(§4). - Minimum first deposit 1 XOD shown to customers (§4).
- Withdrawals signed on the exchange machine,
noncerule, wait forfinal(§5). - Only
x01…deposit addresses (§6); checksum checked on input. - Refusal codes handled (
/dev/api.html);503— retry. - Stop signals wired: different
finalizedon two nodes,finality_laggrowing,update_required(§3, §11). - Sandbox run with 2–10 XOD on mainnet (
/dev/sandbox.html). - XOD vs wXOD decided (§10).
- Security contact saved (§7).