UnitFlow LogoUnitFlow Docs

Resolution & Oracle

Market resolution is handled by the PredictOracle contract using a two-step process with a mandatory 24-hour dispute window. This prevents incorrect resolutions from being finalized without community oversight.

Resolution Flow

1. proposeResolution(market, outcome)
        ↓
   24-hour dispute window opens
        ↓
   [anyone can call disputeResolution() during window]
        ↓
2. finalizeResolution(market)          ← anyone can call after window
        ↓
   market.resolveMarket(outcome) called
        ↓
   market.resolved = true, market.outcome = YES/NO
        ↓
3. Winners can now call claimReward()

Step 1 — Propose

Only the oracle owner or an authorized resolver can propose an outcome. They call:

PredictOracle.proposeResolution(
  address market,
  bool outcome    // true = YES, false = NO
)

This records the proposed outcome and opens a 24-hour dispute window. The proposal is visible on the market detail page for all users.

Step 2 — Dispute Window

During the 24-hour window, any address can call disputeResolution(market)to flag the proposal as contested. A disputed resolution cannot be finalized — it requires the oracle owner to call overrideResolution(market, outcome) to set the correct outcome directly.

⚠️
Disputing a resolution does not automatically reverse it. It escalates to the oracle owner for manual review. The dispute window is the only mechanism for contesting an incorrect outcome.

Step 3 — Finalize

After the dispute window closes with no dispute, anyone can call:

PredictOracle.finalizeResolution(address market)

This is permissionless — any wallet can trigger finalization. The oracle callsmarket.resolveMarket(outcome) internally, which sets resolved = true and outcome on the market contract. Winners can claim immediately after this transaction confirms.

On the frontend, the Oracle Resolution panel on the market detail page shows the current state and a Finalize Resolution button once the window has closed.

Resolution States

StatusMeaning
NoneNo proposal submitted yet
ProposedOutcome proposed, dispute window open or pending finalization
DisputedProposal contested, awaiting owner override
FinalizedOutcome confirmed, market resolved on-chain

Oracle Contract

FieldValue
Address (proxy)0xc40E6653D3a76FAA8F3F68060f1D09AEB5153A15
Dispute window24 hours
Owner0x3682652cD0995E6972CCF7245a1CAea95C2955b8

Self-Resolving Markets

If a market creator sets the resolver field to their own address instead of the oracle proxy, they can call market.resolveMarket(outcome) directly. This bypasses the oracle and dispute window entirely. Use this only for markets where the creator is the authoritative source of truth.

What Happens if a Market is Never Resolved

There is currently no automatic expiry or refund mechanism. If a market's resolution date passes and no one proposes an outcome, stakes remain locked in the contract. The oracle owner can propose and finalize resolution at any time after the resolution date.