Expiry & Result Submission
Trading stops at expiry and result resolution begins. This section covers the "happy path" — the oracle resolves cleanly, nobody disputes, and the market settles.
Timeline (mainnet windows)
Expiry
│ anyone may submit the result
▼
SubmitMarketResult ──► status: Result Submitted
│
├─ 24h dispute window: anyone may stake a challenge (next section)
│
▼ no dispute; after the 24h cooling period
SubmitFinalMarketResult ──► status: Settlement (claims open)
On devnet every window shrinks to 5 minutes for testing.
Submit Result (oracle resolution)
After expiry the trading page shows a Submit Result button (in the Info card's Trading Closes row and in the "Trading period ended" notice). Anyone with a connected wallet can click it — typically the creator or a keeper bot.
The frontend then sends two transactions:
- Oracle update: fetches the feed's latest signed quote from Switchboard and verifies it on-chain (a v0 transaction);
- SubmitMarketResult: the program checks that the quote account derives from the market's locked
feed_idand that the data is fresh (within 150 slots), then writes the result:
| Feed value | Result | State change |
|---|---|---|
1 × 10¹⁸ | Yes | → Result Submitted, fees collected atomically |
0 | No | same |
2 × 10¹⁸ or other | Invalid | state unchanged, retry after fixing the feed |
feed_id is written into the market account at creation; result submission accepts only that source — nobody can swap in a different feed to manipulate the outcome.
After the Result Is Submitted
Two countdowns appear in the market header:
- Dispute deadline — end of the dispute window (submission time + 24h). Until then, anyone who believes the result is wrong can stake a challenge;
- Settlement in — expected settlement time (no dispute: submission time + 24h cooling; disputed: the dispute's cooling end time).
The right sidebar now shows the Raise Dispute panel (see Disputes & Voting).
Submit Final Result
If the dispute window passes with no challenge, the sidebar becomes:
Dispute window closed — No disputes were raised. Settlement is now available.
Anyone can click Submit Final Result (SubmitFinalMarketResult); the program confirms the cooling period has elapsed, keeps the oracle result, and moves the market to Settlement — holders of winning tokens can now claim.