Skip to main content

Prediction markets (Jupiter Prediction, 2026-10-05)

Owner brief: "a prediction backend and UI with new goals and rules, with a system to see the probability against a current market, only on-chain via Jupiter". The platform treats prediction markets as one more trading primitive next to spot, limit orders, perps, lending and LP: the signer owns the venue calls and the keys, the worker owns the strategy, the desk sees the result in the comparator, the owner sees it on Trading → Predictions.

What a contract is​

A market asks a yes/no question ("Will Bitcoin be above $150,000 on December 31?"). A YES contract priced at $0.42 pays $1 if the answer is YES and $0 if not, so the price is the market's probability (42 %). Buying $100 of YES at $0.42 holds 238 contracts: +$138 if YES, −$100 if NO. Jupiter aggregates liquidity from Polymarket and Kalshi (and its own 15-minute BTC up/down rounds under the bisonfi provider); orders are $5–$250, settled in USDC, winners paid $1 per contract.

Signer routes (nexus-solana-exec, prediction.rs)​

All under /v1/prediction/*, served only when EXEC_PREDICTION_ENABLED=1 and answering 412 until JUPITER_API_KEY is set (from the Secret key JUP_API_KEY) (the Prediction API is key-gated; keys come from developers.jup.ag/portal and can be scoped to Prediction alone; the free tier is one request per second, so the events read is cached 60 s):

RouteWhat
GET /v1/prediction/events?category=&filter=&provider=&limit=events with their markets, normalised: buy_yes, buy_no, sell_yes, sell_no, p_yes (USD = probability), spread, close_time, status, result, volume_usd, rules
GET /v1/prediction/markets/:idone market
GET /v1/prediction/positionsthe EXEC wallet's positions: contracts, average price, mark, value, P&L, claimable
GET /v1/prediction/orders/:orderan order's fill status (pending / filled / failed)
POST /v1/prediction/order {market_id, is_yes, is_buy, usd, dry_run}Jupiter builds the unsigned transaction; dry_run:true returns the build (contracts, cost, fee) unsigned; otherwise the signer signs and sends it under the policy gate
POST /v1/prediction/claim {position}claim a resolved winner
POST /v1/prediction/close {position}sell every contract of a position

Policy: a buy is prediction_buy (deploys capital, spends USDC, counted against the caps); sell and claim are exits, exempt from pause, never from the kill switch. Every send is recorded in accum_prediction_orders. EXEC_PREDICTION_DRY_RUN_ONLY=1 is the operational interlock: a dry_run:false order answers 403 until the owner flips it in gitops (solanaExec.prediction.dryRunOnly), the same shape as futures. The prediction program must be on EXEC_ALLOWED_PROGRAMS or the semantic gate refuses the transaction; the first live send names the program in its refusal.

The controller (nexus-worker, mob_jobs/prediction.rs)​

Every prediction.scan_mins inside the execute sweep:

  1. Scan: the markets of every category in prediction.categories.
  2. Model: a crypto price question is parsed from the market title, the event title and the rules together (Polymarket titles markets "↑ 90,000" under an event "What price will Bitcoin hit in 2026?"; "by December 31, 2027" under "When will Bitcoin hit $150k?"): asset, level, above/below, and whether the question is a touch ("any 1-minute candle", "hit", "reach" before the date: the reflection-principle probability of the path touching the level) or terminal ("above on December 31": the probability of closing past it). The close time gives the horizon. The model probability is a lognormal price path from the current oracle index: the drift is the thesis brief's forecast on that asset at the nearest horizon (direction and confidence → the drift that makes P(up) over that horizon equal the confidence; no view = neutral) and the volatility is prediction.vol_<asset>_pct. Questions that are not crypto price thresholds (sports, politics, up-or-down rounds) get no model and no stake; the desk may still propose one through prediction.* goals with a probability and its evidence (seed rule prediction.scope). The probability the engine uses is a blend: market + prediction.model_weight × (model − market). The crowd's price is a real prior; at the default weight 0.5 every raw gap is halved, at 1.0 the model is trusted outright. The brief's direction and confidence set the drift only with prediction.brief_drift on (off by default: a driftless path). Both the raw and the blended probability are in the candidate row and on the page (2026-10-05: the first paper scan saw 20–26 point raw gaps on every BTC hit market, which says the model was generous, not that the markets were wrong).
  3. Edge and stake: edge = blended model − market on the better side (YES at buy_yes, NO at buy_no). A stake is suggested when the edge clears prediction.min_edge_pct, the market closes within prediction.max_days_to_close, carries prediction.min_volume_usd and a spread under prediction.max_spread_pct; size = prediction.kelly_frac × full Kelly on the binary payout × prediction.max_book_usd, capped at prediction.max_stake_usd, the venue's $5–$250 window and the room left under the book cap.
  4. Paper (prediction.mode = paper, default): the stake is booked in the engine's own ledger (the accum_prediction digest), marked at the market's sell price each scan, sold when the model edge turns negative by more than prediction.exit_tolerance_pct, and settled at resolution (YES/NO → $1 or $0 per contract). Live: the same order goes through the signer (dry_run while prediction.live.dry_run is true), the wallet's positions are read back, claimable winners are claimed.
  5. Digest and feed: accum_prediction carries the top candidates (market vs model probability, edge, side, stake, reason), the book, the settled results and the realised P&L; fills, settlements and claims page the hygiene channel (🎯 PREDICTION).

Surfaces: Trading → Predictions (candidates table, book, settled), GET /v1/desk/prediction (reading + the prediction.* goals), the assistant's desk_prediction, the comparator's candidate_homes.prediction, a "Predictions" tile in What the AI may use, the prediction goal group on the Goals pages.

Goals​

GoalKindBalancedMeaning
prediction.enabledboolfalsethe switch (every level starts off)
prediction.modeenumpaperpaper ledger or live through the signer
prediction.live.dry_runbooltruelive orders built unsigned, nothing sent
prediction.categoriesenumcryptoJupiter categories scanned
prediction.scan_minsmin15scan interval
prediction.max_days_to_closed45longest market staked
prediction.min_volume_usdusd2 000thinnest market staked
prediction.max_spread_pctpct6widest YES spread staked
prediction.min_edge_pctpct8model − market before a stake
prediction.exit_tolerance_pctpct5negative edge tolerated before a paper exit
prediction.max_stake_usdusd25per market (venue window 5–250)
prediction.max_book_usdusd250open cost of the book
prediction.kelly_fracfrac0.25share of full Kelly
prediction.vol_btc_pct / vol_sol_pct / vol_eth_pctpct45 / 75 / 60model volatility
prediction.model_weightfrac0.5weight of the model against the market price
prediction.brief_driftboolfalseuse the thesis brief as the path's drift

Turning it on​

  1. Put a Jupiter API key in the nexus-app Secret as JUP_API_KEY (the pod env is JUPITER_API_KEY; .secrets carries JUP_API_KEY and infra/bootstrap-secrets.sh copies it) (scope: Prediction). Without it every prediction route answers 412 and the Predictions page shows the scan error.
  2. solanaExec.prediction.enabled: "1" in gitops (set 2026-10-05, dry-run only).
  3. Pin prediction.enabled = true (paper) and read the page for a few days: the candidates table shows where the model and the market disagree and why a stake was or was not suggested.
  4. Live: pin prediction.mode = live (orders built, unsigned, under prediction.live.dry_run), then prediction.live.dry_run = false and solanaExec.prediction.dryRunOnly: "0"; allow-list the prediction program when the first send names it.

Honest limits​

  • The model is a lognormal with a hand-set volatility and the brief's drift: a reasonable prior, not an edge by itself. Markets priced by Polymarket and Kalshi crowds are efficient on headline questions; the stake sizing (quarter Kelly, $25 cap) assumes the model is often wrong.
  • Only crypto price thresholds are modelled. Everything else is listed for the desk and the owner.
  • Live fills are read from Jupiter's positions, not from the chain; the signer's accum_prediction_orders holds every send for reconciliation.
  • Capital in a position is locked until resolution; max_days_to_close is the lever that keeps it short.