Platform › Prediction markets › Settlement and refunds

Prediction markets

Settlement and refunds

How an outcome is read from the chain, who may settle, and the cases that refund everyone at par.

Version
1.0
Updated
2026-10-14
Source
Prediction market contract sources · Predict, common and drops contracts — design reference

Status#

How the outcome is read#

LaunchOutcomeOracle.settle(marketId) reads one metric view on the launchpad’s own contracts, compares it with the question’s threshold and records the result. The caller supplies only the market id: nobody signs anything, so nobody can sign something false.

code
observedValue = <metric view on the subject, read at the settling block>
outcome       = compare(observedValue, comparator, threshold)   // true = YES
What a settlement records — resolutionOf(marketId)
FieldValue
outcomeYES when true
observedValueThe value the outcome was judged on
settledAt / settledAtBlockWhen the value was read — not the deadline
settlerThe address that called it
Metric-specific reads
MetricRule
GRADUATED1 when graduated; 0 when never completed or when its refund hatch is open. A complete curve inside its graduation grace period refuses with GraduationPending
Creator metricsNeed the creator’s aggregate committed at or after the deadline and covering every indexed launch (CreatorStatsStale). syncAndSettle brings it up to date and settles in one transaction
PROTOCOL_FEES_METERED_WEIReads the splitter pinned when the market was registered

Who may settle, and when#

Settlement is permissionless. It happens once, inside the window that opens at the deadline.

The settlement window
SettingProduction
OpensAt the deadline (earlier only for a locked outcome)
Closesdeadline + settlementWindow
Minimum window15 minutes — MIN_SETTLEMENT_WINDOW
Maximum window7 days — MAX_SETTLEMENT_WINDOW
Default6 hours — DEFAULT_SETTLEMENT_WINDOW, when the creator passes 0
After the windowsettle refuses with SettlementWindowClosed; the market can only void

A settlement keeper settles markets still unsettled late in their window. It has the same power as any address — settle takes only a market id — and its settlements earn it nothing. See Settler fees.

Settling before the deadline#

Before the deadline settle accepts only a locked outcome — one no later read can change. Otherwise it refuses with TooEarlyToSettle.

When a monotone metric is locked
ComparatorLocked whenOutcome
GT / GTEAlready trueYES
LT / LTEAlready falseNO
NEQValue above the thresholdYES
EQOnly at the metric’s ceiling—

Once settled or voided, a market stops taking stakes even before its deadline. Creator markets never settle early.

Voids and refunds at par#

The cases that refund everyone at par
CaseTriggerFees
ExpiredvoidExpired(marketId), by anyone, after deadline + settlementWindowNone
Emergency voidPredictionMarketFactory.emergencyVoid(marketId), owner onlyNone
One side empty at settlementA normal settlement — not a voidNone

A void can only refund; it cannot redirect funds or choose an outcome. It cannot be undone. A void refunds the side that was right too, which is why settling inside the window matters.

LaunchOutcomeOracle.MarketVoided reasons
reasonFrom
"EXPIRED"voidExpired
"FACTORY"emergencyVoid

Claiming#

ParimutuelMarket.claim()
Market stateClaim pays
Settled, both sides stakedWinners: stake × payout pool / winning pot. Losers: nothing (NothingToClaim)
Settled, one side emptyEvery stake back at par
VoidedEvery stake back at par
Not resolvedRefused — MarketNotResolved
Claim rules
RuleValue
DeadlineNone. Unclaimed funds are never swept
PauseNever blocks a claim
Once per addressAlreadyClaimed
Claim operatorclaimAsOperator(user) — only the operator the user named on the factory; paid to the operator

The fees are swept separately by anyone after resolution: sweepFee() and sweepMarketingFee(). See Settler fees.