Market resolution flow
After a market’scloseTime passes, the designated resolver posts the real-world outcome. Arcium’s MPC nodes then decrypt the encrypted bet pool and compute payout ratios. A challenge window follows before the market becomes claimable.
resolveMarket
Posts the real-world outcome and triggers the Arcium MPC reveal circuit. Only the wallet set asresolver at market creation can call this.
TypeScript
PendingResolution (state 4). The Arcium callback writes revealed pool sizes and the payout ratio. The market does not become Resolved until finalizeResolution is called (or the challenge window elapses undisputed).
Parameters
Transaction fee payer.
Must match
market.resolver on-chain. Any other key throws UnauthorizedResolver (error 6005).Market to resolve. Must be in
awaitingResolve phase (past closeTime, not yet revealed).Winning outcome index. For YesNo:
0 = NO, 1 = YES. For MultiOutcome: 0-(numOutcomes - 1).Arcium computation slot. Random by default.
Milliseconds to wait for the MPC callback. Defaults to
60_000.Progress callback. Stages:
validating → fetching-state → submitting → awaiting-callback → refetching → done.Return value
Transaction signature.
Market account after the reveal callback ran. Check
market.state - it will be 4 (PendingResolution) at this point.Arcium callback result.
flagResolution v0.2+
Flags a pending resolution as disputed during the challenge window. Permissionless - anyone can call this if they believe the outcome is wrong.TypeScript
Caller’s public key (any wallet).
A market in
PendingResolution (state 4) that has not yet been flagged.disputed state. Payouts are blocked until an admin calls adminOverrideResolution.
finalizeResolution v0.2+
Finalizes a pending resolution after the challenge window elapses undisputed. Permissionless - anyone can call this to move the market toResolved.
TypeScript
Any wallet (permissionless).
A market in
PendingResolution that is not disputed and whose challengePeriod has elapsed.Resolved and claim_deadline is set, opening the payout window.
adminOverrideResolution v0.2+
Overrides the outcome on a disputed market. Admin-only.TypeScript
Must match
globalState.admin on-chain.A disputed market in
PendingResolution.Corrected outcome index. The program recomputes
payout_ratio from the already-revealed plaintext pools using this value.Resolved and the ResolutionOverriddenEvent is emitted.
Phase gate reference
| Action | Required phase | Required state |
|---|---|---|
resolveMarket | awaitingResolve | Active or Closed, past closeTime |
flagResolution | pendingResolution | PendingResolution (4), not disputed |
finalizeResolution | awaitingFinalize | PendingResolution (4), not disputed, window elapsed |
adminOverrideResolution | disputed | PendingResolution (4), disputed |