LOPWDocumentation

Docs / Guides

Choose predicates and limits

Promise only what you can keep, with limits that leave room for normal operation. Every parameter is part of the hashed terms, so changing one creates a new terms version.

PredicateParameterHow to choose
P1 EquivocationnoneAlways safe to offer: an honest seller never signs two receipts for one payment.
P2 Terms mismatchnoneAlways safe to offer: the middleware signs receipts with the offer’s terms.
P3 Stale datamax_data_age (seconds, > 0)Your worst normal data age plus headroom. Report data_as_of on every response; reporting 0 makes P3 unprovable but marks your response untrusted to policy-driven agents.
P4 Bad statusallowed_status (non-empty)The statuses you are willing to charge for, usually [200].
P5 Size limitmax_response_bytes (> 0)Above your largest legitimate response.
P6 Oracle deviationoracle_contract, oracle_asset, max_deviation_bps, max_oracle_age (> 0)A deviation wide enough to cover the gap between your source and the oracle; an age that covers at least one oracle tick (the reference feed ticks every 5 minutes, so the reference service uses 600 s).
Service settingMeaningRule
claim_windowSeconds a receipt stays claimable1 to 86,400 (24 h); at most 3,600 (1 h) when P6 is listed, inside the oracle’s 24-hour history retention
max_claimMost one receipt pays outSet per offer by the middleware (maxClaim); agents may require a floor with minMaxClaim
min_stakeStake below which the service is SuspendedAt least 100 USDC; set at registration, outside the terms hash, so changing it never invalidates a buyer’s receipt

What the registry rejects

register_service and update_terms fail with InvalidTerms when:

Changing terms later

Call update_terms(service_id, terms). It returns the new terms_hash, makes it current, and keeps every earlier version readable so receipts issued under them remain claimable under their own terms. Terms cannot change while a service is Unbonding or Closed. The largest claim window you have ever registered sets your unbonding delay from then on (why).

Use the predicate explorer to see how a sample receipt is judged under different limits.