Skip to main content
Two distinct settlement paths:

Price markets (auto via resolver keeper)

The resolver’s auto-settle keeper runs every 60s. On expiry of any Predict oracle with opted-in redeemers (or any indexed PositionMinted event), it builds one PTB per redeemer:
Per-position PTBs isolate aborts (one stale-qty position can’t sink the batch). Results land in redemptions table; /profile realized-P&L tile + chart update on next refresh. Log excerpt:
Manual trigger (via REST):

Binary event markets (manual via ResolverCap)

After the real-world outcome is known, the holder of the market’s ResolverCap signs:
All three IDs come from .binary-markets/registry.json. Outcome: 1 = YES, 2 = NO. The script calls settlement::mark_resolved(settlement, resolver_cap, outcome, clock, ctx) which:
  1. Asserts clock.timestamp_ms >= settlement.expiry_ms.
  2. Sets final_outcome.
  3. Emits MarketResolved.

Verify

Refresh EventMarketDetail. The hero gets a green/red RESOLVED YES/NO badge and the Redeem panel appears.

User redeem

UI: click Redeem X YES. PTB:
Merges multiple YES coin objects into one before redeeming (single tx for the full basket). Losing-side coins are worthless. The frontend hides them from /positions for resolved markets to remove a misleading “redeem” CTA.

Settlement to dark pool vault

After binary-market:resolve fires, the next keeper tick that runs against a vault on that market flips to settlement mode and sweeps the V3 BM to vault to state == SETTLED. See Vault Deposit Flow step 4.