Module reference · Economics & settlement
x/settlement — Settlement
Converts signed usage records into billable line items and provider payouts.
What it does
Inside x/settlement
The settlement module turns metered usage into money. Provider daemons collect per-workload resource metrics on an hourly cadence, batch them into signed usage records, and submit them on-chain (MsgRecordUsage). The module validates records against their leases and converts them into billable line items priced by the lease terms.
Every reported record sits in a 24-hour dispute window during which either party can raise corrections — anomaly detection on the provider side flags outliers before they ever reach the chain. After the window closes, line items settle against lease escrow and the agreed funds transfer to the provider with no marketplace commission. Reconciliation against platform metrics (default every 6 hours) cross-checks reported usage.
Why it exists
The design rationale
Metering and billing are where cloud customers get hurt and providers get stiffed. Making settlement a consensus function — signed records, public dispute window, automatic escrow release — replaces invoice trust with protocol guarantees for both sides.
Interactions
How it connects to the rest of the chain
No module stands alone — these are the protocol surfaces this module depends on or serves.
- x/escrow
Settled line items draw provider payouts from lease escrow.
- x/take
The zero marketplace-commission policy is applied at payout time.
- x/market
Usage records are validated against the lease they bill.
- x/fraud
Disputed or anomalous usage escalates before settlement completes.
- x/oracle
Price feeds inform fiat-referenced pricing where leases use it.
Key concepts
Terms that matter here
- Usage record
- A signed, per-lease report of metered resource consumption for a collection period.
- Dispute window
- The 24-hour period after reporting during which corrections can be raised.
- Line item
- A priced billing entry derived from a validated usage record.
Keep exploring