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 replays
thirty-six hidden scenarios, one at a time, each on a fresh surfnet. Before the bot starts, every
cheatcode is locked for good. The bot runs as an unprivileged user behind an
RPC proxy that forwards standard Solana methods only.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 (fade the shock in two tranches, hold) scores
about 0.2 and is reported as a baseline.| 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 | Cheatcodes, airdrops and exit on the surfnet's own port are refused |
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.