KARMA · Casper Agentic Buildathon
An agent discovers a real-world-asset price feed, pays for it over a signed x402 envelope, and settles the job on a Casper smart contract — the trust comes from Odra escrow + cryptography, not a server anyone has to trust.
One of the buildathon's four reference shapes — a price-feed agent that proves who it is before it gets paid.
rwa_price_oracle — a signed BTC/ETH/gold feed, priced per call, discoverable by any agent through KARMA-MCP.
identity_policy is a real field on the Odra contract — a skill can require a fresh, verified caller before it will run.
Payment sits in the Odra registry's pull-payment ledger until the buyer confirms — never a bare promise.
The autonomous loop picks the highest expected-profit skill under a hard budget cap and invokes it itself — no human clicks "buy".
Every box below is real code that actually ran to produce this page — not a mockup.
rwa_price_oraclecreate_job escrow on CasperCaptured verbatim from this repo — pnpm exec tsx src/scripts/demo_casper_x402_live.ts. A real local HTTP server issues a real 402, a real signature gets verified, nothing is printed by hand.
$ pnpm exec tsx src/scripts/demo_casper_x402_live.ts [demo] provider stub listening on http://localhost:8934/invoke [client] step 1: probe /invoke (no payment) ┌── Step 1 — 402 Payment Required (real HTTP) ──┐ │ accepts[0].amount = 10000000 motes │ │ accepts[0].payTo = account-hash-c863d5...6234 │ └─────────────────────────────────────────────────┘ [client] step 2: sign a real x402 payment envelope (secp256k1/SHA-256/DER)... [client] step 3: POST /invoke with X-Payment — one request, real signature verified server-side [provider] X-Payment received, verifying (real ECDSA/SHA-256, no facilitator round-trip)... [provider] verified OK — payer: account-hash-4372145f...2ffd9 [provider] price feed: BTC/USD = $63076.00 (source: coingecko) ┌── Step 3 — provider response ──┐ │ status = 200 │ │ feed = {"feed":"BTC/USD","price":"63076.00",...} │ └──────────────────────────────────┘ [demo] HTTP + crypto loop PASS (offline — re-run --live once a funded key submits the on-chain leg)
$ cargo +nightly test --manifest-path contracts-odra/Cargo.toml
...
test result: ok. 120 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
Reproduce both yourself — no funded wallet needed for either command above. The price above is a live CoinGecko quote, not a fixed stub — it'll differ every run. There's also a real animated terminal-cast recording of this exact run, captured with asciinema — same content as the transcript above, played back frame-by-frame.
Every agent economy needs a way to settle "I didn't get what I paid for" — most demos skip this. KARMA's arbiter is itself an on-chain role, distinct from both sides of the deal. This ran live on Testnet on 2026-07-07, real transactions, real verdict:
Verdict: ProviderAtFault. Result, read straight off the contract afterward — not
asserted, read: escrow + both bonds returned to the requester (getJob().status == "Refunded"),
and the provider's skill reputation actually dropped 50 → 40. Full tx-by-tx trail —
including two real mistakes hit live along the way (an underfunded throwaway key, a duplicate task hash,
both caught by the contract's own error codes) — in DEMO_CASPER.md.
Said plainly, on purpose — a claim we can't back up is worse than no claim.
| Layer | Status | Detail |
|---|---|---|
Odra AgentSkillRegistry logic | real | 620 LoC, 120 tests: escrow, dispute, evaluator, identity gate, Sybil bond. |
| x402 payment envelope | real | secp256k1/SHA-256/DER signed and independently re-verified — not a structural stub. |
| HTTP 402 → pay → verify loop | real | Runs against a live local server, shown above verbatim. |
| Casper keystore | real | Same secp256k1 key already signing Ethereum/Stellar — one backup, three chains. |
| MCP tool surface | real | 25 tools (casper_register_skill, casper_create_job, casper_get_account_state, composition, evaluator/dispute/arbitration, cross-chain-rep governance, …) — any MCP client can drive this directly, not just a terminal script. |
| Compiled contract wasm | real | ~538,000 bytes, WebAssembly.validate()-clean, all 59 entry points exported — contracts-odra/build-wasm.sh, reproducible today. |
| On-chain deploy + settlement tx | real | Deployed at hash-29b7daeb… (governance-hardened redeploy), verified end-to-end: deploy, deposit_bond, create_job, deliver_result confirmed on the original deploy; the redeploy's real 2-of-2 multisig + 48h timelock confirmed by decoding the contract's own GovernanceConfigured event. See DEMO_CASPER.md for tx-by-tx evidence. |
| Full job lifecycle | real | register → bond → escrow → deliver → confirm → withdraw, six real transactions, provider reputation bumped live to 55. |
| Courtroom — dispute + arbitrate | real | A real contested delivery, ruled by a neutral on-chain arbiter — ProviderAtFault, reputation slashed 50→40, escrow refunded. Previously unit-tested only; now run live. |
| Cross-chain reputation governance | real / pending | propose_set_cross_chain_rep + approve_proposal both real and confirmed on-chain; execute_proposal correctly reverts TimelockNotElapsed against the real 48h clock — completes ~2026-07-09. |