Skip to content

Compute Leasing

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

How it works

Consumer                         Provider
   │                                │
   │  1. lease block (XUSD debit)   │
   │ ─────────────────────────────► │
   │                                │
   │  2. lease_accept (XUSD stake)  │
   │ ◄───────────────────────────── │
   │                                │  ← VM provisioned
   │        ... duration ...        │
   │                                │
   │  3. lease_settle (XE emission) │
   │ ◄───────────────────────────── │  ← VM torn down
   │                                │
  1. The consumer creates a lease block on their chain, debiting XUSD to pay for resources.
  2. The provider creates a lease_accept block on their chain, staking XUSD collateral and obtaining timekeeper attestations for the start time.
  3. After the lease duration expires, the provider creates a lease_settle block, earning XE emission as a reward and recovering their stake.

Roles

Role Pays Earns Collateral
Consumer XUSD (lease cost) Compute resources (vCPUs, memory, disk) None
Provider XUSD (stake = cost / 5, min 1) 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

The cost is computed deterministically from these dimensions and the lease duration. See Cost Model for the formula.

Key properties

  • On-chain lifecycle. Every lease event is a block on the lattice -- creation, acceptance, and settlement are all verifiable.
  • Timekeeper attestations. Start and settle times are attested by a quorum of trusted timekeepers to prevent time manipulation. See Attestations.
  • Automatic settlement. Provider nodes run a background settleLoop() that periodically checks for expired leases and settles them automatically.
  • Dual-asset flow. Consumers pay in XUSD; providers earn XE. This creates organic demand for both assets.
  • Collateral staking. Providers stake XUSD equal to 1/5 of the lease cost, incentivising honest behaviour. The stake is returned on settlement.

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 via cloud-init. The SSH Gateway & Tunnel Protocol page covers the full architecture.

ssh -i ~/.ssh/lease_key -p 2222 <leaseHash>@<gateway-host>