02 ⊢Examples

Recipes agents can copy.

Worked flows for discovery, marketplace listings, and live demos. Each recipe maps to the same contract object: create, fund, verify, settle.

base_agent_task

Use a Base agent wallet for conditional work.

Base agents can use wallets and x402 for access. Use Settle when USDC should wait for proof before payout finalizes.

Read https://settle.ronakdaya.com/skill.md.
Use my Base agent wallet to fund a $10 USDC escrow on Base.
Settle only when https://api.example.com/result returns 200 and contains "done".
Register the provider payout address before verification so payout can auto-authorize.
railUSDC on Base
agent stackBase MCP · x402 · Settle
why this works

Wallet control, payment, and conditional settlement stay separate.

agent flow
{
  "wallet": "Base Account or MCP-controlled wallet",
  "funding": "usdc/base",
  "condition": "api_response",
  "settlement": "after receipt sync"
}
when to use Settle
Use x402 for pay-to-access.
Use Settle when payment waits for proof:
PR merged, API returned, file delivered.
github_pr_merged

Pay a contributor when a PR merges.

For code bounties and agent-generated patches. Deterministic verification can auto-authorize payout once payout details are registered.

Read https://settle.ronakdaya.com/skill.md and create a test escrow for $25 USDC.
Settle only when GitHub PR owner/repo#42 is merged.
Fallback: return funds to the client if the deadline expires.
evidencemerge_sha + merged_at
webhookescrow.settled
why this works

GitHub merge state is objective and repeatable.

expected evidence
{
  "kind": "github_pr_merged",
  "repo": "owner/repo",
  "pr": 42,
  "merge_sha": "4f1c…9d3a",
  "merged_at": "2026-05-24T17:01:58Z"
}
webhook payload
{
  "type": "escrow.settled",
  "contract_id": "stl_8f2k…3R",
  "state": { "from": "settlement_pending", "to": "settled" },
  "settlement": { "tx_hash": "0xabc…789" }
}
api_response

Pay when an API returns the agreed result.

For background jobs, paid tool calls, data enrichment, and long-running workflows with a machine-checkable output.

curl -X POST https://settle.ronakdaya.com/escrow/create \
  -H 'content-type: application/json' \
  -d '{"amount_usdc":10,"client_wallet":"client","provider_wallet":"provider","condition":{"type":"api_response","params":{"url":"https://api.example.com/result","expected_status":"200","expected_body":"ok"},"deadline":"2026-12-31T00:00:00.000Z","fallback":"return_to_client"}}'
evidencestatus + matched body
webhookescrow.settled
why this works

The HTTP response is the contract's completion proof.

expected evidence
{
  "kind": "api_response",
  "status": 200,
  "matched_body": true,
  "url": "https://api.example.com/result"
}
webhook payload
{
  "type": "escrow.settled",
  "contract_id": "stl_api…004",
  "evidence": { "kind": "api_response", "status": 200 },
  "settlement": { "tx_hash": "0xabc…789" }
}
file_delivered

Pay when a file is delivered.

For reports, exports, designs, media, and freelancer work where a URL and optional hash can prove delivery.

Read https://settle.ronakdaya.com/skill.md and create an escrow for a file delivery.
Settle when https://example.com/final.zip is available and its sha256 matches the contract.
Use USDC on Base or USDG on X Layer for funding.
evidenceurl + sha256
webhookescrow.settled
why this works

The delivered bytes can be fetched and hashed at the edge.

expected evidence
{
  "kind": "file_delivered",
  "url": "https://example.com/final.zip",
  "sha256": "4f1c…9d3a",
  "hash_matched": true
}
webhook payload
{
  "type": "escrow.settled",
  "contract_id": "stl_file…240",
  "evidence": { "kind": "file_delivered", "hash_matched": true },
  "settlement": { "tx_hash": "0xabc…789" }
}
manual

Pay when a client confirms a milestone.

For work with subjective acceptance. Manual confirmation is explicit, logged, and does not pretend to be deterministic.

curl -X POST https://settle.ronakdaya.com/escrow/create \
  -H 'content-type: application/json' \
  -d '{"amount_usdc":50,"client_wallet":"client","provider_wallet":"provider","condition":{"type":"manual","params":{},"deadline":"2026-12-31T00:00:00.000Z","fallback":"return_to_client"}}'

curl -X POST https://settle.ronakdaya.com/escrow/{id}/verify \
  -H 'content-type: application/json' \
  -d '{"confirmed":true}'
evidenceconfirmed: true
webhookescrow.settled
why this works

Human judgment stays human, but the contract records the decision path.

expected evidence
{
  "kind": "manual",
  "confirmed": true,
  "note": "manual is the escape hatch, not the default"
}
webhook payload
{
  "type": "escrow.settled",
  "contract_id": "stl_manual…100",
  "evidence": { "kind": "manual", "confirmed": true },
  "settlement": { "tx_hash": "0xabc…789" }
}
marketplace listing

Settle

Programmable escrow for agent work. Commit funds upfront. Settle after a verifiable condition passes.

category
conditional settlement
primary
POST /escrow/create
payment
POST /escrow/{id}/pay
status
v0.1 custodial demo. Tiny amounts only.
rails
USDC/Base · USDG/X Layer · x402 · MPP · Stripe sandbox
base agents
Use Base MCP for wallet control. Use Settle when payment waits for proof.
escrowconditional-settlementx402MPPBasebase-usdcagent-walletagent-paymentsbountiesgithubapi-jobsfile-delivery
Ready to settle when the condition fires.