Spectra Oracles

Spectra oracles facilitate the integration of Spectra's assets across all DeFi. In particular, they are designed to provide robust price feeds - robust to price manipulation - for integrations in lending markets.

In this page, we describe the available oracles for Spectra's Principal Tokens (PT), Yield Tokens (YT) and LP Tokens (LP).

Spectra offers two types of oracles:

  1. Deterministic Oracles: offer a price reference of the PT against the underlying, evolving according to a pricing model based on an expected implied APY set at deployment. They are designed such that the reported price matches the par value of the PT at maturity.

  2. Time-Weighted Average Price (TWAP) Oracles: based on an exponential moving average (EMA) of the prices given by the AMM, those oracles provide a price reference for the PT/YT/LP both in IBT and underlying asset.

For fetching the latest price, Spectra oracles follow Chainlink's standard. That is, one can get the latest data point by calling

    function latestRoundData()
        external
        view
        returns (
         uint80 roundId,
         int256 answer,
         uint256 startedAt,
         uint256 updatedAt,
         uint80 answeredInRound
         )

The oracles being fully on-chain, one can ignore roundId, startedAt, updatedAt, answeredInRound return arguments.

Last updated