Skip to main content

Prediction markets

A prediction market is the canonical consumer of an optimistic oracle. Users speculate on future events by trading binary outcome shares; the oracle decides which side wins. OMY is purpose-built for this use case, and the reference Market contract in the repo is the first real consumer we ship.

What a prediction market needs

Three things, in order:

  1. A way to mint outcome shares. Users deposit USDT; the market mints 1 YES + 1 NO share per USDT. At resolution, only one side is worth $1; the other is $0.
  2. A way to trade those shares. Usually a constant-product AMM. Some users want to buy YES, some want to sell. The AMM lets them transact without finding a counterparty directly.
  3. A way to settle. Once the underlying event resolves, the market needs a trustworthy answer. That's where OMY comes in.

How the oracle plugs in

┌─────────────────────┐
Market.RequestResolution ──► OracleFactory │
(creator-gated) │ deploy + bind │
└──────────┬──────────┘

┌─────────────────────┐
│ Assertion │
│ ── liveness ── │
└──────────┬──────────┘
│ OracleResult

┌─────────────────────┐
│ Market │
│ settle YES/NO │
│ 1% silent skim │
└─────────────────────┘
│ Redeem

Winners get
$0.99 / share

The Market sizes its oracle bond proportional to TVL — the more value at risk, the more economic security demanded from the oracle. Default: 2% of total collateral, floored at the configured minimum and capped at 10 000 USDT.

Design considerations

Liveness window

The liveness window is the gap between propose and finalize. Long enough that disputer-watchers have time to react; short enough that users get fast settlement.

Event typeSuggested liveness
Crypto price thresholds (verifiable from chain)30 min – 1 h
Sports / scheduled events2 – 6 h
Elections / multi-source verification12 – 24 h
Subjective or contentious24 h+

The trade-off: short liveness = poor user experience for disputers; long liveness = poor user experience for traders waiting to redeem.

Question phrasing

The oracle is only as good as the question. "Did event X happen?" must be unambiguous to anyone reading the question text. The single biggest cause of prediction-market controversy is poorly-worded questions where reasonable people disagree about what counts as the answer.

Always include:

  • A specific date / time with a timezone
  • A verifiable source ("according to the official scoreboard at example.com")
  • A fallback rule ("if no event by date X, resolves NO")

See Question templates for the full guide.

LP economics

In a binary prediction market, the LP takes directional impermanent loss: if they seed equal YES and NO and the market resolves YES, the LP's NO shares go to zero. The expected return depends on:

  • Swap fees collected over the lifetime of the market
  • The variance of the final outcome (more uncertain = better LP returns)
  • Whether the LP can hedge by participating on the contrarian side

The reference Market's swap fee is 0.5% (Phase A: all to treasury; Phase B: configurable split between LP and stakers). LP rewards via $OMY emissions are planned for Phase B if retail LP shows up.

Resolution skim

The Market takes a 1% silent resolution skim to treasury when the oracle finalizes. Users see clean payout numbers — every winning share pays $0.99 instead of $1.00. This funds the protocol without nickel-and-diming users on every trade.

Worked example

Question: Will the BTC/USDT spot price (Binance) close above $200,000 at 00:00 UTC on 2026-12-31?

StepWhat happens
Creator deploys MarketSets question, bond floor 100 USDT, liveness 6 h
LP seedsDeposits 10 000 USDT → 10 000 YES + 10 000 NO into pool
Users tradeThroughout the year, users buy YES (price rises to 0.42), buy NO (price falls to 0.58)
2026-12-31 00:00 UTCEvent occurs (real-world price check)
Creator calls RequestResolutionMarket sends CreateAssertion to factory with bond = max(2% × TVL, 100)
Proposer asserts answerPosts bond + 2 USDT fee; says YES (or NO)
Liveness window opens6 hours for anyone to dispute
Common case: no disputeAfter 6h, finalize() is called — answer accepted as truth
OracleResult → MarketMarket enters Resolved, skims 1% to treasury, sets winningYes = true
Users redeemYES shareholders get $0.99 per share; NO shares worth $0

If a dispute occurs, the resolver (committee or DVM) settles it. Loser bond splits 50/50 between winner and treasury.

Integration checklist for builders

import {DocFeatures, DocFeature} from '@site/src/components/docs/DocFeatures';

Don't ship a flat bond. Scale it. Lying must cost more than profit from steering. Crypto facts → short. Subjective facts → long. Mismatch causes controversy. Date + timezone + source + fallback rule. Write it before launch. Status guard + sender check + storage flag. See Patterns. Stamp deadline, expose CancelAwaiting. Don't let users lock funds on a dead factory hop. Users should see 0.99 payouts and understand why. Hide it in UI? At least document it in FAQ.

Further reading