Mode Escalation Path
The protocol operates in one of four modes, ordered by severity. Each mode progressively restricts which operations are permitted.| Mode | Severity | Operations Allowed |
|---|---|---|
| NORMAL | Lowest | All operations: open, increase, close, settle, liquidate, deposit, withdraw |
| DEGRADED | Moderate | New positions and increases blocked. Closes, settlements, liquidations, deposits, and withdrawals allowed |
| REDUCE_ONLY | High | Same restrictions as DEGRADED (opens and increases blocked). Signals a more severe protocol state |
| PAUSED | Highest | All operations blocked. No new positions, no modifications, no settlements, no liquidations, no deposits, no withdrawals |
Mode Transitions
Only addresses with theADMIN_ROLE can transition between modes, with one important exception.
Admin Escalation
The admin can escalate from any mode to a higher-severity mode (e.g., NORMAL to DEGRADED, or DEGRADED to PAUSED). This is used when the admin detects market conditions or protocol issues that warrant restricting operations.
Admin De-escalation
The admin can de-escalate from any mode to a lower-severity mode (e.g., PAUSED back to NORMAL). This is used during recovery after the root cause has been resolved.
Permissionless Auto-Pause
The
checkOracleAndPause() function is permissionless — anyone can call it. If the oracle is detected as stale or invalid, the function automatically transitions the protocol to PAUSED mode. This allows the community to protect the protocol without waiting for admin intervention.Auto-Pause via Oracle
ThecheckOracleAndPause() function is a critical safety mechanism:
- It queries the OracleModule to check whether the current price data is valid
- If the oracle returns invalid or stale data, the function transitions the protocol to PAUSED mode
- A
ModeTransitionevent is emitted so off-chain monitoring can detect the change
Recovery from PAUSED
Recovering from PAUSED mode requires both administrative action and fresh oracle data:Diagnose Root Cause
The admin identifies why the protocol was paused (oracle failure, market event, or detected vulnerability).
Restore Oracle Data
The publisher must provide fresh forward price data. Without valid oracle data, operations will fail even if the mode is changed back to NORMAL.
Admin De-escalates Mode
The admin transitions the protocol from PAUSED to NORMAL (or an intermediate mode like DEGRADED if a gradual reopening is preferred).
Current Limitations
The current emergency mechanism is admin-controlled. The following enhancements are planned for the M3 (Mainnet Ready) milestone to increase decentralization and safety.
Formal Emergency Shutdown Module
Formal Emergency Shutdown Module
A dedicated emergency shutdown module (similar to MakerDAO’s ESM) that allows token holders to trigger a full protocol wind-down if governance is compromised or unresponsive.
Multi-sig Governance
Multi-sig Governance
Mode transitions will require multi-sig approval rather than a single admin key, reducing the risk of unilateral action or key compromise.
Time-locked Recovery
Time-locked Recovery
Recovery from PAUSED mode will include a mandatory time-lock period, giving users time to review the situation before operations resume.
Automated Monitoring and Alerting
Automated Monitoring and Alerting
Off-chain monitoring infrastructure that automatically detects anomalies (unusual PnL, rapid utilization changes, oracle deviations) and alerts the operations team before manual intervention is needed.