Skip to main content

Design Principles

x0 is built on four foundational principles:
  1. Policy-First Security — Every token transfer passes through a transfer hook that enforces agent-specific spending policies. No transfer can bypass the guard.
  2. On-Chain Verifiability — All state transitions (escrow, reputation, proof verification) happen on-chain with deterministic outcomes. Off-chain components only generate proofs.
  3. Minimal Trust Surface — Agents operate with delegated authority bounded by policy. Key compromise cannot exceed the configured daily limit.
  4. Composability — Each program is independently deployable and interacts via CPI (Cross-Program Invocation). Third-party programs can integrate with any layer.

Program Dependency Graph

Inter-Program Communication

Account Model

All program state is stored in Program Derived Addresses (PDAs) — deterministic accounts derived from seed phrases. This ensures:
  • No signing authority — PDAs can only be written to by their owning program
  • Deterministic addressing — Any client can derive the same PDA given the seeds
  • Composability — Other programs can read PDA data without CPI

PDA Seed Patterns

Transaction Flow

A typical agent-to-service payment traverses the following path:
1

Agent discovers service

The agent queries x0-registry for services matching its needs, filtering by capability type and checking x0-reputation scores.
2

Service returns 402

The service endpoint returns HTTP 402 Payment Required with an X-PAYMENT header containing recipient, amount, and a challenge nonce.
3

Agent builds transfer

The SDK constructs a Token-2022 TransferChecked instruction. The transfer hook account (x0-guard) is automatically included.
4

Guard validates policy

The transfer hook fires, loading the agent’s AgentPolicy. It checks: daily limit not exceeded, amount within rolling window budget, recipient passes whitelist, and privacy level matches.
5

Transfer executes

If policy passes, the transfer completes. The protocol fee (0.8%) is withheld via Token-2022’s TransferFee extension.
6

Agent presents proof

The agent sends the transaction signature back to the service as payment proof. The service verifies the on-chain transaction settled.
7

Reputation updated

The escrow or guard program records the outcome (success/failure) to x0-reputation via CPI.

On-Chain Costs

Compute Unit Budget

Last modified on February 8, 2026