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

# Oracles & market hours

> How Denar prices tokenized stocks: Chainlink feeds, the 24/5 reality, staleness guards, sequencer checks, and the freeze-don't-guess philosophy.

Everything unusual about lending against stocks flows from one fact: **stock prices only exist when the stock market is open**. This page explains exactly how Denar prices collateral, what happens nights and weekends, and the protections wired around every price.

## Where prices come from

Every market reads a dedicated **Chainlink price feed** for its stock, published on Robinhood Chain by the same oracle network that secures most of DeFi. Two properties matter:

* **Feeds already include corporate actions.** Dividends and splits are folded into the token's price through the issuer's multiplier mechanism, so one token is always priced as what it actually represents — the protocol needs no multiplier logic of its own.
* **USDG is priced independently.** Collateral value is converted into USDG terms through a separate USDG/USD feed. Denar never assumes the stablecoin is worth exactly \$1: if USDG drifted from its peg, every collateral valuation would adjust automatically.

## The 24/5 reality

Stock feeds update around the clock on trading days and stop when the US market closes. Two behaviors follow, and both are normal:

* **Off-hours, the feed holds the last traded price.** Denar keeps operating against it — with a safety net: if a feed goes silent beyond a staleness bound sized for the longest normal market closure (holiday weekends included), the oracle refuses to answer and the market pauses.
* **Even mid-session, updates are event-driven.** These feeds publish on price *deviation* plus a daily heartbeat, not on a fixed clock. A stable name can legitimately go hours between updates while a volatile one ticks constantly. The price-age label in the app reflects exactly this.

## What works when

|                                 | Normal nights & weekends | Oracle paused (guard tripped) |
| ------------------------------- | ------------------------ | ----------------------------- |
| Lender deposits & withdrawals   | ✓ available              | ✓ available                   |
| Repay debt / add collateral     | ✓ available              | ✓ available                   |
| Borrow                          | ✓ at the held price      | ✗ paused                      |
| Withdraw collateral (with debt) | ✓ at the held price      | ✗ paused                      |
| Liquidations                    | ✓ at the held price      | ✗ paused                      |

The guard trips in three situations: the feed exceeds its staleness bound, the token issuer flags a **corporate action in progress**, or — once the chain publishes a sequencer uptime feed — the network's sequencer has been down. In every case the market **freezes rather than misprices**, and repaying is always possible, so no borrower can ever be trapped.

## Why freeze instead of guess?

A lending protocol has two options when a price becomes unreliable: keep operating on a guess, or pause the operations that depend on it. Denar always pauses. A wrong price can wrongly liquidate a healthy borrower or let someone borrow against phantom value — both irreversible. A pause only delays borrowing and liquidations, and the conservative LLTVs exist precisely to make those delays survivable. Institutional RWA lending platforms take the same approach with their NAV-based oracles.

<Warning>
  **The honest trade-off:** between a Friday close and a Monday open, the world moves while the price doesn't. Borrowers can act on a stale-but-trusted price all weekend. That is the inherent cost of equity collateral — it cannot be engineered away, only buffered. It is priced into every risk parameter of the protocol.
</Warning>

## Why not an AMM price (TWAP)?

Stock-token AMM pools on a young chain are shallow — primary liquidity is off-chain RFQ. Manipulating a thin pool's time-weighted price is cheap, and the manipulate-then-borrow attack is the single most common way lending forks die. Worse, pools trade 24/7 while the real market is closed: a weekend TWAP would diverge from true value exactly when arbitrageurs cannot correct it. Denar uses AMM prices for nothing; Chainlink feeds price everything.

## Layers of price protection

* Per-asset Chainlink feeds — no self-reported or single-party prices
* Staleness bounds on every feed, sized to market calendars
* Corporate-action pause flag honored on every read
* Independent USDG/USD pricing — no \$1 assumption
* Sequencer-outage guard, ready for the chain's uptime feed
* Off-chain monitoring with alerts on stale feeds, pause flags, and scheduled corporate actions
