Offers
Provider prices, declarations, and available capacity.
Wallet booking policy
Concurrency counts active bookings. Quota counts successful bookings within a configured time window. Each provider has one global scope and one scope for each signing wallet. Both scopes cover every model and list for that provider. A wallet is a signer, not a person.
ProviderLimits contains global and wallet, each with concurrency, quota, and quota_window_seconds. Concurrency zero disables that scope’s cap. Global zero is stored as the maximum u32. Quota zero disables the rate cap. Each window must be 1–86,400 seconds, including when quota is disabled.
A successful reservation increments global and wallet active bookings and quota usage atomically. Each scope starts its window with its first counted booking. A booking after expiry starts a new window. Claim, release, and executed expiry decrement active bookings. They never refund quota. Failed reservations consume neither limit.
initialize_provider_limits creates a unique provider index. configure_provider_limits updates both scopes without resetting active bookings or current quota usage. Existing wallet windows keep their recorded end until they expire. Model and list offers do not divide these shared limits.
Provider HTTP request limits remain separate. Booking admission does not measure active inference execution, IP identity, or response quality.
Publish an offer
A registered and admitted provider signs set_list_offer. It must enable its policy mirror for that list and initialize its canonical provider limits. Supply a payment-token payout account owned by that provider.
In provider-limit mode, the offer records a stable provider limit ID. Account 4 is the readonly provider index. Every model and list uses the same provider counter row. The offer's legacy capacity field remains in the encoding, but admission uses global provider concurrency. No model budget or manual allocation is required.
| Field | Requirement |
|---|---|
input_rate, output_rate | Positive u32 payment atoms per million tokens. |
cached_rate | No greater than input rate. |
speed | Positive u16 declared tokens per second. |
privacy, active | Boolean declarations. |
checkpoint | Nonzero hash of an immutable checkpoint identity. |
input_modalities, output_modalities | Nonzero masks: text 1, image 2, audio 4, video 8. |
context_window, max_input, max_output | Positive token limits. Separate caps cannot exceed context. |
A rate of 1_000_000 means 1.00 USDC per million tokens in a six-decimal USDC market. Rates exclude the list surcharge. The contract checks declarations; it does not measure inference speed.
Read prices and available capacity
Read prices and capabilities from each list offer. Resolve its stable provider ID through the canonical index and counter page. Remaining global concurrency is max(0, cap - active_bookings). The wallet ledger records that signer’s active bookings and quota usage.
Validate canonical addresses, ownership, discriminators, market/provider bindings, and row bounds. Counter pages group storage; they do not divide capacity. Use typed SDK records rather than copying byte layouts.
An absent or frozen list mirror cannot receive bookings. HTTP limits and privacy metadata remain declarations enforced by the provider.
Update terms and metadata
set_list_offer requires the provider signer. It changes future terms while preserving existing bookings’ rates and destinations. configure_provider_limits changes shared limits for all the provider’s models and lists without resetting counters or wallet history.
Remove the provider from list membership before pruning its offer. Pruning also requires its stored active-booking count to be zero. Existing bookings still settle through their pinned counters.
update_profile changes the provider document commitment. update_model_metadata requires the original metadata authority. Metadata changes do not change on-chain concurrency or quota.