Risk engine
Deterministic risk limits outside the agent layer, position sizing bounded by executable liquidity, and the global risk states that gate execution.
Risk rules exist outside the agent layer. The Risk agent may interpret conditions, but deterministic code enforces the limits — and it can block execution.
Risk limits
| Limit | Bounds |
|---|---|
| Per-trade value | Maximum notional per trade |
| Capital allocation | Maximum percentage of available capital |
| Daily loss | Maximum loss in a day |
| Weekly drawdown | Maximum peak-to-trough loss in a week |
| Concurrent positions | Maximum open positions |
| Exposure per chain / exchange | Caps spread across venues |
| Minimum liquidity | Required liquidity to enter |
| Maximum slippage / spread | Execution-quality bounds |
| Holder concentration | Maximum top-wallet concentration |
| Contract-risk score | Maximum tolerated contract risk |
| API error rate | Trips on degraded connectivity |
Position sizing by executable liquidity
Size depends on executable liquidity, not reported market capitalization — a large market cap with a thin pool still caps the position. The controls are deterministic and per-strategy:
- maximum_position_usd
- maximum_position_as_percent_of_pool
- maximum_expected_price_impact_percent
- maximum_entry_slippage_percent
- maximum_exit_slippage_percent
- minimum_exit_liquidity_usd
- minimum_unique_traders
- maximum_top_holder_percent
- maximum_creator_holder_percent
Start from the loss you accept, then the stop distance (widened for slippage and fees) fixes the units. The full derivation and the min(…) of every limit is on Position sizing & stops.
Total open risk as a fraction of equity — the system-wide cap that throttles new entries. See Performance & risk metrics.
Risk states
A single global state gates execution across the whole system, escalating as risk rises:
- NORMALFull execution within limits
- CAUTIONTightened sizing and extra checks
- RESTRICTEDReductions and approved exits only
- HALTEDNo new orders; open positions managed
- EMERGENCYKill switch — cancel/flatten, human reactivation required
Circuit breakers escalate the state automatically on triggers such as the daily/weekly loss limit, max consecutive losses, stale data, abnormal spread or slippage, failed reconciliation, clock drift or repeated order rejection. No model may override a HALTED state.