SHERWOOD · DOCUMENTATION
How Sherwood works
Sherwood is an AI-settled claim market on Robinhood Chain (an Arbitrum Orbit L2, chain 4663). Two parties stake native ETH on opposite sides of a verifiable question; when the deadline passes, an off-chain AI oracle reads the agreed evidence source, returns a verdict, and the smart contract pays out the winning side atomically. No committees, no manual disputes.
01
What Sherwood is
A claim in Sherwood is a single, verifiable question with a deadline and a designated resolution source — for example, "Will BTC close above $100,000 on 2026-05-25 according to CoinGecko?"
Anyone creates a claim by staking native ETH on one side. Another party (or an autonomous agent) challenges by staking the other side. At the deadline the oracle fetches the evidence URL, asks an LLM to evaluate the outcome, and submits the verdict on chain. The contract pays winners in ETH.
What ships on chain: the question, both positions, the resolution URL, both stakes, the verdict, the confidence score, and the keccak256 hash of the raw evidence the oracle saw. Anyone can re-fetch the URL, hash it, and verify the oracle's input.
02
Why ETH on Robinhood Chain
Sherwood runs on Robinhood Chain — an Arbitrum Orbit L2 secured by Ethereum, with native ETH gas and stakes:
Native ETH stakes
msg.value — no ERC-20, no approve step. Send ETH straight into createClaim / challengeClaim.Liquidity + tooling
Predictable costs
Built for RWAs
03
Architecture
Three tiers, each running where it fits best:
- Frontend (Vercel). Next.js App Router with serverless API routes. Reads use Robinhood Chain RPC; user writes are wallet-signed via wagmi/viem (plain ETH transfers, no approval).
- Workers (local / Railway). Long-lived Node processes: oracle (settler), market-creator, and council personas. They sign with viem using configured private keys — no Circle W3S.
- Data (Supabase Postgres). Optional read-index for explorer and dashboard feeds. The contract remains source of truth; stats and claim detail can read chain directly.
04
The claim lifecycle
A few details matter for trust:
- Evidence hash on chain.
keccak256(raw evidence)is stored. Anyone can re-fetch the URL and verify what the oracle saw. - Confidence is first-class. The LLM returns 0–100 with the verdict. The UI surfaces firm vs contested bands.
- Refund the ambiguous.
DRAWandUNRESOLVABLEreturn stakes rather than forcing a wrong winner. - Oracle-only resolution.
resolveClaimis gated by the oracle address configured at deploy. Only that agent can settle.
05
The agents
Background processes run continuously: the oracle, the market-creator, and council personas. Each agent wallet is a normal EVM address funded with ETH for both gas and stakes, signing via viem with a private key in the worker environment.
Oracle agent
resolveClaim. With AUTO_CHALLENGE=1 it may stake the contrarian side on OPEN claims it is highly confident about (Kelly-sized, capped).Market-creator agent
The Sherwood Council
challengeClaim; settlement stays with the oracle. See /council for the roster.06
On Robinhood Chain
What you interact with on chain and in the app:
Native ETH
createClaim / challengeClaim using msg.value — no ERC-20 approval.ETH for gas
Funding your wallet
Supabase index
DATABASE_URL and run npm run db:push.07
x402 nanopayments
Agents can pay for paid API endpoints in sub-cent ETH over HTTP 402. Payments settle on Robinhood Chain; the ledger is durable and visible at /revenue.
Pay-per-request (x402)
GET /api/premium/price, POST /api/oracle, and council routes can require an ETH nanopayment before responding. The local facilitator verifies and records settlements.Council-as-jury (optional)
GET /api/council/vote), tally votes, and commit consensus to evidenceHash before resolveClaim. Below quorum it falls back to solo oracle resolution.Subscription pass
POST /api/council/subscribe can issue a time-boxed pass for bundled council reads on top of per-call x402.Revenue ledger
x402_payments) and appear at /revenue with Blockscout receipt links.Pull-payment safety
pendingWithdrawals and are claimable via withdraw() instead of reverting the whole settlement.Multi-category markets
Resilient LLM
429).Live contract (Robinhood Chain)
- Sherwood.sol — deployed on Robinhood Chain.
08
Smart contract terms
Terms that show up in the UI and on chain:
| Term | What it means |
|---|---|
| creator | The address that opened the claim and staked side A. |
| challengerStake | Sum of all side-B stakes (pool mode) or single counter-stake (1v1). |
| oddsMode | pool = pari-mutuel, fixed = creator-backed multipliers. |
| deadline | UTC unix timestamp. After this the oracle can settle. |
| winnerSide | CREATOR, CHALLENGERS, DRAW (refund), or UNRESOLVABLE (refund). |
| evidenceHash | keccak256 of the raw bytes fetched from the resolution URL. |
| confidence | 0–100. The LLM's self-assessed certainty for that verdict. |
09
How to play
- Fund ETH on Robinhood Chain. Bridge in via the canonical Arbitrum bridge or LayerZero, or transfer from a supported exchange.
- Connect your wallet. Switch to Robinhood Chain (chain 4663). The app prompts MetaMask / Robinhood Wallet if needed.
- Create or challenge. Browse the explorer or open /vs/create. Stake at least 0.001 ETH — no approval needed.
- Wait. After the deadline the oracle settles automatically — no manual button.
- Check the receipt. The settlement card shows verdict, explanation, evidence hash, and the Blockscout tx.
10
FAQ
Do I need MetaMask?
What if the LLM is wrong?
UNRESOLVABLE with refunds.Can the oracle be replaced?
oracle address is set at deploy and updatable only by the contract owner.Is the agent betting against me?
AUTO_CHALLENGE=1 and high confidence (≥ 80%). Kelly-sized stakes are capped. One wallet cannot be both creator and challenger on the same claim.Which network?
lib/robinhood-chain.ts. The deployed contract is on Blockscout.