> For the complete documentation index, see [llms.txt](https://docs.usefarlight.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.usefarlight.com/risk/oracles.md).

# Oracles, sessions and the price checks

How PriceGate sources every collateral price from Chainlink, tells one trading session from another, and refuses a price that is stale, paused or out of line.

Every price Farlight uses arrives through one contract, `PriceGate`. It sits in front of Chainlink and applies the protocol's checks before a value reaches origination, a health-factor calculation or an auction. Nothing else on the platform reads a price directly.

## Sources

| Source                                      | Used for                                                                                  | How it works                                                                                                         |
| ------------------------------------------- | ----------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| Chainlink **Data Feeds** (24/5)             | Health-factor checks, LTV at origination, warnings                                        | Push model. On-chain, updated on a deviation or a heartbeat.                                                         |
| Chainlink **Data Streams** (v11 RWA schema) | Prices inside liquidation auctions                                                        | Pull model. The buyer supplies a signed report, verified on-chain through the VerifierProxy. Carries `marketStatus`. |
| Chainlink **Sequencer Uptime Feed**         | The liquidation grace period after an outage                                              | Described in [Surviving sequencer failure](/risk/sequencer-and-chain.md).                                            |
| ERC-8056 `uiMultiplier()`                   | Share-denominated accounting and the display in the Observatory, the public loan explorer | Read straight from the Stock Token contract. The Chainlink price already has the multiplier applied.                 |

Running feeds and streams side by side gives a cross-check for free. Where a stream price departs from the feed by more than the configured tolerance, no auction can clear at that price.

## Three sessions

An equity market is open in regular session for roughly 32 hours a week, a little longer once extended hours are counted, and closed the rest of the time. `PriceGate` tags every price as **regular**, **extended** or **closed**. It reads the stream's `marketStatus` field (5 means the market is closed) together with the feed's `updatedAt` timestamp to decide.

| Session  | Oldest acceptable price | Effect on LTV                                                                                     |
| -------- | ----------------------- | ------------------------------------------------------------------------------------------------- |
| Regular  | 1 hour                  | The published tier values apply.                                                                  |
| Extended | 2 hours                 | The published tier values apply and the move cap is tightened.                                    |
| Closed   | 4 days                  | The tier's closed-market haircut is subtracted from both the maximum LTV and the liquidation LTV. |

A Monday open can land a long way from the Friday close, which is what the haircut is for. Since it lowers the liquidation LTV as well as the maximum, a loan that looks comfortable on Friday afternoon has to hold extra buffer through the weekend. A borrower close to the limit is warned before the close, not after the reopen.

## What every price has to pass

`PriceGate` rejects a price, or halts a market, in these cases:

| Condition                                                             | Response                                                                                                                 |
| --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| The price is zero or negative                                         | Revert.                                                                                                                  |
| `updatedAt` is older than the session's staleness bound               | Origination reverts; the health factor is computed with the closed-market haircut; the auction floor is bounded.         |
| One update moves the price by more than the 25% cap                   | The market is paused for new loans and liquidations pending manual review. Repayment keeps working.                      |
| The feed reports `oraclePaused()`                                     | The market is halted for new loans and liquidations until the flag clears, which signals a corporate action in progress. |
| The stream price and the feed price differ by more than the tolerance | The auction purchase reverts.                                                                                            |

## The escrowed token, and only that

The `PriceGate` configuration for each market points at the feed for the exact token sitting in escrow. No price is ever derived through a wrapper, a vault share or an exchange rate between two tokens. The rule is a direct response to the Edel Finance wGOOGLx incident of July 2026, where the oracle for the underlying was correct but a wrapper's exchange rate had been inflated 78-fold and was accepted as collateral value. [Four failures that shaped the design](/risk/lessons.md) covers the case.

## Replacing a feed

The oracle adapter for each market is a PolicyController value. Swapping it is therefore a timelocked action with a published rationale. For each token, `PriceGate` exposes a view returning the current feed, session status, staleness, multiplier and pause flag, and both the Observatory and Telemetry, the public risk page, show those readouts live.


---

# 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.usefarlight.com/risk/oracles.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.
