Skip to main content

Layer 6 — State Engine

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

StateConditionEffect on Quotes
NORMALOracle valid. Volatility within baseline. Inventory within target range.Full functionality. Standard spreads. Both directions. Normal max size.
PROTECTOracle near threshold, OR mild volatility, OR mild inventory imbalance.Spread widened. Max size reduced. Both directions still permitted.
RESTRICTElevated volatility, OR significant inventory imbalance, OR arb check failure.Maximum spread. One-way direction only. Reduced max size.
HALTSevere 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 MoveClassificationState Triggered
< 0.05%NormalNORMAL
0.05% – 0.15%MildPROTECT
0.15% – 0.30%ElevatedRESTRICT
> 0.30%SevereHALT

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 ConditionResult
All conditions clearedState restored to NORMAL
Partially clearedState set to PROTECT
No conditions clearedState unchanged (RESTRICT or HALT)
Manual ops overrideState set to operator-specified level