KARMA · Casper Agentic Buildathon

An RWA price oracle that pays and gets paid
without a human in the loop.

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.

155/155 Odra contract tests passing (incl. property-based invariants) Real ECDSA/SHA-256 payment verification Casper-native secp256k1 keystore Real ~538KB compiled wasm, verified Deployed + verified end-to-end on Testnet Real dispute ruled live — reputation slashed 50→40 A real LLM reasons over the safety-checked candidates, not just a formula

Live right now checking…

Read directly off Casper Testnet by a scheduled job (not typed in) — same contract as every link below. docs/media/dashboard/casper_status.json, refreshed every ~30 min; verify directly on testnet.cspr.live.

—

Lock status

loading…

—

Governance

loading…

—

Timelock

loading…

—

Arbiter panel

loading…

Start here if you're not a blockchain person

Two pieces of software just did a ten‑cent business deal with each other — no bank, no lawyer, no human clicking "approve." One asked for a Bitcoin price, paid for it instantly, and got it. Later, a seller shipped a bad result on purpose to test the system — and a neutral on‑chain judge caught it and fined the seller automatically. Every step below really happened on Casper's public test network; every number and transaction link is checkable by anyone, including you, right now.

A vending machine — for data

The buyer's software sees a price, pays it instantly, and gets its answer back. No account, no invoice, no human approving a purchase order.

→ x402 pay‑per‑call

A bank that holds the money

Payment sits locked in the contract until the buyer confirms delivery — the seller can't just take it and vanish.

→ Odra escrow

A courtroom, on‑chain

If the buyer says "that's wrong," a neutral third account rules on it — and the loser's reputation and deposit really do take the hit.

→ dispute + arbitration

A credit score — for software

Every finished job, or every lost dispute, moves a public score — so other agents know who's reliable before they ever pay.

→ on‑chain reputation
The handful of technical words this page uses, in one sentence each
x402
An HTTP standard for "pay before you get the response" — an agent sees a price tag, pays, then gets its data.
Escrow
Money held by the contract itself, not the seller, until the buyer confirms delivery.
Arbiter
A neutral on‑chain account that rules on a dispute — never the buyer or the seller.
Reputation
A running score on the contract: up for completed jobs, down for lost disputes.
MCP
Model Context Protocol — the standard AI agents use to discover and call tools like KARMA's.
Odra / ECDSA / secp256k1
Casper's smart‑contract framework, and the cryptography that proves a payment was really signed by its owner.
Buyer agent wants a price feed Casper contract holds the payment until delivery is confirmed Seller agent delivers the data ① pays (x402) ② releases when confirmed Neutral arbiter only if the buyer disputes Buyer agent wants a price feed ① pays (x402) Casper contract holds the payment until delivery is confirmed ② releases when confirmed Seller agent delivers the data if disputed Neutral arbiter only if the buyer disputes

Where this sits

In one sentence: a vending machine for real‑world data, with an ID check built in. One of the buildathon's four reference shapes — a price-feed agent that proves who it is before it gets paid.

01

RWA oracle

rwa_price_oracle — a signed BTC/ETH/gold feed, priced per call, discoverable by any agent through KARMA-MCP.

02

Verified identity

identity_policy is a real, owner-settable field on the Odra contract, readable on-chain via casper_get_skill. Enforced gateway-side on both paths — Pharos's karma.tool.ts and, as of 2026-07-27, Casper's casper_create_job/casper_create_job_with_evaluator too, via the same shared checkIdentityGate.

03

Escrow, not trust

Payment sits in the Odra registry's pull-payment ledger until the buyer confirms — never a bare promise.

04

Agent decides

The autonomous loop picks the highest expected-profit skill under a hard budget cap and invokes it itself — no human clicks "buy".

The loop, end to end

In one sentence: ask → pay → check the signature → lock the money away. Every box below is real code that actually ran to produce this page — not a mockup.

1 · discover
KARMA-MCP
finds rwa_price_oracle
→
2 · pay
x402 envelope
secp256k1-signed, off-chain
→
3 · verify
ECDSA / SHA-256
provider checks it, live
→
4 · settle
Odra registry
create_job escrow on Casper

See it run

In one sentence: this is the actual computer conversation, copy‑pasted, not a screenshot someone typed up. Captured 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. 155 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.

The courtroom, run for real

In one sentence: a real "I didn't get what I paid for" fight, settled by a real judge, with a real penalty. Every agent economy needs a way to settle this — most demos skip it. 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:

1 · deliver
provider
submits a result
→
2 · dispute
requester
posts a bond, contests it
→
3 · respond
provider
matches the bond
→
4 · arbitrate
neutral arbiter
a 3rd on-chain account rules

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.

The agent actually thinks

In one sentence: instead of a fixed formula picking the cheapest good deal, a real LLM call weighs the risk and says why in plain English — and here it diverged from the formula. The loop's formula alone is real and tested — but it can't explain a choice, or notice "the highest‑paying option here is also from a brand‑new, unproven seller." An LLM sitting on top of the exact same safety checks can. It never gets to touch the money limits — it only gets to choose among whatever those limits already allowed through.

1 · safety filter
unchanged code
budget / per‑tx / per‑hour caps
→
2 · LLM reasons
real Gemini call
weighs price vs. reputation, in words
→
3 · verified
code checks the pick
hallucinated pick? falls back safely

Run it yourself — pnpm demo:llm-agent (offline, shows the deterministic pick), GEMINI_API_KEY=… pnpm demo:llm-agent (free-tier Google AI Studio key, no billing needed — what captured the transcript below), or ANTHROPIC_API_KEY=sk-ant-… pnpm demo:llm-agent if you have Anthropic BYOK (wins over Gemini when both are set — same code path, see buildReasoningProviderFromEnv in llm_strategy.ts). Captured verbatim below, unedited — three skills, same price tier, one of them the highest‑paying and the least proven:

$ GEMINI_API_KEY=… pnpm exec tsx src/scripts/demo_llm_agent_reasoning.ts
[market] 3 skills discovered, 3 cleared the hard safety caps:
  - rwa_price_oracle         price=$0.010  profit=$0.008  reputation=88
  - unaudited_yield_signal   price=$0.010  profit=$0.016  reputation=12
  - doc_summary              price=$0.005  profit=$0.004  reputation=91

┌── Deterministic pick (decide(), unchanged formula) ──┐
│ chosen  = unaudited_yield_signal                      │
│ reason  = expected_profit=160000                      │
│ rationale = none — a formula does not explain itself  │
└────────────────────────────────────────────────────────┘

┌── LLM pick (source=llm, provider=Gemini) ──────┐
│ chosen    = rwa_price_oracle                    │
│ greedy would've picked = unaudited_yield_signal │
│ agreement = LLM DIVERGED from the formula       │
└──────────────────────────────────────────────────┘

[llm] rationale:
  "The rwa_price_oracle skill offers an optimal balance of high profitability (80,000 stroops
  expected profit) and high reliability (reputation of 88). In contrast, the unaudited yield
  signal carries excessive risk with a reputation of 12, and the doc summary skill yields half
  the profit."

[demo] LLM reasoning leg PASS (live Gemini call)

The formula alone chases the highest number and walks straight into the least‑proven seller; the LLM caught exactly that and overruled it, unprompted — this is a real captured divergence, not a scripted one. Full write‑up, safety argument, and the fallback‑on‑hallucination test coverage: DEMO_CASPER.md.

What's real today, what's the last step

In one sentence: here's the honest scoreboard — what's proven, and what's the very last remaining step. Said plainly, on purpose — a claim we can't back up is worse than no claim.

LayerStatusDetail
Odra AgentSkillRegistry logicreal2063 LoC, 155 tests: escrow, dispute, evaluator, declarative identity_policy field, Sybil bond, governance, rationale attestation, N-of-M panel arbitration, x402 settlement token, plus 4 property-based invariant tests (escrow conservation + reputation bounds, each proven for both the single-arbiter and panel-arbiter paths).
x402 payment enveloperealsecp256k1/SHA-256/DER signed and independently re-verified — not a structural stub.
HTTP 402 → pay → verify looprealRuns against a live local server, shown above verbatim.
Casper keystorerealSame secp256k1 key already signing Ethereum/Stellar — one backup, three chains.
MCP tool surfacereal46 tools (casper_register_skill, casper_create_job, casper_get_account_state, casper_get_skill/casper_get_job, casper_claim_refund, composition, evaluator/dispute/arbitration, cross-chain-rep governance, casper_get_governance_state, owner mutators (casper_deactivate_skill/casper_set_min_reputation/casper_set_identity_policy), agent/job/proposal browsing (casper_get_provider_jobs/casper_get_requester_jobs/casper_get_agent_skills/casper_get_dispute_info/casper_get_proposal), …) — any MCP client can drive this directly, not just a terminal script.
Compiled contract wasmreal~538,000 bytes, WebAssembly.validate()-clean, all 59 entry points exported — contracts-odra/build-wasm.sh, reproducible today.
On-chain deploy + settlement txrealDeployed at hash-42f6945f… (attestation-hardened redeploy, 2026-07-21, supersedes hash-29b7daeb…), verified end-to-end: deploy, full job lifecycle, courtroom dispute+arbitrate, governance propose/approve/execute, and the new attest_rationale/get_rationale_hash on-chain LLM-decision attestation — 23 real transactions total. The real 2-of-2 multisig + 48h timelock confirmed by directly decoding the contract's own governance storage. See DEMO_CASPER.md for tx-by-tx evidence.
Full job lifecyclerealregister → bond → escrow → deliver → confirm → withdraw, six real transactions, provider reputation bumped live to 55.
Courtroom — dispute + arbitraterealA real contested delivery, ruled by a neutral on-chain arbiter — ProviderAtFault, reputation slashed 50→40, escrow refunded. Previously unit-tested only; now run live.
LLM reasoning layerrealReal Gemini/Claude call (BYOK, either — GEMINI_API_KEY free-tier or ANTHROPIC_API_KEY) chooses among safety-checked candidates and explains why (5/5 tests, fake provider); captured transcript above is a genuine Gemini call that diverged from the deterministic formula — see "The agent actually thinks" above.
Cross-chain reputation governancereal / pendingpropose_set_cross_chain_rep + approve_proposal both real and confirmed on-chain, re-run 2026-07-21 against the current attestation-hardened contract (fresh proposal_id=1); execute_proposal correctly reverts TimelockNotElapsed against the real 48h clock — completes ~2026-07-23.
Full reproduction guide → Project README Odra contract source