Write a bot that trades Phoenix SOL 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 SOL perpetuals through flash crashes. The market is an offline copy of Solana mainnet: Phoenix's SOL market, snapshotted on 2026-10-27 and restored into a Surfpool surfnet at the snapshot's slot and time.
What it measures. SOL shocks 5–12%: 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.
ott-botkit SDK, a starter
bot that builds and never trades, six practice scenarios, the scenario
generator, and ott-practice, which grades the bot exactly as the verifier
does./app/bot. With no network, it replays
twelve hidden scenarios, three 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 twelve
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) | 1.0 | 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.