> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mystockline.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Oracle

> Prices, regimes, weekends, and corporate actions.

The oracle tells the core whether the market is open, and what price to use.

It stores no last-good price of its own. Every answer is timestamp math, an immutable config, or an onchain read.

<Frame>
  <img className="block dark:hidden" src="https://mintcdn.com/mystockline/T8zoJG9K_VZWCC6Y/assets/diagrams/concepts/oracle-regimes-light.svg?fit=max&auto=format&n=T8zoJG9K_VZWCC6Y&q=85&s=19d8db1c82e94b2421d8805822a9ed4d" alt="Regime priority is sequencer down, corporate-action window, dark, halted, then live, and only live and dark return a price." width="1200" height="540" data-path="assets/diagrams/concepts/oracle-regimes-light.svg" />

  <img className="hidden dark:block" src="https://mintcdn.com/mystockline/T8zoJG9K_VZWCC6Y/assets/diagrams/concepts/oracle-regimes-dark.svg?fit=max&auto=format&n=T8zoJG9K_VZWCC6Y&q=85&s=f60c990e4b2aff0531225e90b9c75716" alt="Regime priority is sequencer down, corporate-action window, dark, halted, then live, and only live and dark return a price." width="1200" height="540" data-path="assets/diagrams/concepts/oracle-regimes-dark.svg" />
</Frame>

<Info>
  Crypto oracles often keep a last good tick. Equity feeds go quiet for two days. Stockline reports a regime and haircuts Friday close rather than inventing a Saturday price.
</Info>

`regime()` priority in code: `SEQ_DOWN`, `CA_WINDOW`, `DARK`, `HALTED`, `LIVE`.

| Regime      | When                                            | `price()`                                              |
| ----------- | ----------------------------------------------- | ------------------------------------------------------ |
| `LIVE`      | Session, feeds fresh                            | Pass-through 1e36                                      |
| `DARK`      | Weekend or holiday window                       | Last close minus haircut, bounded by `maxDarkDuration` |
| `HALTED`    | Stale or non-positive feed                      | Reverts `PriceUnavailable`                             |
| `CA_WINDOW` | Token `oraclePaused()` / `effectiveAt()` window | Reverts                                                |
| `SEQ_DOWN`  | Sequencer uptime feed down, plus grace          | Reverts                                                |

ARCHITECTURE.md lists sequencer as a required input. `EquityOracle` allows `sequencerFeed = address(0)` because Robinhood has no published Chainlink uptime feed yet. A zero feed never trips `SEQ_DOWN`.

Launch haircut is [200 bps](/resources/parameters). `maxDarkDuration` is [280,800 seconds](/resources/parameters). Live staleness [3600s](/resources/parameters). Loan staleness [86400s](/resources/parameters).

HolidayCalendar: future-dated day indices, append-style, lockout before each date. It can only cause reverts or haircuts.

EquityOracleFactory deploys with CREATE2 from a config-derived salt and emits the full config.

Related: [Market hours](/using/market-hours), [Parameters](/resources/parameters), [Read the regime](/developers/market-hours).

Scale is 10 \*\* (36 + loanDecimals + loanFeedDecimals - collDecimals - stockFeedDecimals), capped so the exponent is at most 54. Weekend detection is timestamp arithmetic with UTC offsets darkStartOffset and darkEndOffset. Halts are staleness.

HolidayCalendar can only cause reverts or haircuts. It cannot produce a live price. Changing a listing means a new oracle from the factory and a registry write behind the timelock. Config is immutable per oracle.

Related numbers live on Parameters: live staleness, loan staleness, haircut, max dark duration, corporate-action window, sequencer grace.
