The State Engine evaluates real-time market conditions and assigns the system to one of four operating states. Every downstream component — spread width, max size, allowed direction — is conditioned on the current state.
The Four States
| State | Condition | Effect on Quotes |
|---|
| NORMAL | Oracle valid. Volatility within baseline. Inventory within target range. | Full functionality. Standard spreads. Both directions. Normal max size. |
| PROTECT | Oracle near threshold, OR mild volatility, OR mild inventory imbalance. | Spread widened. Max size reduced. Both directions still permitted. |
| RESTRICT | Elevated volatility, OR significant inventory imbalance, OR arb check failure. | Maximum spread. One-way direction only. Reduced max size. |
| HALT | Severe volatility, OR oracle stale/deviated, OR critical inventory breach. | No new quotes. Existing positions settle and unwind only. Ops team notified. |
Volatility Thresholds
| 5–15 Min Price Move | Classification | State Triggered |
|---|
| < 0.05% | Normal | NORMAL |
| 0.05% – 0.15% | Mild | PROTECT |
| 0.15% – 0.30% | Elevated | RESTRICT |
| > 0.30% | Severe | HALT |
State Recovery
Recovery is evaluated every 5 minutes automatically, or triggered immediately by a manual operations override. All three conditions must be simultaneously cleared for full NORMAL restoration.
| Recovery Condition | Result |
|---|
| All conditions cleared | State restored to NORMAL |
| Partially cleared | State set to PROTECT |
| No conditions cleared | State unchanged (RESTRICT or HALT) |
| Manual ops override | State set to operator-specified level |