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 source-derived confidence-aware Pyth snapshot rule (see Oracle Integration). The program first validates the snapshots, then compares their uncertainty intervals after exponent normalization:
The market creator does not choose or edit the outcome. Equality, touching, or overlap is neutral; a point-price comparison or an order price is not the resolution rule.
| Outcome | YES pays per share | NO pays per share |
|---|---|---|
UP (end_low > start_high) | 1.0000 USDT | 0 |
DOWN (end_high < start_low) | 0 | 1.0000 USDT |
| EXPIRED (neutral fallback) | 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.
The app surfaces this boundary rule's result on the market detail page as the "settlement print" (start price, end price, delta, outcome) once a market resolves — see Market Detail Fields → Settlement Print for what that field shows and where it comes from.
What Redeem actually does#
Redeem (0x17) is the claim instruction, and one call settles the amount and
lifecycle surface supplied by the caller:
- 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 | You (Redeem, 0x17) | Winning shares, free balance, and unfilled bid collateral are paid or released according to the authenticated outcome |
| After the close timeout | Anyone (MarkPositionSettled, 0x19) | A permissionless sweep pays your redeemable value to you; abandoned liabilities can still block teardown until their prescribed path is run |
Teardown (CloseMarket, 0x1B) | Anyone | After the required position, fee, ledger, and vault gates pass, residual dust is swept to the market creator and market accounts close |
MarkPositionSettled pays the owner's remaining authoritative ledger entitlement after the grace period.
It transfers payment to the owner's valid settlement-token account, never to the caller.
Live locks, missing destinations, or other unpaid liabilities can still block cleanup.
Previously paid ForceClose amounts and position mirrors are not paid again.
Wallet bearer shares remain a separate liability.
See Risks for the full risk framing.
Unresolved markets: ForceClose#
If a market remains unresolved past its expiration window (nobody captured
an end price and ExpireMarket has not produced a terminal outcome),
ForceClose (0x18) is the per-position escape hatch:
- Permissionless: anyone can call it, but the refund goes to the position owner's settlement-token account.
- It refunds only the position's remaining unfilled bid collateral.
- It rejects residual ask-side share locks because this route does not carry the user share ATAs needed to return escrowed shares safely.
- It does not redeem, burn, or pay a 50/50 share payout. Owned YES/NO shares
remain on the position for
Redeemafter the market reaches a terminal outcome. IfExpireMarketlater writesEXPIRED,Redeemapplies the source-defined 50/50 rate to those shares;ForceCloseitself does not.
ForceClose compute budget#
One ForceClose page can scan up to 512 book nodes and remove a full batch
of 6 orders. The costliest page measures about 829,297 CU (golden
force_close.full_scan_batch_terminal in program/cu-benches/golden.toml).
That is over 4x the runtime's default of 200,000 CU per instruction, so a
transaction without a compute-unit limit fails on a deep book.
Every ForceClose transaction must start with
ComputeBudget::SetComputeUnitLimit(FORCE_CLOSE_COMPUTE_UNIT_LIMIT). The
limit is 1,000,000 CU. It covers the golden plus its 10% regression tolerance
and stays under the 1.4M transaction cap. The authority is
FORCE_CLOSE_COMPUTE_UNIT_LIMIT in program/src/constants.rs. The client
SDKs mirror it, and each SDK has a parity test that fails if its copy drifts
from the program constant or falls below the golden ceiling:
| Client | How the limit is attached |
|---|---|
| TypeScript | forceClose() returns computeUnitLimit, computeBudgetInstructions, and instructions (prelude + ForceClose). computeBudgetPrefixFor(0x1C) and computeUnitLimitForInstructions() return the same limit. |
| Rust | seesaw_sdk::compute_budget::FORCE_CLOSE_COMPUTE_UNIT_LIMIT; force_close(..)?.transaction_instructions(). |
| Python | seesaw.FORCE_CLOSE_COMPUTE_UNIT_LIMIT; force_close(...).transaction_instructions. |
| Web/mobile | The web app passes computeUnitLimit to its sender. The mobile app prepends the instruction. |
| CLI | seesaw market force-close prepends the limit to every page it submits. |
A cranker that assembles its own ComputeBudget instructions (for example, to
add a priority fee) must request at least this limit and must not add a
second SetComputeUnitLimit. The runtime rejects a transaction that
contains two.
Solvency guarantee#
The reserve is computed from the canonical economic claim counters, quote free/locked liabilities, creator/referral/protocol fee liabilities, and any spline commitment. Terminal weights are used only after an authenticated outcome is available. Shares are not represented by a single SPL balance: wallet tokens, internal trader-ledger buckets, and spline inventory must be reconciled together. See invariants for the full reserve contract.
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 (0x1A) — permissionless, after the position is settled |
| Market / orderbook / vault / escrows / trader ledger | Market creator | CloseMarket (0x1B) teardown after the close gates pass |
A trader's full round trip costs only transaction fees — position rent comes back when the position closes.
Market closure#
CloseMarket (0x1B) 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 residual vault dust goes to the creator. Market accounts close and return their rent.
The legacy terminal-forfeit name does not mean creator capture of trader principal.
Removed bids release locked collateral to the owner's free balance.
Removed asks burn escrow shares and credit their terminal payout to the owner.
See economic examples and fixtures.
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