Settlement
Every completed workflow is settled on the Sui blockchain. Settlement produces an immutable record of the execution, cost breakdown, payment splits, and outcome proof — accessible to all parties at any time.
Settlement flow
- Outcome validation — success criteria are evaluated against the workflow's output. The result (success or failure) determines which pricing model branch applies.
- Cost reconciliation — actual costs across all four layers (model, tools, compute, human) are reconciled against the quoted price to produce the final margin.
- Attestation construction — an attestation payload is built containing the workflow ID, outcome flag, cost items, and payment splits. It is signed with the WeaveOS ed25519 signer key.
- Walrus upload — the outcome blob, execution trace, and proof blob are uploaded to Walrus decentralised storage. Each upload returns a Walrus blob ID used to reference the data on-chain.
- On-chain submission — the signed attestation is submitted to the WeaveOS Sui smart contract. The transaction is confirmed and a Sui transaction ID is returned.
- Dispute window — after settlement, a configurable window opens during which any party can raise a dispute. Default is 1 hour in production. After the window closes, settlement is final and irreversible.
Attestation payload
{
"workflowId": "wf_e4rgffg44fg4g44",
"outcomeSuccess": true,
"outcomeBlobId": "GzPQ9r...walrus",
"traceBlobId": "HxRT2m...walrus",
"proofBlobId": "KwBN4p...walrus",
"costItems": [
{ "provider": "openai", "category": "model", "units": 14820, "amount": 0.0213 },
{ "provider": "serper", "category": "tools", "units": 3, "amount": 0.0060 },
{ "provider": "weaveos", "category": "compute", "units": 1, "amount": 0.0048 }
],
"paymentSplits": [
{ "recipient": "0xacme...", "amount": 0.086, "role": "operator" },
{ "recipient": "0xwos...", "amount": 0.014, "role": "platform" }
],
"platformFee": 0.014,
"nonce": "a3f9b812",
"timestamp": 1716982330
}Walrus storage
Execution evidence is stored on Walrus, a decentralised storage network built on Sui. Three blobs are uploaded per settlement:
| Blob | Contents | Retention |
|---|---|---|
outcomeBlobId | The raw outcome JSON returned by your agent. | 5 epochs (~10 weeks on testnet) |
traceBlobId | Full criteria evaluation trace — every step with matched/not-matched reason. | 5 epochs |
proofBlobId | Cryptographic proof of execution integrity. | 5 epochs |
Blobs are retrievable directly from any Walrus aggregator endpoint using the blob ID:
curl https://aggregator.walrus-testnet.walrus.space/v1/<blob_id>On-chain verification
The settlement is verifiable on-chain using the Sui transaction ID returned in workflow.settlement.txId. The WeaveOS Move contract records:
- Workflow ID and operator address
- Outcome success flag and blob references
- Payment split amounts and recipient addresses
- Platform fee and timestamp
- Ed25519 signature from the WeaveOS signer public key
Disputes
Any party can raise a dispute within the dispute window by calling client.disputes.create(workflowId, reason). Active disputes pause any pending payouts. The dispute is resolved by the WeaveOS arbitration process, which reviews the execution trace and on-chain evidence.
Dispute outcomes:
| Outcome | Workflow status | Payment |
|---|---|---|
| Resolved for operator | Settled | Operator receives full payment |
| Resolved for customer | Refunded | Customer receives full refund |
| Partial resolution | Settled | Proportional split as determined |