Build on XChain

Write your app once, against one API, and it runs on every chain XChain supports: Bitcoin, Litecoin, and Dogecoin today, each chain added under the protocol tomorrow. Behind that API sit a sandboxed contract VM, a staked validator network, a versioned command set for every operation the protocol supports, and an SDK that turns all of it into a few function calls. You do not run a new chain, you do not trust a bridge, and you never write per-chain code.

Smart contracts

A virtual machine that can't drain your funds

XChain runs a real, sandboxed JavaScript VM on the base chain itself: deterministic, reorg-safe, and with a safety model fundamentally different from the EVM.

Orchestration, not mutation

Contracts can't touch the ledger directly

On most platforms the contract is the protocol: it reads and writes state directly, so a single bug can mint tokens or drain balances. XChain separates the two. A contract can't credit a balance or move a token; it emits the platform's own validated ACTIONs (SEND, MINT, ORDER, DISPENSER…), and the same battle-tested handlers that check every user transaction also bound every contract.

The payoff: a contract bug can fail; it can't break the protocol, drain the ledger, or mint from thin air. The audit surface stays small, and an improvement to any handler benefits every contract automatically.

EVM-style model

The contract writes state directly, so a bug can mint, corrupt, or drain.

The XChain model

The contract emits validated ACTIONs, so the protocol's rules always hold.

Deterministic by design

Exact decimal math, never floating point, so balances can't drift or round wrong, even at 18 decimals. Sandboxed V8 isolates strip every non-deterministic API and gas metering bounds each run, so every node replays to the identical result and state is reorg-safe.

A rich gateway

Read balances, token info, oracle prices, and cross-chain attestations; keep persistent key-value state; emit 19 action types; and do exact math up to sqrt, pow, and log.

Reach the outside world

Ask an HTTPS endpoint or an AI model a question and get a validator-verified answer back through an async callback, powered by the validator network below.

Stakeable & slashable

Any contract can declare itself stakeable: lock any token, on any supported chain, against it, and let its code decide what that unlocks, with a cooldown and slash rule fixed at deploy time and never changeable.

Smart contracts → Token rules & royalties → The VM component →

Decentralized infrastructure

A validator network for prices, cross-chain trades & governance

XChain is more than an indexer. A network of staked validators runs a decentralized oracle, attests cross-chain trades, and governs the protocol, coordinating over PBFT consensus and signed peer-to-peer gossip, while never taking custody of your funds.

Decentralized price oracle

Validators pull prices from multiple sources, aggregate by trimmed median (top/bottom 15% discarded), and finalize each round through PBFT consensus, so network fees and fiat-priced tokens, dispensers, and orders all use one manipulation-resistant rate.

Cross-chain attestation

Before any cross-chain trade settles, validators that support both chains reach consensus that the source action is real and confirmed: 6 confirmations on Bitcoin, 12 on Litecoin, 60 on Dogecoin.

Capability staking

Validators stake to auto-qualify for four independent capabilities (price, cross-chain, oracle publishing, and attestation), earning rewards for honest work and risking slashing for misbehavior.

Off-chain governance

Protocol parameters change only through a transparent validator governance process: a 7-day voting period with 2/3 approval and quorum. No single party has unilateral control. Token holders get their own on-chain say too, through the VOTE action.

The validator network → State checkpoints → The hub component →

The 36 ACTIONs

Every operation on XChain, from issuing a token to running a contract, is one of 36 versioned commands embedded in a transaction.

Betting 1

Outside-world data 2

Governance 1

Data & communication 3

Configuration 4

Validators & consensus 3

Browse every ACTION → Full ACTION reference (docs)

Architecture

A complete platform, not a token standard

Thirteen independent open-source components turn the chains you run into a programmable token economy, with every layer auditable and replaceable, each with its own page.

Core pipeline

Reads blocks, validates ACTIONs, maintains token & contract state, and serves 50+ REST / JSON-RPC endpoints.

Transaction creation

Builds PSBTs, tracks UTXOs, and exposes builders for most ACTIONs plus 100+ queries through the developer SDK.

Coordination & execution

The validator network (oracle, attestation, SWAPs, governance) and the sandboxed smart-contract engine.

Replication, client & tooling

Trust-minimized replication, the reference wallet, one-command deployment, and the full regtest test stack.

Explore all 13 components →

Quality

Tested like it holds money

XChain handles real value, so it's verified like it. Over 31,000+ automated tests across 13 disciplines (unit, integration, end-to-end, fuzz, security, chaos, mutation, determinism, and more) guard every component that touches token data.

See the testing strategy → Full reference (docs)

Where to go next

Pick your entry point

Three readers land here: people writing an integration, people evaluating the protocol, and people who want to run it. Start where you actually are.