> For the complete documentation index, see [llms.txt](https://docs.useicaria.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.useicaria.xyz/protocol/trading-regimes.md).

# Trading regimes

Where a market's state comes from, and what each state changes about the way it quotes.

Equity markets hold regular session for something like 32 hours in a week. Stock Tokens never stop. Pricing the distance between those two facts, rather than acting as though it does not exist, is what the regime engine is for.

## The four regimes

| Regime     | Derived from                                                                             | Quoting                                           |
| ---------- | ---------------------------------------------------------------------------------------- | ------------------------------------------------- |
| `OPEN`     | Regular session, per the oracle's market status                                          | Spreads at their tightest, clips at full size     |
| `EXTENDED` | The extended-hours session                                                               | Spreads ×1.5, clips ×0.75                         |
| `CLOSED`   | An underlying that is shut                                                               | Spreads ×3.0, clips ×0.5                          |
| `HALTED`   | Stale oracle, `oraclePaused()`, corporate action, sequencer recovery or a guardian pause | Nothing quotes; deposits and withdrawals carry on |

`OracleRouter` stores the regime per market and every quote consults it. Multipliers are `ParamController` values set per tier.

## Where the regime comes from

Classification inside `OracleRouter` rests on two signals that do not depend on each other:

* the `marketStatus` field carried by Chainlink Data Streams, where the v11 RWA schema uses 5 to mean closed, and
* the Data Feed's `updatedAt` timestamp, compared against the staleness bound for the session (an hour in regular session, two in extended, and longer once closed).

Neither signal is allowed to relax the regime, only to tighten it: a feed that looks healthy alongside a stream saying closed produces a closed market. Anybody may poke the transition function; the keeper service does so within seconds of a session boundary, and a swap arriving before the poke recalculates the regime in its own transaction, which is why stale-session pricing has no window to appear in.

## The case for quoting a `CLOSED` market

Look at the alternatives and both are worse. Refusing weekend quotes puts market hours back onto a chain that runs continuously and hands those users to custodial venues. Quoting weekends at weekday spreads makes LPs the free counterparty to every Monday gap. The honest path runs between them: weekend liquidity exists, it is dearer, it comes in smaller size, and the ticket puts a number on exactly how much dearer. That closed-session multiplier is what gap risk costs, pitched conservatively at launch and retuned against the Monday opens actually recorded, every adjustment moving through the timelock.

## `HALTED` in detail

Any one of these puts a market into a halt, and it comes out once none of them applies:

| Trigger                                                                   | Cleared by                                                                                  |
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| Feed staleness beyond the session bound                                   | The arrival of a fresh oracle round                                                         |
| `oraclePaused()` set on the feed, meaning a corporate action is under way | The feed coming back; see [Corporate actions](/protocol/corporate-actions.md)               |
| A one-round price move past the 25% guard                                 | A timelocked review, published with its conclusion                                          |
| The one-hour grace after a sequencer outage                               | That grace period running out; see [Sequencer and chain risk](/risk/sequencer-and-chain.md) |
| A guardian pause                                                          | Unpausing, together with a published incident note                                          |

Quoting is all that a halt touches. LP deposits and withdrawals, RFQ cancellations and every view function keep working. Live on the trade explorer is the reason for the halt, read from precisely the contract state the router acts on.

## Calendar independence

No market calendar is written into the protocol anywhere. Holidays, shortened days and unexpected closures all arrive through the oracle's market status, which is why the venue is never quoting into a market the data calls closed, and never stuck shut while the data says otherwise.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.useicaria.xyz/protocol/trading-regimes.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
