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

# Oracles & Price Feeds

<Frame>
  <img src="https://mintcdn.com/edelfinance/RAmQMxLSnNZx1q3j/images/Oracles%20&%20Price%20Feeds.jpg?fit=max&auto=format&n=RAmQMxLSnNZx1q3j&q=85&s=019cf3b78a718fd54a9b5a81049f5c9e" alt="Oracle system architecture showing price feed sources and safety mechanisms" width="1920" height="1080" data-path="images/Oracles & Price Feeds.jpg" />
</Frame>

Oracles are the backbone of Edel Finance's pricing system. They provide real-time price information that powers portfolio values, borrowing limits, Health Factor calculations, and fair liquidations.

<Note>
  All prices shown in Edel Finance are **index prices** (benchmarks) used for risk calculations and portfolio display. Not executable trading quotes.
</Note>

## How We Use Oracle Data

Every asset in Edel Finance has an associated oracle that reports its current market price. The protocol uses these prices to:

<Steps>
  <Step title="Fetch prices">
    Pull the latest price for each asset from its primary oracle source
  </Step>

  <Step title="Verify freshness">
    Check that prices are recent and within expected ranges
  </Step>

  <Step title="Apply fallbacks">
    Switch to backup sources if primary data is unavailable or stale
  </Step>

  <Step title="Update protocol">
    Apply prices to calculate Health Factors, borrowing limits, and portfolio values
  </Step>
</Steps>

## Oracle Types

<Tabs>
  <Tab title="Chainlink Price Feeds">
    ### General Price Feeds

    Our primary oracle source for crypto and FX pairs. Battle-tested and decentralized.

    **Key Features:**

    * Aggregates quotes from multiple independent providers
    * Built-in manipulation protection
    * Industry-standard reliability
    * Used wherever coverage exists

    <Check>
      Default choice for widely-traded pairs with proven track record in production
    </Check>
  </Tab>

  <Tab title="xStock Data Streams">
    ### Tokenized Equity Prices

    Chainlink-backed streams bringing real-world equity prices on-chain for symbols like AAPLx/USD or TSLAx/USD.

    **What We Get:**

    * **Index price**: Benchmark rate for the underlying equity
    * **Market status**: Open, Closed, or Halted indicators
    * **Corporate actions**: Multipliers for splits/mergers with activation times
    * **Future 24/7 pricing**: Planned tokenized price field

    <Info>
      During market hours, xStock prices update frequently. When markets are closed, we expect slower updates and rely on status checks.
    </Info>
  </Tab>

  <Tab title="Ondo Oracle">
    ### GM Asset Pricing

    Simple, transparent index pricing in USD for GM tokens and Ondo tokenized stocks.

    **What We Monitor:**

    * Posted USD index price per token
    * Freshness window (validity period)
    * Reasonable price range boundaries

    <Tip>
      Ondo tokenized stocks are **total-return trackers** that reflect both price movements and reinvested dividends (net of taxes).
    </Tip>
  </Tab>
</Tabs>

## Safety Mechanisms

<AccordionGroup>
  <Accordion title="Freshness Checks">
    Prices must be recent to be used. Stale data triggers conservative behavior:

    * Old prices won't drive new liquidations
    * Borrowing may be temporarily restricted
    * System switches to fallback sources
  </Accordion>

  <Accordion title="Reasonableness Validation">
    New prices must fall within expected ranges:

    * Wild price jumps are investigated or ignored
    * Each oracle source provides guidance on acceptable variance
    * Protects against manipulation or bad data
  </Accordion>

  <Accordion title="Market Status Awareness">
    For equity markets (xStock):

    * Closed markets trigger conservative policies
    * Halted trading prevents sudden price changes
    * Corporate actions handled smoothly
  </Accordion>

  <Accordion title="Fallback Strategy">
    When primary sources fail:

    * Automatic switch to secondary oracle
    * Apply protective limits if no healthy source
    * Prefer safety over availability
  </Accordion>
</AccordionGroup>

## What This Means for You

### During Normal Operations

* **Accurate portfolio values** with transparent, explainable price inputs
* **Fair liquidations** based on verified market conditions, not transient noise
* **Stable borrowing** with conservative policies during data outages
* **Real-time updates** as market conditions change

### During Market Events

<Tabs>
  <Tab title="Market Closures">
    When traditional markets close (weekends, holidays):

    * xStock prices update less frequently
    * System maintains last known good prices
    * Conservative borrowing limits may apply
  </Tab>

  <Tab title="High Volatility">
    During extreme price movements:

    * Additional validation checks activate
    * Fallback sources may be consulted
    * System prefers accuracy over speed
  </Tab>

  <Tab title="Corporate Actions">
    For stock splits, mergers, or dividends:

    * Automatic adjustments via oracle multipliers
    * Positions update smoothly
    * No user action required
  </Tab>
</Tabs>

<Check>
  You don't need to interact with oracles directly; they work automatically in the background to keep your positions accurate and secure.
</Check>

## Technical Details

<Accordion title="Oracle Integration Flow">
  The oracle integration follows this process:

  1. **Asset Request** → Check primary oracle
  2. **Primary Oracle** → Returns fresh or stale data
  3. **Fresh Data** → Validate price
  4. **Stale/Missing** → Try fallback oracle
  5. **Valid Price** → Update protocol and calculate Health Factor
  6. **Invalid/Unavailable** → Apply safety policy and restrict operations
</Accordion>

<Info>
  Oracle reliability is crucial for DeFi safety. Edel Finance only uses battle-tested oracle solutions with proven track records in production environments.
</Info>
