Settlement#
How winnings are distributed after a market resolves: the payout rules, the claim flow, the 7-day deadline, and every safety net in between.
For the user-facing walkthrough, see Claiming Winnings. For where the money physically sits at each step, see Flow of Funds.
Settlement flow#
Payout rules#
Settlement follows the accepted Pyth snapshot rule for the market (see Oracle Integration). If the end snapshot is greater than or equal to the start snapshot, YES wins; otherwise NO wins. The market creator does not choose or edit the outcome.
| Outcome | YES pays per share | NO pays per share |
|---|---|---|
| UP (end ≥ start) | 1.0000 USDT | 0 |
| DOWN (end < start) | 0 | 1.0000 USDT |
| EXPIRED (oracle outage) | 0.5000 USDT | 0.5000 USDT |
Formally: payout = shares × rate_bps / 10000, rounded down
(UP: YES = 10000 bps / NO = 0; DOWN: inverse; EXPIRED: 5000 / 5000). The
floor rounding — like fee ceiling rounding — always favors vault solvency.
What Redeem actually does#
Redeem (0x1A) is the single claim instruction, and one call settles
everything you're owed:
- Winning shares are paid at the outcome rate. Internal trader-ledger free shares are redeemed first; any remaining amount burns SPL share tokens from your wallet.
- Your free ledger balance (
quote_free) is drained to your wallet in the same call. - Unfilled buy-order collateral is released. After resolution, the collateral that was still locked under resting buy orders that never filled comes back with your payout.
The vault is an SPL token account owned by the market PDA, so the payout transfer is a CPI signed by the market's PDA seeds — no human key can move it.
Outcome encoding#
Outcome is None = 0 (unresolved sentinel), Up = 1, Down = 2,
Expired = 3. Redemption requires a terminal outcome; calling Redeem on
an unresolved market fails.
Example scenarios#
Scenario 1: Full win#
Alice: 100 YES, cost basis 60 USDT (bought at 0.60)
Market resolves UP
Payout: 100 × 1.00 = 100 USDT → profit 40 USDT (+67%)
Scenario 2: Full loss#
Bob: 50 NO, cost basis 20 USDT (bought at 0.40)
Market resolves UP
Payout: 0 → loss 20 USDT (−100%)
(Claiming still returns any unfilled buy-order collateral.)
Scenario 3: Mixed position#
Carol: 80 YES + 30 NO, cost basis 55 USDT
Market resolves UP
Payout: 80 × 1.00 + 30 × 0 = 80 USDT → profit 25 USDT
Scenario 4: Expired market#
Dana: 100 YES, cost basis 52 USDT
Oracle unavailable through the expiration window → EXPIRED
Payout: 100 × 0.50 = 50 USDT (both sides redeem at 50%)
The 7-day deadline#
Claim within 7 days of resolution. This is the most important rule in settlement.
| Window | Who can settle your position | What happens to your funds |
|---|---|---|
| Days 0–7 after resolution | Only you (Redeem) | Full payout: winning shares, free balance, unfilled bid collateral |
| After day 7 | Anyone (MarkPositionSettled, 0x1C) | A permissionless sweep pays your redeemable value to you — but nobody is obligated to run it, and abandoned unfilled-bid collateral can be terminally forfeited |
Teardown (CloseMarket, 0x1E) | Anyone | Whatever is still unclaimed (vault dust + terminal-forfeit balances) is swept to the market creator — permanently |
MarkPositionSettled exists so abandoned positions can never brick a
market's teardown: it computes exactly what Redeem would have paid and
transfers it from the vault to the position owner's settlement
account — never to the caller. The 7-day grace window before it activates
prevents third parties from front-running a live user's own claim.
See Risks for the full risk framing.
Expired markets: ForceClose#
If a market is stuck unresolved past its expiration window (nobody
captured an end price and ExpireMarket hasn't run or couldn't resolve),
ForceClose (0x1B) is the per-position escape hatch:
- Permissionless: anyone can call it, but the refund goes to the position owner's token account.
- Refunds the position's locked, unfilled bid collateral and unwinds locked sell-order escrow.
- Position locks are zeroed atomically — no double refund is possible.
- The 50/50
Redeempath remains available for the shares themselves once the market is expired.
Solvency guarantee#
Shares only come into existence via pair-minting (one stablecoin unit in the vault per YES+NO pair), only one side wins, and a runtime solvency assertion runs after every settlement transfer. Share totals count both SPL supply and internal trader-ledger share buckets. See invariants (INV-V1..V3).
Claiming#
For step-by-step instructions on how to claim via the web app, CLI, and SDK, see Claiming Winnings.
Rent recovery#
| Account | Rent returns to | Trigger |
|---|---|---|
| Position | Position owner | ClosePosition (0x1D) — permissionless, after the position is settled |
| Market / orderbook / vault / escrows / trader ledger | Market creator | CloseMarket (0x1E) teardown |
A trader's full round trip costs only transaction fees — position rent comes back when the position closes.
Market closure#
CloseMarket (0x1E) is the terminal teardown. Its gate requires all
of:
- Market resolved, and at least 7 days elapsed since
resolved_at(CLOSE_TIMEOUT_SECONDS) - Every position settled (
settled_positions == total_positions) - Zero outstanding share supply (no unredeemed YES or NO tokens)
- Creator fees fully disbursed (
accumulated_creator_fees == 0)
Then the vault's residual dust and any terminal-forfeit balances sweep to the market creator, all market accounts are closed, and their rent returns to the creator.
Settlement fees#
There is no settlement fee. The only protocol fee is the taker fee at trade time (see Fee Structure).
| Operation | Cost |
|---|---|
| Redeem | Solana transaction fee only |
| Payout rounding | Floored (sub-unit dust stays in vault) |
| Rent | Returned at close |
Related docs#
- Claiming Winnings — user walkthrough + deadline FAQ
- Flow of Funds — where the money sits at every stage
- Risks — the unclaimed-funds risk in detail
- Oracle Integration — how the outcome is determined