Prediction Market Outcome Resolution System
Prediction market — betting market on real events: "Will team A win?", "Will ETH reach $5000 by year-end?", "Will bill X be passed?". Entire tokenomics works only if outcome determined correctly and honestly. Resolution system — critical component.
Event Types and Their Resolution
Price-based: "Will BTC be above $100K by Dec 31?"
- Auto-resolves via Chainlink/Pyth price feed at expiration
- Least controversial, fully on-chain
Sports/Political: "Who wins the election?"
- Requires external data
- Oracles like Augur, UMA, API3, Kleros
Subjective: "Did project deliver promise?"
- Requires human judgment
- Claim-challenge systems, collective voting
Automatic Oracle-Based Resolution
For objectively verifiable events — automatic resolution via oracle.
contract PriceMarket {
AggregatorV3Interface public priceOracle;
uint256 public resolutionTimestamp;
uint256 public targetPrice;
bool public resolved;
bool public outcomeYes;
function resolve() external {
require(block.timestamp >= resolutionTimestamp, "Too early");
require(!resolved, "Already resolved");
// Check oracle staleness at resolution
(,int256 price,,uint256 updatedAt,) = priceOracle.latestRoundData();
require(updatedAt >= resolutionTimestamp - 3600, "Oracle stale");
resolved = true;
outcomeYes = uint256(price) >= targetPrice;
emit MarketResolved(outcomeYes, uint256(price));
}
}
Key nuances:
- Which exact price to take? Price at exact expiration moment, or TWAP over last hour?
- What if oracle updated long before expiration? Get historical value via roundId.
UMA Optimistic Oracle
UMA's Optimistic Oracle — popular for prediction markets (Polymarket uses UMA).
Mechanism:
- Proposer proposes result + bond
- Dispute window (2 hours): anyone can dispute + counter-bond
- No dispute → result accepted
- Dispute → UMA DVM voting (token holders vote)
UMA optimistic: 95% requests resolve without dispute. Makes it cheap and fast.
Reality.eth for Subjective Events
Reality.eth — escalation game for subjective questions:
- Anyone asks question + bond
- Anyone answers + bond (overrides previous)
- Each dispute — bond doubles, timeout increases
- Final answer via Kleros arbitration at high bond
Rational behavior: if you know right answer — profitable to dispute wrong one (get loser's bond). Creates truthful result.
System for Pausing on Disputed Outcomes
Even with automatic resolution, edge cases exist: oracle returns clearly wrong value, event cancelled, force majeure.
address public guardian; // multisig DAO
function disputeResolution() external {
require(msg.sender == guardian, "Not guardian");
require(block.timestamp < resolutionTimestamp + DISPUTE_WINDOW, "Too late");
resolved = false; // Reset
emit ResolutionDisputed(msg.sender, block.timestamp);
// Trigger manual resolution process
}
Prediction market resolution system — 4-8 weeks development plus Legal review for compliance with gambling regulations in target jurisdictions.







