Write a bot that makes markets in Phoenix SPCX (SpaceX) perps against competing makers and informed taker flow, on an offline copy of Solana mainnet.
harbor run -t solana-foundation/phoenix-market-makingharbor download solana-foundation/phoenix-market-makingThe agent writes a bot that makes markets in Phoenix SPCX perpetuals (SpaceX shares). The market is an offline copy of Solana mainnet: Phoenix's SPCX market, snapshotted on 2026-10-29 and restored into a Surfpool surfnet at the snapshot's slot and time.
What it measures. A good bot earns the spread from uninformed takers while reading its own fills: it skews against its inventory, and widens or steps back when flow turns one-sided, so the informed orders ahead of a jump don't run it over. A bot that quotes tight and symmetric fills the most and loses it all to jumps and trends; a bot that quotes too wide or too little fills nothing.
Trader::oracle_usd reads the same oracle.mth-botkit SDK, a starter
bot that builds and never trades, six practice scenarios, the scenario
generator (mth scenario generate --family market-making), and
mth-practice, which grades the bot exactly as the verifier does./app/bot and replays twelve hidden scenarios (three calm,
six with jumps, three trending), one at a time, each on a fresh surfnet.
Before the bot starts, the takers are onboarded, the makers widened, and
every cheatcode locked for good. The bot runs as an unprivileged user
behind an RPC proxy that forwards standard Solana methods only.clamp(Σ bot PnL / Σ spread bound, 0, 1). A scenario's spread
bound is every taker order filled at the competitor's half-spread with
nothing lost to informed flow, inventory or fees. No bot reaches it. The
reference is reported as a baseline.| Agent | Reward | What it shows |
|---|---|---|
| oracle (the reference maker) | ~0.12 | The task is solvable and the reference is calibrated |
| nop (starter bot) | 0.0 | Doing nothing earns nothing |
| cheater | 0.0 | Cheatcodes through the proxy disqualify; /tests is unreadable; writing the reward file counts as tampering; ignoring SIGTERM doesn't extend the session |
| sneaky | 0.0 | Cheatcodes, airdrops and exit on the surfnet's own port are refused |
The reference quotes one tick inside the competitor around the oracle, skews against inventory, leans with the drift, and backs off after one-sided fills. On the hidden set it made $66.36 against a $567 spread bound (~0.12), and every practice session made money. In development, a naive inside-quoter (the same quotes without skew, drift or backing off) scored about the same reward (0.119 against 0.132) but lost money in a quarter of its sessions, against none for the reference: the informed flow punishes a maker that ignores it, and the headroom above both (faster requotes, sizing, trading with the informed flow it reads on the tape) is where agents separate.
The hidden scenarios ship in tests/scenarios with the task, so treat scores
on this public version as a development benchmark, not a held-out
evaluation.