Autonomous Prediction Market Oracle Interface #1936
Closed
zkpato
started this conversation in
Stellar Ecosystem Proposals
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
Prediction markets produce verifiable, crowd-sourced signals (event outcomes, parametric resolutions) that downstream protocols want to consume: lending hooks, insurance triggers, DAO actions, parametric DeFi. On Stellar today there is no standard for reading those outcomes. Every consumer would have to learn each provider's contract layout, encoding, and trust model individually. That per-provider integration cost has historically been what blocks oracle composability.
[SEP-40] solves this for price feeds. There is no analogous interface for event resolutions, and the two are not interchangeable: price feeds are continuous streams keyed by asset; event resolutions are one-shot finals keyed by question.
Proposal
A minimal, read-side-only Soroban interface (
PredictionMarketOracleTrait) for prediction-market platforms whose markets resolve autonomously: deterministic execution of rules committed at market creation, against inputs committed at resolution. Four methods:pmo_version,market_spec,outcome,markets(paginated discovery, MAY). Two standardized events:pm_created,pm_resolved. Provider-internal concerns (positions, liquidity, payouts, settlement) are out of scope.Markets are identified by
sha256(canonical_spec_bytes): content-addressed, tamper-evident. Resolutions carryinputs_hash+rules_hash, so any third party can fetch both, re-execute, and verify the published outcome off-chain at zero on-chain cost.Full draft: pr pending
Key Design Choices
RESOLVER_ASSERTION_V1attestation symbol, but they fall outside the verification guarantee.Outcome::Invalidas a final state, distinct fromNone-as-unresolved. Real markets occasionally cannot be answered (source disappears, question becomes ambiguous); conflating with "unresolved" forces consumers to wait forever.outcome()returnsSome, it MUST keep returning the same value. Consumers can cache safely.Adoption
The reference Soroban implementation will land at
github.com/fermah-labs/sep-prediction-market-oracle. The first conforming provider will be Flashcast Social (flashcast.social), whose existing autonomous-resolution pipeline (deterministic workflow executed against committed inputs, multisig resolver) is the production motivation for this SEP.We expect organic adoption from any platform on Stellar whose markets are rule-driven rather than judgment-driven, and from Reflector-style oracle providers that want to expose discrete event outcomes alongside price feeds.
All reactions