Call it. The oracle settles it. Parimutuel prediction markets on Solana, settled by Pyth.
Two ways to play, one program:
- Rounds (PancakeSwap-style): UP or DOWN against the price at the start of the round. 5 and 15 minute rounds on SOL and BTC.
- Markets (Polymarket-style): "Will SOL be above $72.5 at 15:00 UTC?" YES or NO, from one hour out.
Players fund each other. The program never takes a side, so there is no house balance for a whale to drain. Every pot has a cap, and only coins with a Pyth feed are listed, so pushing the price past the line costs more than the prize.
| Code | https://github.com/ivorylaunchpad/flipcall (MIT) |
| Video | 40 s demo, includes a real devnet round from bet to claim (also at https://flipcall-three.vercel.app/media/flipcall-demo.mp4) |
| Keeper | Runs 24/7 on a server as a capped systemd service (deploy/KEEPER-TO-VPS.ps1) |
| App | https://flipcall-three.vercel.app (open the Live tab, connect Phantom or Solflare on devnet) |
| Program | 5HsivqE6TinrxByfqjQHYr5Nu3pC7NyUj5GE4fVsXTSb |
| Price source | Pyth PriceUpdateV2 accounts (SOL/USD, BTC/USD sponsored feeds on devnet) |
| Fee | 3% of the pot, only when a side wins (refunds are free) |
| Min bet / pot cap | 0.01 SOL / 5 SOL per market |
An end-to-end run on devnet (live/e2e.js, 2 Dec 2026): two players bet UP 0.03 and DOWN 0.01, a late bet was refused, the round locked at Pyth $72.1459 and settled at $72.0156, DOWN won and was paid 0.0388 SOL (pot minus 3%), the loser got 0, and the creator collected 0.0012 SOL.
keeper (or anyone) player wallet FlipCall program Pyth receiver
| create market ----------------------------------> market PDA ["m", creator, id]
| | bet (side, SOL) ------> bet PDA ["b", market, player], SOL into market
| lock (UP/DOWN) -- price account -----------------> reads PriceUpdateV2, records start price
| settle -------------- price account -------------> reads PriceUpdateV2, decides winner
| | claim ----------------> pays winner pro rata, closes bet account
Settle rules, enforced on-chain:
- The price must come from an account owned by the Pyth receiver, fully verified, for the market's own feed id, and published within 180 s after the target time.
- One side empty, an UP/DOWN tie, or no start price recorded: everyone is refunded.
- Nobody settled within 10 minutes of close: anyone can void the market and everyone is refunded.
- Payout = pot × (1 − fee) × your stake / winning side. Paid from the market account, never below its rent floor.
Lock, settle and void are permissionless. The keeper in this repo just does them on time.
| Path | What it is |
|---|---|
program-lite/src/lib.rs |
The deployed native Solana program (no Anchor, ~400 lines, 7 instructions). Built and deployed with Solana Playground's native template |
program/src/lib.rs |
The same rules written with Anchor (builds; not deployed, it costs 2.5× more rent) |
live/flipcall.js |
Client library: PDAs, instruction builders, account and Pyth decoders (Node and browser) |
live/live.js |
The page's live layer: real Pyth prices, on-chain markets, wallet bet and claim |
keeper/keeper.js |
Opens rounds and hourly markets, locks, settles, voids, collects fees |
live/test-client.js |
7 checks of the client library, including live devnet Pyth reads |
live/e2e.js |
Full bet → lock → settle → claim → fee run on devnet |
index.html |
The app. Demo mode anywhere; live on-chain mode where it can reach a Solana RPC |
vendor/web3.iife.min.js |
@solana/web3.js 1.98.4 browser bundle (MIT), used by the page and the keeper |
deploy/KEEPER-TO-VPS.ps1 |
Puts the keeper on a Linux server as a capped systemd service |
Nothing to install beyond Node 18+ and a static file server. @solana/web3.js 1.98.4 ships as its official one-file bundle in vendor/, so there is no npm install (set WEB3_PATH to use an installed copy instead).
# the app (live mode turns on automatically when the RPC is reachable)
python -m http.server 5799 --directory .
# keeper: opens markets and settles them (devnet wallet in keeper/keeper-devnet.json)
node keeper\keeper.js
# tests
node live\test-client.js
node live\e2e.jsConnect Phantom or Solflare with a devnet balance, open the Live tab, pick a side, sign.
- Devnet only. Devnet SOL has no value. Nothing here has been audited.
- Coins on-chain today are SOL and BTC, the two feeds Pyth keeps fresh on devnet. ETH and the memecoins (PENGU, TRUMP, BONK, WIF, FARTCOIN, PNUT) need a Pyth pull update posted at settle time; the program already accepts that, the keeper does not post one yet. In the app they run in demo mode.
- The Markets and Rounds tabs are a simulation that starts from a real price snapshot. The Live tab is the real on-chain game.
- The AI co-pilot is a volatility model, not a trained predictor. It shows when the crowd's price disagrees with a simple model.
- The fee goes to whoever created the market (the keeper wallet here).