Oracle and settlement data sources
ezpz.fi does not use Solana-native oracle networks (Pyth, Switchboard, etc.) to resolve markets for now. Settlement is a two-step process:- Off-chain truth gathering which is to gather feeds, crons, and operators determine the outcome.
- On-chain settlement where a trusted platform oracle signs
resolve_marketonauthoring-market, which records the winner and enables redemption.
By vertical
Every market declares a resolution source and criteria at creation. Operators (or automated crons for factory markets) must follow that declaration. Disputes are handled off-chain in oracle-admin; on-chain,
dispute_market / uphold_resolution / overturn_resolution gate redemption.Solana-native vs off-chain oracles
How positions are represented
Single-market predictions (SPL tokens)
Player positions on binary markets are real SPL tokens, not opaque database balances:- Each market leg has a YES mint and a NO mint (
anchor_spl::token::Mint). - When a player makes a prediction, USDC is converted to a complete set (YES + NO) via
mint_tokens/mint_tokens_v2, then the unwanted side is swapped via the AMM. - Tokens sit in the player’s custodial token account (ATA) managed by the platform.
- Portfolio and the API project on-chain balances; the indexer mirrors mint, swap, and redeem events.
redeem to burn winning tokens and receive USDC from the market vault.
Parlays on-chain program accounts
Parlay predictions are not outcome SPL positions. They are recorded inParlay accounts on authoring-parlay:
- Stake is USDC in the parlay LP pool.
- Legs reference underlying markets;
resolve_legreads each market’s on-chain outcome. - Payout is USDC from the parlay pool via
settle_parlay.
CLOB positions (future / v2)
CLOB inventory is also SPL-based: makers hold USDC and outcome tokens in ATAs with exchange-delegate approval soauthoring-exchange::settle_match can move tokens atomically after off-chain matching.
Solana-native dependencies
ezpz.fi keeps on-chain dependencies minimal. There is no Jupiter swap integration, no Pyth price feed, and no external AMM router in the settlement path.
External off-chain data (not Solana programs):
- Polymarket Gamma / CLOB WebSocket (sports + crypto reference data)
- pump.fun APIs (coin markets)
- Spot exchanges (Coinbase, Kraken, etc.) for charting where configured
- Supabase (auth), PostgreSQL (app + indexer state)
On-chain update frequency and price feeds
Prices are not posted on-chain on a schedule.
There is no requirement for sub-second on-chain price updates. The AMM price at trade time is whatever the pool math returns for that transaction.
On-chain vs off-chain components
Source of truth for funds: Solana programs. Postgres and the indexer are projections of on-chain events, not authoritative ledgers for USDC custody.
Pricing model
M1 retail trading uses an automated market maker (AMM), not a central limit order book.
LS-LMSR is a bonding-curve-style market maker: the pool maintains a cost function over outstanding quantities rather than a traditional order book. It is not a Uniswap-style constant-product pool once upgraded.
What runs where: pricing, matching, odds, settlement
End-to-end: single AMM prediction
- Off-chain: Player confirms trade in UI; API checks balance and market status.
- On-chain: Custodial signer submits
swap(which CPIsmint_tokens_v2+ AMM math). - On-chain: Player holds YES or NO SPL tokens in custodial ATA.
- Off-chain: After event ends, operator or cron determines winner.
- On-chain:
resolve_market→ dispute window →redeempays USDC from market vault.