Write a bot that trades Phoenix SPCX (SpaceX) perps through flash crashes and squeezes, some of which never revert, on an offline copy of Solana mainnet.
harbor run -t solana-foundation/phoenix-flash-crashharbor download solana-foundation/phoenix-flash-crashThe agent writes a bot that trades Phoenix SPCX perpetuals (SpaceX shares) through flash crashes and squeezes. 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. SPCX shocks in one to three legs of 0.6–8%, most landing at once, among fizzles that give their move back: half the time it crashes, half the time it squeezes. Most shocks revert (~65%), but some stall (~20%) and some keep going (~15%). A good bot reads which way the shock is going, takes the other side of the forced flow, and sizes and exits so that the shocks that don't revert can't take it past its loss limit. Betting blind at the open has no edge: it wins half the shocks and loses the other half. The path's shape gives nothing away beyond what a trader would see: moves ramp in uneven steps, legs are drawn independently, pauses and holds share one range, the session ends a random while after the last move, and the mark wobbles in between.
mth-botkit SDK, a starter
bot that builds and never trades, six practice scenarios, the scenario
generator, and mth-practice, which grades the bot exactly as the verifier
does./app/bot. With no
network, it draws seventy-two hidden sessions from the batch's secret
(MTH_EVAL_SEED, passed by Harbor; it refuses to grade without one),
grades the reference on them, then the bot, one session at a time, each on
a fresh surfnet. Before the bot starts, every cheatcode is locked for good,
and the surfnet serves RPC only at a secret path: the bot's only way in is
an RPC proxy that forwards standard Solana methods only.mth-turn-1), so the same bot on the same session trades
the same way every time, and a session takes as long as the bot thinks,
not its 80–180 seconds of market time.clamp(Σ bot PnL / Σ hindsight bound, 0, 1) over the thirty-six
scenarios. The hindsight bound is the full position cap held the right way
through every move at no cost: no bot reaches it, so the score doesn't
saturate. The reference (ride each move while it runs, fade it once it
stops) scores about 0.04, and skill, the bot's PnL over the reference's, is reported
alongside: the headline for comparing bots.| Agent | Reward | What it shows |
|---|---|---|
| oracle (the reference bot) | ~0.04 | 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 | The surfnet's own port answers nothing without its secret path |
just ladder flash-crash grades the ladder (bench/checks/ladder) on fresh
hidden sets: blind bets, a dip-buyer and momentum below the reference, a
regime oracle above it, the frozen exploit bots within their limits.
No hidden scenario ships with the task: each batch's are drawn inside the verifier from a secret the batch's runner holds, and reports carry only the secret's SHA-256. The generator is public (agents get it), so the family is known and the draws aren't. Every trial in a batch is graded on the same set.