Outcome Market Making

openbroker outcome-mm runs paper market-making experiments on the HIP-4 prediction markets that settle on a Hyperliquid perp: binaryPrice / priceBinary ("BTC above 64,000 at 08:00?") and priceTouch ("HYPE touches 95 by Dec 1?"). It never places orders and needs no private key. It quotes every matching market around a model fair value, delta-hedges the net book on the perp the market settles on, and simulates fills against the real trade prints — so you can measure whether the edge survives before committing capital.

Requires OpenBroker 1.14.0+ (npm install -g openbroker@latest).

How it works

A perp-linked outcome is an option on a perp you can already trade:

  • "BTC above K at T" pays $1 if the settlement TWAP of the BTC perp is above K — a digital option.
  • "HYPE touches H by T" pays $1 as soon as the HYPE perp TWAP reaches H — a one-touch option.

The market maker earns the spread by quoting both sides around fair value. The risk is being left holding one side when the underlying moves, so the net position is delta-hedged with the same perp the market settles on — there is no basis between the hedge and the settlement price. Opposite positions across strikes on the same underlying net out before hedging, which keeps hedge fees down.

What breaks it: a wrong fair value (everyone trades against you), pin risk close to expiry (the hedge size swings wildly when price sits on the strike), and faster traders picking off stale quotes. The paper runner models all three so they show up in the results.

Quick start

Terminal
openbroker outcome-mm start --id btc-eth --underlyings BTC,ETH    # background run
openbroker outcome-mm watch btc-eth                               # live dashboard
openbroker outcome-mm report btc-eth                              # results so far
openbroker outcome-mm stop btc-eth

start launches the runner in the background and returns once it is quoting; the run keeps going after you close the terminal.

Managing runs

Every run is a named experiment. Any terminal (or agent) can inspect and control any run.

Terminal
openbroker outcome-mm list                  # every run: status, quoting, fills, edge, fees, P&L
openbroker outcome-mm list --json           # same, machine-readable
openbroker outcome-mm status btc-eth        # one-shot dashboard (--json for the full state)
openbroker outcome-mm pause btc-eth         # pull all quotes; keep hedging + settling inventory
openbroker outcome-mm resume btc-eth
openbroker outcome-mm stop btc-eth          # graceful stop; --force if a runner is stuck
openbroker outcome-mm logs btc-eth --follow
openbroker outcome-mm rm btc-eth            # delete a stopped run
openbroker outcome-mm run --id dbg --duration 30m   # same runner in the foreground (containers, debugging)
Example output (illustrative numbers)
id       status     mode    age  quoting  fills    edge   fees   total  peakCap
btc-eth  ● running  daemon   2h    52/73     41  $48.10  $3.92  $31.75  $1840.22
wide     ❚❚ paused  daemon   5h     0/124    63  $97.44  $9.10  $22.08  $3310.90

Pause pulls every quote so no new fills happen, but the runner keeps hedging, settling, and marking what it already holds — use it to stop adding risk without abandoning a book.

Runs are stored under ~/.openbroker/outcome-mm/runs/<id>/: meta.json (how it was started), control.json (desired state written by the CLI), state.json (snapshot + heartbeat every 2s), journal.jsonl (every fill, hedge, settlement, and markout), and runner.log. Set OPENBROKER_OUTCOME_MM_DIR to relocate the store. A run whose heartbeat goes stale is shown as dead — check logs for the reason.

The dashboard

outcome-mm watch <id> refreshes every second. Keys: p pause · r resume · s s stop (press twice) · q quit (the run keeps going).

Example output (illustrative numbers)
outcome-mm · btc-eth  ● running  mainnet · daemon · up 2h · heartbeat 1s ago · PAPER
 
TOTAL $31.75   settled $12.40   open MTM $19.35   edge@fill $48.10   fees $1.20 outcome + $2.72 hedge (14)
markets 73 · quoting 52 · fills 41 · volume $2310.55 · capital $1210.40 (peak $1840.22)
fees (userFees): maker close 4.0bps×(1+scale) · settle 7.0bps×(1+scale) · hedge 4.5bps
 
underlying  vol src   σ1d  σ7d  yesPos  hedge      netΔ    pnl
BTC         volmex    91%  47%     -54  $864.27   -$4.24  $18.02
ETH         volmex   124%  63%     100  -$1735.1  $20.76  $13.73
 
outcome  market        exp    book bid/ask    our bid/ask     fv      model   σ    pos  fills  pnl
  40522  BTC >63577    2.8h   0.5410/0.6020   0.5618/0.5918   0.5768  0.5768  91%  -54      6  $4.10
  40265  ETH >1799.1   16.8h  0.5750/0.6099   0.5423/0.5750   0.5573  0.5221  124% 100      3  $2.86

Pricing and volatility

Digitals are priced as N(d₂) and touches with the one-touch reflection formula, under a driftless lognormal model. The settlement TWAP window (60–90s for most markets, 3s for touches) shortens the effective horizon near expiry.

Volatility comes from Volmex implied-vol indices where they exist — BVIV (BTC), EVIV (ETH), SVIV (SOL), XVIV (XRP) term structures and HYVIV14D (HYPE) — refreshed every few minutes from Volmex's public datafeed and interpolated in total variance to each market's own expiry. Underlyings Volmex doesn't cover (xyz equities and commodities, ZEC) fall back to 14-day realised EWMA vol from Hyperliquid candles.

When the real order book is tight (within 5c), fair value blends the model with the book mid (--anchor, default 0.5). On wide or empty books it uses the model alone, and those fills are tagged (model) in reports.

Short-dated implied vol is often around twice the 7-day level (e.g. BVIV1D 93% vs BVIV7D 47%), which prices daily digitals much wider than the book does. Watch the (model) bucket and compare against a --vol-source realized run before trusting edge on dailies.

Fill model

  • Quotes are maker-only and never cross the real book.
  • A real print fills a virtual quote only if it trades at or through our price and we would have had queue priority — our price was strictly better than the real best, or the print went strictly through us. Fills happen at our price.
  • The quote in force at a print is the one computed --latency-ms earlier (default 300ms), so pick-offs after a perp move are recorded as adverse fills.
  • No quoting within --min-minutes of expiry, when fair value is outside 3–97%, or when the hedge per share would dwarf the premium (--max-dd).
  • Every fill is marked again 60s and 300s later (markouts) to measure adverse selection.

Fees

Hyperliquid's outcome fees aren't published as a rate, so OpenBroker uses the model measured from public outcome fills:

ActionFeeBase tier
Buy / SplitOpening a position or splitting quote into Yes + Nofree
Sell (maker)userSpotAddRate × (1 + deployerFeeScale)≈ 8 bps
Sell (taker)userSpotCrossRate × (1 + deployerFeeScale)≈ 14 bps
Settlement / MergeuserSpotCrossRate × (1 + deployerFeeScale), on the payout≈ 14 bps

Defaults shown are base tier on a deployer market (deployerFeeScale 1.0, most markets); Hyperliquid's own recurring markets have no scale and pay half. With --fees auto (default) the runner reads your account's rates from userFees and each market's scale from outcomeMeta. Perp hedges pay your perp taker rate plus --hedge-slip-bps.

Reading reports

Terminal
openbroker outcome-mm report btc-eth
Example output (illustrative numbers)
group                           fills      volume   edge@fill      mo@60s    mo@300s  closeFees
BTC digital                        18    $1020.40      $22.10      $14.02      $9.80      $0.31
HYPE touch                          9      $28.95      $11.13       $4.49      $3.12      $0.00
ETH digital (model)                 6     $410.10      $19.40      -$2.20     -$8.90      $0.12
 
Spread edge at fill:  $52.63  (vs blended fair value at the moment of fill)
Markout @60s total:   $16.31  (edge left after the market moved — adverse selection shows up here)
Outcome fees:         $0.43 on closes + $0.77 at settlement
Hedge fees:           $2.72  over 14 rebalances
Settled outcome P&L:  $12.40
  • edge@fill — distance from our own fair value when filled. Optimistic by construction.
  • mo@60s / mo@300s — what that edge was worth after the market moved. A big drop from edge to markout means you are being picked off.
  • (model) rows — fills on books too wide to anchor to; the most likely place for model error.
  • Settled P&L is the ground truth. Annualised run-rates are only shown after 6h, and stay noisy until many markets with inventory have settled.

Experiment workflow

Run variants side by side, changing one parameter each, and compare them in outcome-mm list:

Terminal
openbroker outcome-mm start --id vol-volmex
openbroker outcome-mm start --id vol-realized --vol-source realized
openbroker outcome-mm start --id anchor-heavy --anchor 0.2
openbroker outcome-mm start --id weeklies-only --min-minutes 1440
openbroker outcome-mm start --id btc-tight --underlyings BTC --edge 0.01 --duration 7d

Flags

FlagDescriptionDefault
--idRun name (letters, digits, . _ -)omm-<timestamp>
--underlyingsOnly these underlyings, e.g. BTC,ETH,xyz:GOLDall
--kindsdigital, touch, or bothboth
--max-hoursSkip markets expiring later than this336
--no-pythSkip Pyth-settled markets (small basis vs the HL hedge)—
--vol-sourcevolmex (realised fallback) or realizedvolmex
--volPin vol per underlying, e.g. BTC=0.45,ETH=0.6—
--vol-halflifeEWMA half-life for realised vol, hours48
--anchorModel weight vs a tight book mid (1 = model only)0.5
--edgeHalf-spread around fair value, price units0.015
--sizeShares per side per quote100
--max-positionMax |Yes position| per market, shares500
--skewInventory skew strength 0–10.5
--min-minutesStop quoting this close to expiry20
--max-ddSkip when |$ delta per share| exceeds this30
--latency-msSimulated reprice latency300
--hedge-thresholdRebalance the perp hedge when the delta gap exceeds this ($)250
--feesauto (account userFees) or default (base tier)auto
--outcome-fee-bpsOverride the maker-close fee for every market—
--settle-fee-bpsOverride the settlement fee for every market—
--hedge-fee-bpsPerp hedge taker fee, native perpsaccount rate
--hedge-fee-bps-hip3Perp hedge taker fee, HIP-3 perps9
--durationAuto-stop after e.g. 6h, 7duntil stopped
--status-everySummary cadence in the runner log, seconds60
--verboseLog every event—

Library usage

The pieces are exported from openbroker for in-process use — pricing (priceOutcome, digitalPrice, touchPrice, interpVol, parsePerpLinkedOutcome), the Volmex client (fetchVolmexCurve), the fee model (outcomeFeeBps, feeRatesFromUserFees), the OutcomePaperMM engine (a pure state machine you feed mids, books, trades and ticks), and the run store (listRuns, getRun, setDesired, runOutcomeMM).

import { OutcomePaperMM, parsePerpLinkedOutcome, setDesired, listRuns } from "openbroker";
 
const spec = parsePerpLinkedOutcome(40264, "Recurring", "class:priceBinary|underlying:BTC|expiry:20261120-0600|targetPrice:63330|period:1d");
const mm = new OutcomePaperMM({ minEdge: 0.01 }, (event) => console.log(event));
mm.addMarket(spec!);
mm.setVol("BTC", 0.5);
 
// Control a background run from your own control plane:
const live = listRuns().filter((r) => r.live === "running");
for (const r of live) setDesired(r.id, "paused");