---
title: "Renting a machine by the second: how compute leasing works"
description: "A lease, an accept, a settle. Three blocks on the lattice take a VM from request to teardown, with the provider's own money at stake the whole time."
url: https://xe.marketized.io/blog/renting-a-machine-by-the-second
published: 2026-08-27
topics: ["Compute", "Protocol"]
authors: ["XE Protocol"]
---

# Renting a machine by the second: how compute leasing works

_August 27, 2026 · 2 min read_

A lease, an accept, a settle. Three blocks on the lattice take a VM from request to teardown, with the provider's own money at stake the whole time.

On XE, a **consumer** leases a virtual machine directly from a **provider**. There's no platform in the middle: every step of the lease is a block on the lattice, so both sides share a verifiable record of what happened.

## Three blocks

1. The consumer writes a **lease** block on their chain, paying the cost in XUSD.
2. The provider writes a **lease_accept** block, staking XUSD as collateral, with timekeeper attestations for the start time. The VM is provisioned before the accept is committed; if provisioning fails, the lease is never accepted.
3. When the lease runs out, the provider writes **lease_settle**, recovers its stake, and earns XE emission. The VM is torn down.

## What each side puts in

- **Consumer:** pays the lease cost in XUSD, and gets vCPUs, memory and disk.
- **Provider:** stakes XUSD (a fifth of the cost, minimum 1), locked until settlement, and earns XE when it settles.

A lease names exactly what it needs:

```json
{
  "vcpus": 4,
  "memory_mb": 8192,
  "disk_gb": 80
}
```

## Getting in

Consumers reach their VM over SSH through a gateway that relays the connection end to end, so the gateway never sees inside the session. Each wallet has its own SSH key, so one wallet can't reach another's machines.

```bash
xe providers          # who has capacity
xe lease --vcpus 4 --memory 8192 --disk 80 --duration 3600
xe ssh <lease-hash>
```

> **Note:** Timestamps on accept and settle come from timekeeper attestations, never from the provider itself. That's what makes billing by the second trustworthy.

The full lifecycle, including failure cases, is in the [compute docs](https://xe.marketized.io/docs/compute).
