Claiming Winnings
This guide explains how settlement works and how to claim your winnings.
Settlement Overview
After a market resolves, winning shares can be redeemed for USDC:
Resolution Process
1. Price Snapshots
The market captures two oracle prices:
| Snapshot | When | Purpose |
|---|---|---|
Start Price (P_start) | At t_start | Reference point |
End Price (P_end) | At t_end | Comparison point |
2. Outcome Determination
The outcome is determined by comparing prices:
Important: Equality (P_end == P_start) resolves to UP.
3. Resolution Finality
Once resolved:
- Outcome is final and irreversible
- No dispute window
- Settlement can begin immediately
Payout Calculation
Winning Shares
| Outcome | Winning Share | Payout per Share |
|---|---|---|
| UP | YES | 1 USDC |
| DOWN | NO | 1 USDC |
Losing Shares
| Outcome | Losing Share | Payout per Share |
|---|---|---|
| UP | NO | 0 USDC |
| DOWN | YES | 0 USDC |
Total Payout
If outcome == UP:
payout = yes_shares × 1 USDC
If outcome == DOWN:
payout = no_shares × 1 USDC
Settlement Process
Step 1: Wait for Resolution
Step 2: Claim Settlement
Settlement is permissionless - anyone can trigger it for any user:
Step 3: Receive Funds
Your USDC is transferred directly to your token account.
Settlement Example
Scenario: You hold 100 YES shares, market resolves UP
Multiple Positions
If you hold both YES and NO shares:
| Your Position | Outcome UP | Outcome DOWN |
|---|---|---|
| 100 YES + 50 NO | 100 USDC | 50 USDC |
| 50 YES + 100 NO | 50 USDC | 100 USDC |
| 100 YES + 100 NO | 100 USDC | 100 USDC |
Note: Holding equal YES and NO guarantees a fixed return regardless of outcome.
Automatic Settlement
Crank-Driven Settlement
Settlement is triggered by crank operators:
- They call
settle_positionfor each user - Earn a small reward for each settlement
- You don't need to do anything
Self-Settlement
You can also settle your own position:
- Call
settle_positiondirectly - Receive your payout immediately
- No waiting for cranks
Position Closure
After settlement, your position can be closed:
Benefits:
- Reclaim rent (~0.002 SOL)
- Clean up blockchain state
Settlement Timeline
Typical settlement flow:
| Time | Event |
|---|---|
| t_end | Trading ends |
| t_end + ~1s | End snapshot captured |
| t_end + ~5s | Market resolved |
| t_end + ~10s | Settlements begin |
| t_end + ~30s | Most positions settled |
Edge Cases
Force Close
If a market fails to resolve within 7 days:
What happens:
- All users get their collateral back
- No outcome is determined
- Market closes without resolution
Oracle Failure
If Pyth oracle is unavailable:
| Scenario | Protocol Behavior |
|---|---|
| Stale at t_start | Waits for valid price |
| Stale at t_end | Waits for valid price |
| Extended outage | Force close after expiry |
Claiming Checklist
- Verify market resolved: Check outcome is set
- Calculate expected payout: Based on your shares and outcome
- Trigger settlement: Call or wait for crank
- Verify receipt: Check USDC balance increased
- Close position: Reclaim rent (optional)
Common Questions
When can I claim?
Immediately after market resolves (outcome != None).
What if I don't claim?
Cranks will settle for you, or you can claim anytime.
Is there a deadline?
You can claim until the market account is closed (7+ days).
What about partial positions?
Entire position is settled at once - no partial claims.
Next Steps
- Understand Risks
- Learn Market Making