Engine
Risk controls
Every control that limits what the engine can do, with its exact threshold.
Risk controls are part of the engine, not an afterthought. They reduce risk; they do not eliminate losses.
Kill switch
One flag stops everything: engine_state.kill = {on, reason, by}.
- The engine checks it every 3 s. When it engages, every strategy stands down (cancels its resting orders) and shows
halted. The ledger records All strategies halted: kill switch. - When it is released, strategies return to
running(Kill switch released; strategies resume). - It can be set by an operator through
POST /api/v1/admin/kill, or by the drawdown limit below. - It survives
PAPER_RESET.
See Admin & kill switch for the calls.
Drawdown halt
At every snapshot (every minute):
peak24h = max(highest NAV in the last 24 h, current NAV)
drawdownBps = max(0, round((1 − NAV / peak24h) × 10 000))If drawdownBps ≥ MAX_DRAWDOWN_BPS (default 1 000, i.e. 10 %), the engine engages the kill switch itself with the reason NAV fell X% from its 24h peak (limit Y%) and logs an error event. Snapshots are skipped when the NAV can't be computed (a holding without a price), so the check is too.
Warning
Releasing the kill switch does not reset the 24-hour peak. If NAV is still more than the limit below it, the next snapshot engages the switch again.
All the limits
| Control | Threshold | Where |
|---|---|---|
| Kill switch poll | 3 s | engine |
| Drawdown halt | MAX_DRAWDOWN_BPS, 10 % from the 24 h peak | engine |
| Strategy pause | per strategy, by an operator | admin API |
| Stale HyperCore book (market making) | 15 s: quotes pulled, risk warning | hypercore-mm |
| Stale HYPE book (hedge) | 20 s: no trade | hedge |
| Stale pool price (Montra) | 60 s: no trade | montra-mm |
| Inventory limit | 45 % of the market's capital: the adding side stops | hypercore-mm |
| Hedge margin | short ≤ USDC × 3 / price; market making keeps that margin aside | hedge, hypercore-mm |
| Treasury limits | on-chain maxHypePerCall and dailyHypeLimit, applied in paper too | montra-mm, Treasury |
| Slippage | Montra 1 % (minOut 99 %); hedge 10 bps; arbitrage HyperCore leg 0.5 % | strategies |
| Capital caps | market making 25 % + 15 %, Montra 20 %, hedge 25 %, arbitrage 5 % | strategies |
| Restarts | open orders cancelled on start; live mode cancels its own leftover HyperCore orders | engine |
| Live opt-in | CONFIRM_LIVE=yes plus the keys | config |
| Feed health | Hyperliquid OK if a message arrived in the last 15 s, Montra if a price in the last 60 s | heartbeat |
There is no separate per-trade loss limit or rate limit beyond the ones listed.
On chain
The engine's limits sit on top of the contracts' own: the Treasury only runs allow-listed calls within its HYPE limits, the guardian can pause it, and the swap adapter always pays the Treasury. See Security & risks.