Module reference · Marketplace & workloads
x/market — Market
The order, bid, and lease state machine at the center of the marketplace.
What it does
Inside x/market
The market module implements the exchange itself. Tenants post orders describing the resources they need; provider daemons watching the chain place competing bids against open orders; and a matched bid becomes a lease — the on-chain contract under which a provider serves a workload and gets paid. All three objects are chain state, created and transitioned by transactions and validated by consensus.
The module enforces the lifecycle rules: an order can only be matched while open, a bid must satisfy the order's resource and attribute requirements, and a lease binds exactly one tenant, one provider, and one escrow account. Lease closure — voluntary, for non-payment, or through enforcement — flows back through the same state machine so every marketplace event leaves an auditable record.
Why it exists
The design rationale
In a conventional cloud, the exchange between buyer and seller happens inside a company's private billing system. VirtEngine's premise is that the exchange should be the protocol: matching, pricing, and contract state executed by consensus rather than by a trusted intermediary. The market module is where that premise is implemented.
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/deployment
Orders are derived from tenant deployment specifications and groups.
- x/escrow
Every lease is backed by an escrow account funded before the workload starts.
- x/provider
Bids reference registered providers and their on-chain attributes.
- x/veid
Marketplace participation is identity-gated by VEID trust scores.
- x/settlement
Usage recorded against a lease settles into payments from lease escrow.
Key concepts
Terms that matter here
- Order
- A tenant's on-chain request for resources — compute, memory, storage, region, and required attributes.
- Bid
- A provider's priced offer against an open order, placed automatically by the provider daemon.
- Lease
- The matched contract between tenant and provider that authorizes a workload and its payment stream.
Keep exploring