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):
| Route | What |
|---|---|
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/:id | one market |
GET /v1/prediction/positions | the EXEC wallet's positions: contracts, average price, mark, value, P&L, claimable |
GET /v1/prediction/orders/:order | an 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:
- Scan: the markets of every category in
prediction.categories. - 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 throughprediction.*goals with a probability and its evidence (seed ruleprediction.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 withprediction.brief_drifton (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). - Edge and stake: edge = blended model − market on the better side
(YES at
buy_yes, NO atbuy_no). A stake is suggested when the edge clearsprediction.min_edge_pct, the market closes withinprediction.max_days_to_close, carriesprediction.min_volume_usdand a spread underprediction.max_spread_pct; size =prediction.kelly_frac× full Kelly on the binary payout ×prediction.max_book_usd, capped atprediction.max_stake_usd, the venue's $5–$250 window and the room left under the book cap. - Paper (
prediction.mode = paper, default): the stake is booked in the engine's own ledger (theaccum_predictiondigest), marked at the market's sell price each scan, sold when the model edge turns negative by more thanprediction.exit_tolerance_pct, and settled at resolution (YES/NO → $1 or $0 per contract). Live: the same order goes through the signer (dry_runwhileprediction.live.dry_runis true), the wallet's positions are read back, claimable winners are claimed. - Digest and feed:
accum_predictioncarries 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
| Goal | Kind | Balanced | Meaning |
|---|---|---|---|
prediction.enabled | bool | false | the switch (every level starts off) |
prediction.mode | enum | paper | paper ledger or live through the signer |
prediction.live.dry_run | bool | true | live orders built unsigned, nothing sent |
prediction.categories | enum | crypto | Jupiter categories scanned |
prediction.scan_mins | min | 15 | scan interval |
prediction.max_days_to_close | d | 45 | longest market staked |
prediction.min_volume_usd | usd | 2 000 | thinnest market staked |
prediction.max_spread_pct | pct | 6 | widest YES spread staked |
prediction.min_edge_pct | pct | 8 | model − market before a stake |
prediction.exit_tolerance_pct | pct | 5 | negative edge tolerated before a paper exit |
prediction.max_stake_usd | usd | 25 | per market (venue window 5–250) |
prediction.max_book_usd | usd | 250 | open cost of the book |
prediction.kelly_frac | frac | 0.25 | share of full Kelly |
prediction.vol_btc_pct / vol_sol_pct / vol_eth_pct | pct | 45 / 75 / 60 | model volatility |
prediction.model_weight | frac | 0.5 | weight of the model against the market price |
prediction.brief_drift | bool | false | use the thesis brief as the path's drift |
Turning it on
- Put a Jupiter API key in the
nexus-appSecret asJUP_API_KEY(the pod env isJUPITER_API_KEY;.secretscarriesJUP_API_KEYandinfra/bootstrap-secrets.shcopies it) (scope: Prediction). Without it every prediction route answers 412 and the Predictions page shows the scan error. solanaExec.prediction.enabled: "1"in gitops (set 2026-10-05, dry-run only).- 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. - Live: pin
prediction.mode = live(orders built, unsigned, underprediction.live.dry_run), thenprediction.live.dry_run = falseandsolanaExec.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_ordersholds every send for reconciliation. - Capital in a position is locked until resolution;
max_days_to_closeis the lever that keeps it short.