Track 3 · Programmable1 of 4
Smart contracts
Programmable rules in JavaScript that can even ask AI and the web for verified answers.
XChain has a built-in virtual machine that brings smart contracts to the base chain itself, with a safety model deliberately different from platforms like Ethereum.
Contracts orchestrate; they don't mutate
Contracts are written in JavaScript and run in a sandbox. Crucially, a contract can't touch the ledger directly: it emits the same validated commands a user would. So even a buggy contract can never mint tokens out of thin air or drain balances; it can only do what the protocol already allows.
Deterministic, metered, reorg-safe
The same software that processes token transfers runs contract code, so there are no separate validators. Execution is metered by gas (a read costs ~100, a write ~200, emitting an action ~500, capped at 1,000,000 per run) to rule out runaway loops. And if the chain reorganizes, contract state rolls back automatically.
Four verbs
DEPLOY publishes a contract, EXECUTE calls a method on it, and DEPOSIT / WITHDRAW move tokens in and out of its custody: the building blocks for escrow, vesting, liquidity pools, and more.
Reaching the real world: AI and the web
A contract can ask a question (fetch an HTTPS URL, or prompt a governance-approved AI model) and get a consensus-verified answer written back on-chain. Each validator looks it up independently, the network agrees on the result, and a callback resumes the contract. That makes it practical to judge contests, settle prediction markets from official sources, or moderate content.
What it deliberately isn't
This is orchestration logic, not an Ethereum-style "world computer." Contracts can call other contracts (even contracts on another chain), but they do it by emitting a new action that runs on its own, not by a synchronous call that returns a value mid-run, and a contract never observes its own effects until they settle. That keeps the audit surface small and every state change uniform: a trade made on purpose for safety.