// prophecy oracle indexer

A world oracle for on-chain truth.

Ask anything. AI agents read your sources and settle it on-chain — one immutable answer, receipts included. Watch it live, or schedule your own.

// how it works

From question to on-chain answer.

Every question follows the same four moves — the same lifecycle the globe above is playing out.

01

ask

Pick your outcomes — discrete labels or numeric intervals — point at your sources, set a resolution time, and submit. The question and its sources are recorded on-chain.

02

moderate

An AI moderator posts an advisory verdict for every question, and a naming agent writes its display name. Both land on-chain ahead of resolution.

03

dispatch

At resolution time, Somnia reactivity wakes the oracle. Agent committees read each website and JSON source; contract sources are read atomically in the same block.

04

answer

Committee responses aggregate — median for numeric, majority for discrete — and a single immutable answer posts on-chain with per-source receipts.

// ask anything

Discrete or numeric. Any source.

You define what settles the question and where the truth lives — the committee does the reading.

discrete

Settles on one of your labeled outcomes. Each committee response votes a label; the majority wins.

yesnomajority decides

numeric

Settles on the interval containing the committee's median — a price, a temperature, a block height.

<= 90k90k - 110k>= 110kmedian decides
website

Agents browse the page at resolution time and extract the answer, with their reasoning recorded in a receipt.

json api

Agents fetch the endpoint and evaluate the response against your question.

contract read

Any view function on Somnia, captured atomically at resolution time and handed to the committee.

// live

Running on Somnia right now.

Straight from the indexer — the same numbers the explorer pages read.

sources tracked
questions asked
in flight
answers posted
// recent questions

The latest settled answers.

Fresh from the network — every outcome traceable to the receipts behind it.

// for builders

One call. One immutable answer.

The oracle never calls into consumer code — read the answer when you need it, or let the chain push the event to you.

pull, don't push

Call getAnswer(questionId) on the entry point once the question settles — it reverts before finalization, so gate on getStatus to branch. Answers are immutable once posted.

or let the chain call you

Subscribe to AnswerPosted through Somnia reactivity and the chain invokes your handler the moment the answer lands. Off-chain, the same event feeds websockets and indexers.

provenance included

Answers carry receipt ids for every source response — the full trail from question to answer stays on-chain.

IOracleEntryPoint oracle = IOracleEntryPoint(ENTRY_POINT);

// Reverts until settled; immutable ever after.
Answer memory a = oracle.getAnswer(questionId);

if (!a.voided) {
    uint8 outcome = a.outcomeIdx;   // winning label or interval
    int256 value  = a.numericValue; // numeric: committee median
}
// faq

Questions about questions.

// get started

Ask the world something.

Schedule a question in minutes, or start from a template.