Skip to content

Escrow & Settlement

Payments on VirtEngine are usage-driven: tenants fund an escrow account up front, but money only moves to providers after signed usage records survive a dispute window and settle on-chain.

Tenant x/escrow x/settlement Provider 1 · deposit funds into escrow account 2 · signed usage record 24 h dispute window tenant may dispute; corrections create referenced new records 3 · settle undisputed usage 4 · provider paid in VCC full agreed amount 5 · payout to provider (payment − take)
The settlement sequence. Funds rest in escrow until usage is reported, the dispute window passes, and x/settlement authorizes transfer of the agreed amount in full in VCC.

When a tenant creates a deployment, they deposit funds into an escrow account managed by x/escrow. The escrow account:

  • backs every lease formed under the deployment,
  • is drawn down only by settled usage, and
  • can be topped up at any time; when it empties, the lease closes.

This protects both sides: providers know funded capacity is real, and tenants never grant a provider direct pull access to their wallet.

The provider daemon runs a settlement pipeline that connects metered usage to on-chain billing. Its cadence is configurable; the defaults are:

SettingDefaultMeaning
settlement_interval1 hourHow often pending usage is processed into settlements
dispute_window24 hoursTime tenants have to dispute a usage record
reconciliation_interval6 hoursCross-validation against platform metrics
max_pending_records100Backlog size that triggers early settlement

Usage records are submitted on-chain in signed batches (MsgRecordUsage), then settled by x/settlement into billable line items once the dispute window has elapsed and no dispute is open.

A tenant who believes a record is wrong can dispute it inside the window.

Dispute lifecycle: Created → Pending → Reviewing → Resolved / Rejected / Expired. Key guarantees:

  • usage cannot be settled while a dispute on it is open;
  • accepted disputes produce corrections — new usage records that reference the original rather than silently rewriting history;
  • dispute evidence is immutable once recorded.

Settled usage is cross-checked against independent platform metrics (the reconciler compares provider container/volume/GPU metrics with platform-side component usage). Discrepancies escalate by size:

DifferenceSeverityAction
0–5%LowLog only
5–10%MediumAlert generated
10–25%HighAlert + review
>25%CriticalSettlement blocked

At payout, x/escrow transfers the full agreed lease amount to the provider in VCC. There is no settlement take-rate or platform deduction. Network transaction fees apply separately to on-chain messages. The issuance model is covered in Settlement & BME.

Neither forcing a settlement nor listing disputed escrows is available from the CLI today. virtengine query escrow is the reachable group (accounts, payments).