LOPWLayer of Onchain Programmable Warranties

LOPW Warranty infrastructure

Where autonomous agents put trust on‑chain.

LOPW turns machine-readable promises into bonded, enforceable warranties. A service posts slashable stake against signed terms. When a breach is proven from signed evidence or a named on-chain oracle, the buyer is paid from that stake in a single transaction. No escrow, no arbitration, no human review. One protocol with the same semantics on every chain: Stellar is the reference binding; Base, Ethereum, Arbitrum, Optimism, Polygon and Avalanche share one EVM binding.

Fig. 1 · Illustrative agent network · simulated events

agent staked service receipt claim slash → payout
One protocol, every chainStellar reference binding; Base, Ethereum, Arbitrum, Optimism, Polygon, Avalanche; Solana planned
x402 v2 nativeOffer and receipt travel as the lopw extension
Six predicatesEach decided by its own validator contract
TypeScript SDKsBuyer SDK and seller middleware

What is LOPW?

Layer of Onchain Programmable Warranties

LOPW is an open protocol that lets service providers back machine-readable promises with on-chain, slashable financial guarantees. AI agents and other autonomous systems can verify what they buy, and are paid automatically when a provable promise is broken. It is one protocol with the same semantics on every chain: Stellar is the reference binding, and each other chain supplies only its own carriers.

Trust for the autonomous economy.

Proof behind every promise.

x402 proves the agent paid. LOPW puts capital behind what the seller promised.

00 In plain English

A deposit behind every promise.

Software agents now buy data, APIs and compute on their own. LOPW gives them what a careful buyer always wants: a promise in writing, money that backs it, and a refund that arrives by itself when the promise is broken.

  1. 1

    The seller puts down a deposit

    Like a security deposit on a rental, a seller locks money behind specific promises: data no older than 30 seconds, never charging for an error, prices that match a public reference.

  2. 2

    Every sale comes with a signed receipt

    Like an itemised, signed invoice, the receipt states exactly what was delivered and when. The seller cannot later claim it said something else.

  3. 3

    Broken promise, automatic refund

    If the receipt itself shows the promise was broken, the buyer is paid from the deposit in one step. No lawyers, no forms, no waiting.

LOPW only pays when a breach can be proven by a contract from evidence alone, so outcomes are never a matter of opinion. It does not judge whether an answer was good. It checks whether a promise was kept.

Core principle

Core principle

x402 proves the agent paid.LOPW puts capital behind what the seller promised.

  1. Understandwhat a service promises
  2. Weighthe stake behind the promise
  3. Paythrough standard x402
  4. Verifywhat was delivered
  5. Enforcethe warranty, machine to machine

01 Term sheet

Read the warranty before paying.

Every warranted service publishes its terms on-chain and pins them by hash in each signed offer. Before an agent pays, the buyer SDK reads the live bond and refuses to proceed if the agent's policy is not met.

  1. SignatureThe offer is signed by the service's registered key.
  2. StateThe service is Active in the Bond Registry.
  3. StakeStake held meets the agent's policy minimum.
  4. CoverageRequired predicates are listed in the terms, and max_claim meets the policy.
  5. FreshnessThe offer is within valid_until and its offer_nonce has not been paid before.
Warranty term sheetExample service
250USDC STAKED
Active
Price per call
0.01 USDC
Max payout per receipt (max_claim)
25 USDC
Minimum stake
100 USDC
Claim window
1 h
Predicates offered
P3P4P5P6
P6 oracle
SEP-40 · 150 bps
Illustrative figures. Terms are registered on-chain and pinned by terms_hash in every signed offer.

02 Settlement schedule

Six steps from offer to verdict.

The x402 payment settles normally and is never held. LOPW runs alongside it as an independent accountability layer with exactly one branch, at the end.

  1. 01

    Warranty offer

    Seller answers 402 with x402 terms plus a signed offer pinning its registered terms.

    via extensions.lopw
  2. 02

    Payment

    Buyer verifies signature, stake and state, then pays through x402. Unchanged.

    via x402 exact
  3. 03

    Service receipt

    Seller signs a receipt binding payment, request, response and terms.

    via PAYMENT-RESPONSE · extensions.lopw
  4. 04

    Deterministic claim

    On a breach, anyone submits offer and receipt inside the claim window.

    via Claims contract
  5. 05

    Validator

    One contract per predicate decides from the evidence alone.

    via validate()
  6. 06

    Slash or reject

    Proven: buyer paid from stake. Otherwise: rejected.

    emits ClaimPaid / ClaimRejected

03 Stake ledger

Capital that answers for the promise.

Stake is slashable seller capital held per service. It is not per-call insurance: payouts can never exceed it. Follow an example service through claims, the slash rate limit, suspension, top-up and exit.

Example service · stake over timeUSDC · state bands
Ledger tapeExample service
#EventΔStake
StatePending
Claim capOne receipt pays at most max_claim, and never more than the stake left.
Slash rate limitSlashes in one epoch may not exceed 50% of the stake held when it began. The first slash of an epoch is always allowed.
Automatic suspensionA slash below the minimum suspends the service in the same transaction. Claims are still paid.
Unbonding delayThe largest claim window ever registered plus a margin, so every receipt issued before exit stays claimable.

04 Service states

Five states. Deterministic transitions.

The seller middleware and the buyer SDK both refuse to proceed unless a service is Active. A service that has never reached its minimum stake issues no offers, so no receipt can exist against it.

Swipe the diagram sideways →

Transitions
FromTriggerTo
—register_servicePending
PendingDeposits reach the minimumActive
Pendingwithdraw, with no delayClosed
ActiveSlash leaves stake below the minimumSuspended
SuspendedDeposit restores the minimumActive
Active or Suspendedrequest_unbond that would leave stake below the minimumUnbonding
Unbondingcancel_unbondActive, or Suspended if below the minimum
Unbondingwithdraw after the unbonding delayClosed

05 Participants

Six parties. Three are new.

LOPW adds a registry, validators and a claims contract. Everything else is the commerce agents already do.

Existing

Seller

Runs a paid API, stakes USDC, signs offers and receipts.

Existing

Buyer

An agent or app that pays per request and may file a claim.

Existing

Facilitator

The x402 service that verifies and settles the payment.

LOPW

Bond Registry

Holds stake; stores each service's terms and signing key.

LOPW

Validators

Contracts that each check one kind of breach.

LOPW

Claims contract

Verifies evidence, calls a validator, pays the buyer or rejects.

What LOPW is not. Not escrow: payments settle normally. Not arbitration: no judges, votes or human disputes for supported conditions. Not a quality judge: it never rules on whether an AI answer was good.
What every buyer gets. Stake and terms readable before paying; a seller-signed receipt bound to payment, request, response and terms on every paid response; automatic payout on a provable breach.

06 Chain bindings

Stellar: the reference binding.

The protocol is specified once and bound to each chain. Stellar carries it first and defines the reference: Soroban contracts, Ed25519 over domain-separated XDR, USDC with 7 decimals, Reflector SEP-40 oracles and x402 exact. Every other binding reproduces the same semantics with its own carriers.

Portable core

Warranty offer, service receipt, validator interface and claim semantics stay the same everywhere.

Chain binding

Encoding, signature scheme, contract functions and the payment-rail binding are specific to each chain.

Stellar · Soroban · Ed25519 · USDC SAC · SEP-40 · reference bindingEVM · Solidity · EIP-712 · USDC · Chainlink · Base firstSolana · Anchor · planned
Read more

The Stellar binding in detail, with the live contract addresses on Stellar testnet, and every network: chain ids, CAIP-2 ids, USDC and oracle addresses, deployment status.

Technical reference

For engineers.

Exact predicate conditions, wire format, signing, adjudication and chain bindings. The full reference lives in the documentation.

T1 Predicates

Six breaches, each provable by contract.

A predicate is one breach condition a contract decides from the evidence alone. Each service's terms list which apply and with what limits. Only deterministic proof pays.

IDBreachProven whenEvidence
P1 EquivocationSeller signed two different receipts for one paymentboth signatures valid · service_id and payment_reference match · receipt hashes differtwo receipts
P2 Terms mismatchReceipt cites the offer but different termsreceipt.offer_hash = offer hash · receipt.terms_hash ≠ offer.terms_hashoffer + receipt
P3 Stale dataData older than promisedserved_at − data_as_of > max_data_agereceipt
P4 Bad statusCharged for a status it promised not to charge forstatus ∉ allowed_statusreceipt
P5 Size limitResponse larger than promisedresponse_bytes > max_response_bytesreceipt
P6 Oracle deviationServed value differs from a named oracle beyond toleranceoracle_contract and oracle_asset match terms · served_at − oracle_timestamp ≤ max_oracle_age · |reported_value − oracle_price| × 10000 > max_deviation_bps × oracle_price, using price(oracle_asset, oracle_timestamp)receipt + oracle
Evidence quality. P1–P5 rest on what the seller signed and catch a seller that contradicts itself or admits a breach. P6 is checked against evidence the seller does not control. Invalid signatures, missing receipts and receipts citing an unseen offer are reported as untrusted and are not slashable.

T2 x402 v2 extension

Rides inside x402. Changes nothing in it.

LOPW is an x402 v2 extension under the key lopw. Verify and settle are untouched, any conformant facilitator works, and a buyer that ignores the extension still completes a normal purchase.

402 Payment RequiredOffer
extensions.lopw = {
  version, service_id,
  registry,
  terms_hash,   // pins on-chain terms
  price, asset, max_claim,
  valid_until, offer_nonce,
  key_version, signature
}
PaymentUnchanged
// standard x402 "exact" scheme
// facilitator verifies + settles

buyer SDK checks first:
  offer signature
  service state = Active
  stake ≥ policy.minStake
  valid_until, offer_nonce
PAYMENT-RESPONSEReceipt
extensions.lopw = {
  service_id, offer_hash,
  terms_hash, buyer,
  payment_reference,
  request_hash, response_hash,
  response_bytes, status,
  served_at, data_as_of,
  oracle?, key_version,
  signature
}

T3 Hashing and signatures

Domain-separated, replay-proof.

Offers and receipts are contract types, serialized as XDR, hashed with SHA-256 and signed with Ed25519, so off-chain code and the contract hash identical bytes. Each service signs with a dedicated key that can sign but never move stake.

  • One payout per paymentPaid claims are recorded under (service_id, payment_reference). A second claim is refused whichever receipt it presents.
  • Unique offersoffer_nonce makes every offer hash unique; the buyer SDK refuses an offer it has already paid.
  • Bounded validityvalid_until limits how long an offer can be paid.
  • Key rotationKeys are stored by key_version. A rotated key is stamped with a retirement time: receipts it signed before then stay claimable, and it cannot sign new ones.
Signed messageStellar binding
msg = SHA-256(
  "LOPW/OFFER/v1" | "LOPW/RECEIPT/v1",
  network_id,        // no cross-network replay
  registry_address,  // no cross-deployment replay
  XDR(struct without signature)
)
signature = Ed25519(signing_key, msg)

offer_hash   = msg  // for offers
receipt_hash = msg  // for receipts

request_hash = SHA-256(method ⏎
                       path?query ⏎
                       SHA-256(body))

T4 Claim adjudication

One transaction. One outcome.

Anyone may submit a claim. The payout always goes to the buyer named in the receipt: min(max_claim, stake remaining), subject to the slash rate limit.

  1. Service exists and is not ClosedPASS
  2. Receipt signature valid at key_version, key not retiredPASS
  3. Offer signature valid; receipt cites the offerPASS
  4. Inside served_at + claim_windowPASS
  5. No claim paid for (service_id, payment_reference)PASS
  6. Predicate listed in the offer's termsPASS
  7. Validator returns provenPROVEN
RejectedValid evidence, no breach proven. Emits ClaimRejected.
ErrorEvidence or a precondition failed. Nothing is recorded.
Outcomes and errors
CodeTypeCause
NotProvenRejectedThe validator did not find a breach
NotVerifiableRejectedNo usable oracle observation at the cited time
UnknownServiceErrorNo such service, or it is Closed
BadSignatureErrorOffer or receipt signature does not verify; no penalty
OfferMismatchErrorReceipt does not cite the supplied offer
WindowClosedErrorClaim window passed, or served_at in the future
AlreadyClaimedErrorA claim was already paid for this payment
PredicateNotOfferedErrorThe terms do not include this predicate
KeyRetiredErrorThe key was retired before the receipt was served
SlashRateLimitedErrorEpoch cap reached; retry next epoch inside the window
NoStakeErrorStake is zero

T5 Chain bindings

One protocol. Bound to each chain.

The offer, receipt, validator interface and claim semantics are portable across networks and machine-payment systems. Each chain binding supplies the encoding, signatures, contracts and payment rail.

LayerStellar · reference bindingEVM · Base, Ethereum, Arbitrum, Optimism, Polygon, AvalancheSolana · planned
Portable core
Warranty offer● identical● identical● identical
Service receipt● identical● identical● identical
Validator interface● identical● identical● identical
Claim semantics● identical● identical● identical
Binding-specific
Encoding and hashingScVal XDR · SHA-256, domain-separatedABI · keccak-256 · EIP-712Borsh · SHA-256, domain-separated
SignaturesEd25519secp256k1 over EIP-712 typed dataEd25519
ContractsSoroban (Rust)Solidity (one binding for all six)Anchor (Rust)
Stake and paymentUSDC SAC, 7 decimals · x402 exact, SEP-41Native USDC, 6 decimals · x402 exact, EIP-3009USDC SPL, 6 decimals · x402 exact, SPL transfer
Oracle (P6)Reflector, SEP-40 price(asset, t)Chainlink getRoundData(roundId)Pyth, verified in-program
Wire form of lopwbase64 ScVal XDR0x-hex ABI encodingBorsh (design)
DetailStellar bindingEVM bindingSolana (planned)

Swipe the table sideways →

T6 Architecture and SDKs

Three contracts. Two SDKs.

Sellers bond USDC behind their promises. Validators check the evidence. Breaches pay out automatically. The SDKs handle signing, verification and claims so integrations stay small.

ContractBond Registry

Holds stake per service; stores terms versions and signing keys; slashes on instruction from Claims.

ContractClaims

Verifies signatures and windows, records the claim, calls the validator, pays or rejects.

ContractsValidators P1–P6

One per predicate behind an allowlist, so new predicates never touch stake logic.

TypeScriptBuyer SDK

Applies policy, pays, verifies receipts, evaluates every predicate locally and files claims.

TypeScriptSeller middleware

Issues signed offers on 402, settles first, then signs the receipt with the settlement reference.

agent.ts@lopw/buyer-sdk
import { LopwBuyer } from "@lopw/buyer-sdk";

const agent = new LopwBuyer({
  secret: process.env.AGENT_SECRET,
  policy: {
    minStake: 100n * 10_000_000n,   // 100 USDC
    requiredPredicates: [6],
    minMaxClaim: 10_000_000n,       // 1 USDC
  },
});

const { response, body, warranty } = await agent.fetch(
  "https://fx.example.com/v1/quote?pair=EUR-USD"
);

if (warranty?.breaches.length) {
  const result = await agent.claim(warranty);
  // { outcome: { paid }, transaction }
}
server.ts@lopw/seller-middleware
import { createLopwExtension, lopwRequestContext, DATA_AS_OF_HEADER }
  from "@lopw/seller-middleware";
import { StellarBinding } from "@lopw/protocol";

const lopw = createLopwExtension({
  binding: new StellarBinding(),  // reference binding; EvmBinding for EVM networks
  serviceId, signingSeed, maxClaim,
});
server.registerExtension(lopw);     // x402 v2 x402ResourceServer
app.use(lopwRequestContext());

const routes = {
  "GET /v1/quote": {
    accepts: [{ scheme: "exact", price: "$0.01", network, payTo }],
    extensions: { lopw: {} },        // network: CAIP-2 id
  },
};
// in the handler, declare data freshness for P3:
res.set(DATA_AS_OF_HEADER, String(asOf));
Seller setup

Register the service in the Bond Registry with its terms and a dedicated Ed25519 signing key, deposit at least the minimum stake, then add the middleware.

Buyer behaviour

A tampered receipt is flagged untrusted and no claim is possible. When a slash takes stake below the minimum, the service is suspended and buyer SDKs stop paying it.

Machine-readable

Agents can discover the protocol from /llms.txt and /.well-known/lopw.json.