# Risk Management & Incentives

## Risk Monitoring and Exposure Controls

* **Market-Wide Open Interest (OI) Caps:** The protocol establishes a strict upper bound on systemic exposure via a `MaxMarketOpenNotional` parameter. The state machine strictly validates the core OI invariant (*OI\_long ≈ OI\_short*).
* **Per-Account Position Sizing:** The network enforces a `MaxPositionNotional` cap at the subaccount level to prevent excessive concentration by a single entity.
* **Pre-Execution Margin Validation:** Before a derivative limit order is considered valid for matching, the protocol evaluates its margin sufficiency against the absolute latest Oracle mark price.
* **On-Chain Risk Index:** The module maintains a highly optimized, queryable "Risk Index" that categorizes active positions by their margin health (equity versus maintenance requirement).

## Circuit Breakers and Emergency Halts

* **Global Trading Halts:** Governance can explicitly toggle global execution flags, instantly disabling all order entry and matching for the entire Spot or Derivatives ecosystem.
* **Per-Market Gating:** Individual markets can be isolated and paused. Governance can intervene to suspend a specific market or aggressively adjust its Initial and Maintenance Margin Ratios (IMR/MMR) to force deleveraging.
* **Emergency Settlement:** In severe crisis scenarios (such as an irrecoverable Oracle failure), governance can bypass standard lifecycle phases and execute an Emergency Settlement at a manually provided price.

## Liquidation Engine

Uniocean employs a hybrid liquidation architecture, supporting both manual execution payloads submitted by third-party liquidators and a native automated fallback engine.

{% stepper %}
{% step %}

### Positive Equity (Healthy Liquidation)

If collateral remains after closing the position, the protocol extracts a liquidator reward and an Insurance Fund contribution directly from the surplus margin. Any remaining equity is safely returned to the trader.
{% endstep %}

{% step %}

### Negative Equity (Bankruptcy)

If the position clears at a deficit, the market's Insurance Fund injects capital to cover the loss, ensuring the winning counterparty is fully paid while still compensating the liquidator.
{% endstep %}
{% endstepper %}

## Trading Incentives

* **Tiered Fee Discounts:** Dynamic maker and taker fee discounts based on actively staked Uniocean tokens combined with rolling 30-day trading volume. Discount tiers are cached with a TTL boundary for state machine performance.
* **Automated Reward Campaigns:** Epoch-based trading reward campaigns where market participants accumulate reward points proportional to their trading volume. At campaign conclusion, the protocol automatically distributes assets pro-rata to traders based on accumulated points.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://uniocean.gitbook.io/uniocean-docs/risk-management-and-incentives.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
