Exactly Protocol
  • Getting started
    • 🔔Welcome
    • ➡️Introduction
    • ❔FAQ
    • 🔗Quick Links
  • Governance
    • 🏛️Exactly Protocol Governance
      • ✍️Proposals and Voting
      • ⚡Snapshot
      • 📄Exactly Improvement Proposal (EXAIP) Template
    • ⚫Exactly Protocol (EXA)
      • 📊EXA Tokenomics
      • ⚪EscrowedEXA (esEXA)
      • EXA Staking Program (stEXA)
  • EXA APP
    • The Exa App
    • How the Exa App works
    • The Exa App Webauthn Owner Plugin
    • Exa Plugin
    • Exa App FAQs
  • Guides
    • ⚙️Protocol
      • Auditor
      • MarketETHRouter
      • Market
        • ERC-4626
      • PriceFeedWrapper
      • PriceFeedDouble
      • InterestRateModel
      • RewardsController
    • 🛰️Peripheral Contracts
      • 🌀DebtManager
      • ⚫EXA
      • ⚪esEXA
      • 🪂Airdrop
      • 👀Previewer (read-only)
      • 👓DebtPreviewer (read-only)
      • RatePreviewer (read-only)
    • ✨Features
      • Bad Debt Clearing
      • Dynamic Close Factor
      • Earnings Accumulator
      • Cross-Asset Leverager & Deleverager
      • Liquidity Reserve
      • Rewards Distribution Model
      • Rate Manipulation Prevention
      • Rollover
    • 💲Fixed Rate Operations
      • 📥Deposits
      • 📤Borrows
    • 🔢Parameters
    • 📈Interest Rates Curves
    • ♻️Liquidations
      • 🤖Exactly's Bot
    • ⛓️Smart Contract Addresses
    • 🌐The Graph
    • 🔮Chainlink Price Feeds
  • Security
    • 🔎Audits
    • 🔑Access Control
    • 🛡️Hypernative
    • 🧪Testing
    • 🧯Emergency Procedure
    • 🐛Bug Bounty Program
  • Resources
    • 📃White Paper
    • 🔣Math Paper v1
    • 🔣Math Paper v2
    • 🤝Partnerships
    • 📺Presentations
    • 📣Brand Assets
  • Legal
    • ⚖️Terms and Conditions of Use
    • 🔏Privacy Policy
    • 🍪Cookies Policy
Powered by GitBook
On this page
  • Public State Variables
  • baseUnit
  • decimals
  • priceFeedOne
  • priceFeedTwo
  • View Methods
  • latestAnswer

Was this helpful?

  1. Guides
  2. Protocol

PriceFeedDouble

PreviousPriceFeedWrapperNextInterestRateModel

Last updated 2 years ago

Was this helpful?

Returns the price of an asset considering two different price feeds.

Written as a generic implementation it can be used, for example, to retrieve the price of WBTC. Queries BTC/ ETH feed and multiplies it by the exchange rate between WBTC / BTC before returning the price that it’s then used by the .

Public State Variables

baseUnit

function baseUnit() external view returns (uint256)

The base units are used to normalize the answer when multiplied by the second price feed rate.

decimals

function decimals() external view returns (uint8)

Number of decimals that the answer of this price feed has.

priceFeedOne

function priceFeedOne() external view returns (contract IPriceFeed)

Main price feed where the price is fetched from.

priceFeedTwo

function priceFeedTwo() external view returns (contract IPriceFeed)

Second price feed where the asset's rate is fetched from.

View Methods

latestAnswer

function latestAnswer() external view returns (int256)

Returns the price feed's latest value considering the other price feed's rate.

⚙️
Chainlink
Auditor