Market Lifecycle

Strike has two lifecycle models: FBA orderbook markets and parimutuel pool markets. Orderbook markets transition through these states:

Open → Closed → Resolving → Resolved
                          ↘ Cancelled

States

Open

  • Orderbook accepts orders (place, cancel)

  • Batch clearing runs at configured intervals (60s default)

  • Transition: automatically enters Closed when block.timestamp + batchInterval >= expiryTime

Closed

  • No new orders accepted — the final batch has cleared

  • Existing orders can still be cancelled (to free collateral)

  • Transition: anyone submits a valid Pyth resolution via resolve() → enters Resolving

Resolving

  • Resolution has been submitted with signed Pyth price data

  • Finality gate: the protocol waits for a 90-second finality period (FINALITY_PERIOD = 90 seconds) before finalizing

  • Challenge window: during this period, anyone can submit an alternative Pyth update that would change the outcome; the contract deterministically picks the earliest valid publishTime within the settlement window

  • Transition: finalizeResolution() called after finality window → enters Resolved

Resolved

  • Outcome is final (UP or DOWN)

  • Winning positions pay out automatically at $0.01 per lot

  • Losing positions are worthless

Cancelled

  • Triggered if no valid Pyth update is submitted within the maximum resolution window (24h)

  • Also triggered if confidence interval exceeds threshold at resolution time

  • All collateral is refunded

Admin Fallback

The admin can call setResolved() as a fallback to skip the 2-step resolve/finalize process. This is intended for emergency situations only (e.g., Pyth feed failure, stuck resolution).

Timeline (5-minute market, 60s batch interval)

Parimutuel Pool Lifecycle

Parimutuel markets use a separate pool lifecycle:

Open

  • Users can buy into any outcome pool.

  • Buying is allowed until tradingCloseTime.

  • Pool probabilities and projected payouts update as users buy.

Closed

  • No new buys are accepted.

  • The market waits until resolutionTime before resolver paths can finalize the outcome.

  • This split lets betting close before the event itself is over.

Resolving

  • Admin, AI, or Pyth resolution determines the winning outcome.

  • AI markets can go through request/proposal/challenge/finality before confirmation.

  • Pyth markets evaluate the configured feed/thresholds at resolutionTime.

Resolved

  • The winning outcome is final.

  • Winners claim principal plus their pro-rata share of losing pools.

Invalid / Cancelled

  • Used when the market cannot be fairly resolved or is explicitly invalidated.

  • Users refund principal.

Last updated