Compute Leasing

How XE leases compute capacity to the network

XE enables decentralised compute by letting consumers lease virtual machine resources from providers directly on the block lattice. All lifecycle events -- creation, acceptance, settlement, cancellation and force-settlement -- are recorded as on-chain blocks, giving both parties a verifiable audit trail.

How it works

Consumer                         Provider
   │                                │
   │  1. lease block (XUSD escrow)  │
   │ ─────────────────────────────► │
   │                                │  ← VM provisioned
   │  2. lease_accept (XUSD stake)  │
   │ ◄───────────────────────────── │
   │                                │
   │        ... duration ...        │
   │                                │
   │  3. lease_settle (XE emission) │
   │ ◄───────────────────────────── │  ← VM torn down
   │                                │
  1. The consumer creates a lease block on their chain, debiting XUSD into escrow to pay for resources and naming the provider's performance certificate.
  2. The provider provisions the VM, then creates a lease_accept block on their chain, staking XUSD collateral, obtaining timekeeper attestations for the start time, and locking the emission rate.
  3. After the lease duration expires, the provider creates a lease_settle block, minting XE emission, recovering their stake, and burning the consumer's escrow.

Two blocks exist for the paths where that does not happen:

  • lease_cancel — the consumer withdraws a lease that no provider accepted; the escrow is refunded in full.
  • lease_force_settle — the consumer recovers an accepted lease the provider abandoned. Valid only once expiry + settle grace + force-settle gap has passed (1 h 25 min after expiry on production timing). The escrow is refunded and the provider's stake stays burned.

Roles

Role

Pays

Earns

Collateral

Consumer

XUSD (lease cost, escrowed)

Compute resources (vCPUs, memory, disk)

None

Provider

XUSD (stake = ceil(cost / 5), min 1 µXUSD)

XE emission on settlement

XUSD stake locked until settle

Resources

Leases specify three resource dimensions:

Resource

Field

Unit

Virtual CPUs

vcpus

count

Memory

memory_mb

megabytes

Disk

disk_gb

gigabytes

Amounts are in micro-units: 1 XUSD = 1,000,000 µXUSD. The cost is computed deterministically from these dimensions, the lease duration, and the price multiplier on the provider's certificate. See Cost Model for the formula.

Key properties

  • On-chain lifecycle. Every lease event is a block on the lattice -- creation, acceptance, settlement, cancellation and force-settlement are all verifiable.
  • Timekeeper attestations. Start, settle and force-settle times are attested by a quorum of trusted timekeepers to prevent time manipulation. See Attestations.
  • Escrow. The consumer's XUSD sits in an escrowed pending send from lease creation until it is burned at settlement or refunded on cancel/force-settle. Neither party can spend it in the meantime.
  • Automatic settlement. Nodes run a background settleLoop() that settles expired leases on the provider side and force-settles abandoned ones on the consumer side.
  • Dual-asset flow. Consumers pay in XUSD; providers earn XE. This creates organic demand for both assets.
  • Collateral staking. Providers stake ceil(cost / 5) XUSD, incentivising honest behaviour. The stake is returned on settlement and forfeited on force-settle.
  • Rate lock. The lease names a specific performance certificate, which pins the price multiplier used for the cost; the provider must accept with the same certificate.

VM access

Consumers access their leased VMs via an SSH gateway that tunnels connections through the libp2p network. The consumer's ed25519 public key (access_pub_key) is specified in the lease block and injected into the VM's authorized_keys at provision time. The SSH Gateway & Tunnel Protocol page covers the full architecture.

xe ssh <leaseHash>