
Claros - Verifiable Real-World-Data Oracle
A verifiable real-world-data oracle network on Casper. Energy markets and civic data, attested on-chain as self-describing feeds by autonomous agents that earn their own gas.
Timeline
Casper Agentic Buildathon 2026
Role
Full Stack Blockchain Developer
Team
Hooman Digital
Status
CompletedTechnology Stack
Key Challenges
- Making every feed self-describing and verifiable on-chain
- Running an oracle agent that funds its own gas with no human in the loop
- Gating operation behind a zero-knowledge proof of allowlist membership
- Enforcing per-feed claims on-chain so an open operator network stays trustless
Key Learnings
- Odra smart contract development on Casper 2.0
- A Groth16 / BN254 verifier compiled into a contract
- The x402 pay-per-call payment rail for agent-to-agent commerce
- Designing an autonomous agent that anomaly-checks its own inputs
Claros - Verifiable Real-World-Data Oracle
Overview
Claros is a Pyth-style oracle for real-world data, built on Casper. It pulls authoritative real-world data such as U.S. EIA energy markets and City of San Diego parking revenue, scales each value to an integer, hashes its provenance, and attests it on-chain as a self-describing feed. A DeepSeek-driven agent runs the whole loop autonomously and funds its own gas. Anyone can read a feed for free from a contract, the SDK, or a REST API, or pay per call over x402.
Claros was built for the Casper Agentic Buildathon 2026 and is deployed live on Casper testnet.
The Problem
On-chain apps that touch the real world, like prediction markets, RWA protocols, and parametric insurance, need real-world data they can trust and verify. Most oracles hand you a number. Claros hands you a number plus everything you need to check it: the value as a scaled integer, its decimals and unit, its source and cadence, a provenance hash of the exact upstream row, and the period it covers, all stored on-chain next to each other.
Key Features
Two On-Chain Registries
An AttestationRegistry stores each value keyed by a feed id, and a FeedRegistry stores the matching self-describing metadata such as decimals, unit, source, and cadence. A consumer reads both by the same feed id and computes the real value as amount divided by ten to the power of decimals, exactly like reading Pyth on-chain. Values are integers, so there are no floats on-chain.
An Autonomous Agent
The agent is a DeepSeek tool-calling loop on a heartbeat. Each cycle it checks its on-chain eligibility, fetches the latest data, anomaly-checks it against the asset history, attests clean readings on-chain, then decides whether to reinvest treasury and records the decision and its reasoning on-chain. No human approves any step, and the heartbeat only acts when there is new data so it never wastes gas.
A Self-Funding Treasury
The agent sells feed reads over an x402 payment rail to earn WCSPR, then compounds idle treasury into on-chain yield through Casper DeFi such as WiseLending staking and native delegation. Every reinvest decision, including a hold, is written to an on-chain treasury ledger with the reasoning that produced it.
A Zero-Knowledge Eligibility Gate
The oracle is gated behind a Groth16 proof of allowlist membership, a regulation-ready pattern where the agent proves it is authorized without revealing which member it is. An on-chain BN254 verifier checks the proof against a Merkle allowlist root, burns a nullifier for replay safety, and marks the caller eligible. The circuit is written in Circom 2.1 over a 20-level Merkle allowlist.
An Open Attester Network
Claros is not a single oracle. Any operator can prove eligibility through the same ZK gate, claim a brand-new feed, and attest it with their own key and their own LLM. Feed claims are enforced by the contracts, and a second independent operator is already live on testnet, attesting US solar generation and earning WCSPR for reads.
Data Coverage
Claros crawled the entire U.S. EIA APIv2 metadata tree into a catalog of 232 leaf datasets across every energy family, and a generic adapter means any of them can be attested on request. Today 38 feeds serve live values on-chain, spanning petroleum, natural gas, electricity, coal, and outlooks, plus a civic feed and an operator-claimed solar feed. Each value carries a sha256 provenance hash of the exact upstream row.
Tech Stack
- Smart contracts: Odra 2.8 in Rust on Casper 2.0, deployed upgradable.
- ZK gate: Groth16 over BN254 with a verifier compiled into the contract, Circom 2.1, MiMC7, and a 20-level Merkle tree.
- Agent: TypeScript with the Casper JS SDK and DeepSeek tool calling.
- Payments: x402 with WCSPR settlement through a self-hosted Casper facilitator.
- Consumption: an npm SDK that reads Casper state directly with no indexer, plus a Hermes-style REST API.
- Frontend: Next.js and React with Tailwind CSS.
Challenges and Solutions
Self-Describing, Verifiable Feeds
Splitting values and metadata into two registries keyed by the same feed id means a consumer can always reconstruct the real number and check its provenance hash against the exact upstream row.
An Oracle That Runs Itself
Wrapping fetch, validate, scale, hash, sign, and submit in an autonomous agent that also earns its own gas over x402 and parks idle treasury in yield lets a feed stay fresh with no human upkeep.
Trustless Multi-Operator Writes
Registering a feed records the caller as its claimant, and attesting a claimed feed is restricted on-chain to that claimant, resolved cross-contract. When the first-party key tried to attest another operator's feed, the chain reverted, proving the enforcement is real.
What I Learned
- Writing and deploying upgradable Odra contracts on Casper.
- Compiling a Groth16 / BN254 verifier into a smart contract for on-chain proof verification.
- The x402 pay-per-call rail and how agents can fund their own operation.
- Designing an autonomous agent that anomaly-checks its own inputs before acting.
