Spectra Developer Docs
  • Developers Documentation
  • Getting Started
  • Guides
    • Tokenizing Yield
    • Providing Liquidity
    • Deploy PT and Curve Pool
    • Routing
    • IBT Additional Rewards
    • Locking APW for veAPW
    • Voting and Earning Rewards
  • Technical Reference
    • Deployed Contracts
    • Contract Functions
      • Principal Token
      • Yield Token
      • Registry
      • RateOracle
      • Factory
      • Access Manager
      • RouterUtil
      • Router
      • GovernanceRegistry
      • Voter
      • VotingReward
        • BribeVotingReward
        • FeesVotingReward
      • FeeDistributor
      • Spectra4626Wrapper
    • Yield Calculations
    • Spectra's Automated Market Makers
      • Rate Adjusted StableSwap pools
  • Glossary
  • INTEGRATION REFERENCE
    • Spectra Oracles
      • TWAP Oracles
      • Deterministic Oracles
        • Linear APR model
        • Linear Discount Model
        • Zero Coupon Bond Model
        • Comparison
      • Oracle Deployment
        • Deterministic Oracles Deployment
        • TWAP Oracles Deployment
Powered by GitBook
On this page
  1. INTEGRATION REFERENCE

Spectra Oracles

PreviousGlossaryNextTWAP Oracles

Last updated 5 days ago

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. : 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. : 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. 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.

Deterministic Oracles
Time-Weighted Average Price (TWAP) Oracles
Chainlink's standard