IPOR Protocol
  • The IPOR Protocol Documentation
  • IPOR Protocol V2
  • Research / Whitepapers
    • Conceptual Whitepaper
  • Audits
  • Community Links
  • IPOR Protocol Roadmap
  • IPOR FAQ
    • About the IPOR Protocol
    • Using the IPOR Protocol
    • Liquidity Mining
    • Swaps VS Perps
    • $FUSN Snapshot
  • About IPOR
    • Who Uses IPOR and for What?
    • Why IPOR?
    • IPOR Manifesto
  • IPOR Fusion ⚛️
    • Fusion Introduction
      • Defragmenting DeFi Yield
    • Why Fusion?
    • Users
    • Use Cases
    • Architecture Overview
      • Atomists
      • Alphas
    • Vaults
      • Access Management
    • Fuses
    • Security
      • For Liquidity Providers
      • For Vault Owners
      • Testing
    • Open-source Repository
    • Aragon Integration
  • IPOR Index
    • What is the IPOR Index
    • Working with the IPOR Index
    • IPOR stETH Index
  • Interest Rate Derivatives
    • Interest Rate Derivative
    • Index Calculation
    • IPOR Publication
    • IBT
    • Indicative Term Sheet
  • Automated Market Maker
    • The Automated Market Maker
    • Liquidity Provisioning
    • IPOR Swaps
      • Hedging example with Morpho protocol
    • Spread
      • Math behind the demand spread
    • Risk oracle
    • SOAP
    • Liquidations
    • Asset Management
  • Tokenomics
    • IPOR Token
    • Token distribution model
    • Power IPOR
    • Liquidity mining
      • Math behind the rewards contract
    • Power Token Liquidity Mining for Developers
  • IPOR DAO
    • IPOR DAO Governance
      • Discord - All Channels
      • Discord - Open Governance Forum
      • Discord - Formal Governance
      • Snapshot - Formal Governance
      • Governing Multisig wallets
    • Decentralizing IPOR
      • Configuration Parameters
  • Developers Docs
    • Fusion
      • Developing а Fuse
      • Configuring Pre-hooks
    • Deployed Contracts
      • Ethereum
      • Arbitrum
      • Base
    • Working with IPOR Router
    • ABI
    • V2 changes
    • IPOR Oracle
    • Vault Wrapper
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Developers Docs

IPOR Oracle

PreviousV2 changesNextVault Wrapper

Last updated 1 year ago

Was this helpful?

“Someone’s sitting in the shade today because someone planted a tree a long time ago.”

Warren Buffet

Oracle structure

Oracle structure consists of 2 contracts and an off-chain component.

  1. Rate calculation contract:

    This stateless contract fetches the data from all the protocols supported by IPOR Index and runs all the calculations to compute IPOR Rate.

  2. Oracle contract This contract keeps the state of the IPOR rate and IBT. Oracle contract allows for permissionless update of the IPOR rate (as long as requested is willing to cover the gas costs associated with the rate calculation) by invoking updateIndex(asset Address) function.

  3. Rate publication off-chain oracle service. This service reads the value calculated in the rate calculation contract are publishes it to the IPOR Oracle contract. This is mainly done due to gas optimization reasons.

Public Functions

Function
Notes

It returns the most recently published IPOR value for a given asset.

It returns the structure with: - the most recent IPOR Index - IBT as calculated to the current timestamp. See calculateAccruedIbtPrice

For a given asset it calculates the current value of IBT considering the time passed from the last IPOR publication. Change in IBT is made based on the recently published IPOR.

Function available only to whitelisted addresses. It allows for IPOR publication. This function will also trigger a recalculation of IBT.

Allows IPOR updating for multiple assets simultaneously.

Available for Owner only. Adds address to whitelist of IPOR index updaters

Available for Owner only. Removes address from the whitelist of IPOR index updaters

Available for Owner only. Adds asset for which IPOR can be compiled.

Available for Owner only. It removes asset.

(address asset)

(uint256 calcTimestamp, address asset)

(address asset, uint256 calcTimestamp)

(address asset, uint256 value)

(address asset)

Function available only to whitelisted addresses. When invoked, it will make a request to (also used by the off-chain oracle) publish the index, and return value (same sa getIndex)

(address[] assets, uint256[] values)

(address updater)

(address updater)

(address asset, uint256 updateTimestamp

(address asset)

https://etherscan.io/address/0x9D4BD8CB9DA419A9cA1343A5340eD4Ce07E85140
getIndex
getAccruedIndex
calculateAccruedIbtPrice
updateIndex
updateIndex
index-calculating smart contract
updateIndexes
addUpdater
removeUpdater
addAsset
removeAsset