How It Works#
Purpose: This section explains how the Seesaw protocol behaves — the lifecycle a market moves through, how prices are determined, and why outcomes are trustworthy — so you can reason confidently about what will happen and why. It is not a how-to; for step-by-step instructions see For Traders or the SDK docs.
How a Seesaw market works end to end: the lifecycle, oracle integration, order matching, and settlement.
The Core Concept#
Seesaw creates binary prediction markets - markets with exactly two outcomes:
Market Timing#
Each market gets its own trading window when its creation transaction lands.
Durations range from 60 seconds to 7 days (default: 15 minutes). The creator
supplies a positive Unix-microsecond market_id as a stable identity; it does
not schedule the market or determine its timestamps. On-chain creation records
the actual landing time as t_start and sets t_end = t_start + duration:
market_id = creator-chosen positive Unix-microsecond identity
t_start = creation transaction's landed Clock timestamp
t_end = t_start + duration_seconds
Example Timeline (UTC) — 15-minute markets#
| Market ID (identity) | Start Time | End Time | Status |
|---|---|---|---|
| 1720000000000001 | 14:03:12 | 14:18:12 | TRADING |
| 1720000000000002 | 14:07:45 | 14:22:45 | TRADING |
| 1720000000000003 | 14:18:12 | 14:33:12 | PENDING |
Markets for the same asset and duration can overlap when created at different times; markets with different durations can also run concurrently.
Complete Lifecycle#
Note:
create_marketatomically initializes the market account and captures the start price from Pyth, transitioning through the transientCREATEDstate directly intoTRADING.
expire_marketuses committed snapshots and the configured deadline. It does not accept a late price update. Missing end evidence produces neutralEXPIRED; valid committed intervals can still produce UP or DOWN. See Oracle Integration.
State Details#
| State | What Happens | Duration |
|---|---|---|
| PENDING | No on-chain account yet | Until created |
| TRADING | Order book active, trades execute | Market's duration |
| SETTLING | End price captured, computing outcome | Seconds |
| RESOLVED | Outcome determined, redemptions available | ≥ 7 days, until close_market |
| EXPIRED | Oracle unavailable; 50/50 redemption | Until positions settle |
| CLOSED | All accounts closed, rent reclaimed | Final |
Price Mechanics#
Shares are priced between 0 and 1 USDT (stored as basis points internally):
The Probability Relationship#
Since YES and NO are complementary:
P(YES) + P(NO) = 100%
If YES trades at 0.60:
└── Implied P(UP) = 60%
└── Illustrative NO fair value = 0.40
This is a fair-value/probability relationship, not a constraint on live order quotes. A YES order and a NO order are independently quoted in their own outcome price spaces; the program does not complement or synthesize a counterparty price.
Order Book Mechanics#
Each market has one order-book account with two outcome lanes, YES and NO. You send an outcome, an intent, and a price in that outcome's own price space; the program stores the price unchanged and matches only inside that outcome's lane (Buy YES ↔ Sell YES, Buy NO ↔ Sell NO). For the stored-side table, order types, tick-rounding rules, and matching algorithm, see Order Book.
Oracle Integration#
Seesaw uses Pyth Network for price data:
Sampling Rules#
Start Price (P_start):
- Authenticated positive Pyth update supplied during creation, no more than
60 seconds old at the landed Clock time; its publish time may precede
t_start - Immutable once captured
End Price (P_end):
- First Pyth update where
publish_time >= t_end - Must have positive price
- Immutable once captured
Resolution Logic#
start_interval = [start_low, start_high]
end_interval = [end_low, end_high]
if end_low > start_high:
outcome = UP
elif end_high < start_low:
outcome = DOWN
else:
outcome = EXPIRED
Intervals are normalized to a common exponent first. Equality, touching,
overlap, missing data, and checked-arithmetic failure are neutral EXPIRED and
pay both binary legs at 5000 bps. A point-price jump guard remains a separate
snapshot validation step.
Collateralization#
Every share in circulation is backed 1:1 by USDT. Shares are created only by pair-minting: depositing 1 USDT into the market vault mints 1 YES and 1 NO. Trades then move those already-backed shares between users — a fill is an escrow transfer, never a mint:
For the complete picture of where money sits at every stage, see Flow of Funds.
Solvency Invariant#
The vault always holds enough to pay all possible winners:
vault_balance >= max(total_yes_shares, total_no_shares) + accumulated_creator_fees
This ensures the protocol can always settle regardless of outcome.
Fee Structure#
Seesaw uses a linear taker fee, taker_fee_coefficient_bps × (10000 − p) / 10000,
with no cap. Takers pay the fee;
eligible resting makers receive a separately floored maker rebate, while
ineligible maker allocation, forfeited referral allocation, and rounding dust
remain with protocol, as does the builder allocation of an order that names no
approved builder. The shipped split is 45% protocol / 5% creator / 5% referral
/ 5% approved builder / 40% eligible maker rebate. Eligible makers receive free quote
balance.
For the full fee and split tables, see Treasury and Fee Split.
Settlement Process#
After resolution, winners claim their payouts.
Claim promptly after resolution. After seven days, permissionless cleanup can pay the owner, but no keeper must submit it. Unpaid trader liabilities block teardown. See Settlement for cleanup requirements.
Related Documentation#
- Order Book Details - How the matching engine works
- Slippage & Fill Estimation - How fill previews, price impact, and slippage are computed
- Oracle Integration - The Pyth push-vs-pull deep dive: sampling, validation, and the 2026 cutover
- Settlement Rules - Claim process, the 7-day deadline, and edge cases
- Flow of Funds - Where your money lives at every stage
- Settlement Tokens - Admitted tokens, decimals 6 to 9, and atoms
- Maker Price Band - How resting maker prices are constrained
- Referrals - On-chain attribution and payout for the referral allocation
- Treasury and Fee Split - How the 45% protocol-treasury slice routes to 8 admin-configured accounts