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
  • Reading IPOR
  • From the index calculation contract
  • Publishing IPOR

Was this helpful?

Edit on GitHub
  1. IPOR Index

Working with the IPOR Index

PreviousWhat is the IPOR IndexNextIPOR stETH Index

Last updated 1 year ago

Was this helpful?

There are at least three ways to query IPOR Index. Each way to query an index has its intended use and has certain advantages.

Reading IPOR

From the oracle contract

  • It's the most gas efficient, as reading the values on-chain does not require complex calculations or calls to external contracts.

  • It provides additional params such as exponential moving average or exponential moving variance calculated on-chain

  • It allows for calculating the average IPOR rate between 2 points in time, thanks to the IBT.

  • IPOR swaps use this method to read the IPOR rate

getIndex(asset address) // pass address of ERC token for which to read IPOR

If you want to read the value of IPOR along with the most recent IBT value then use

getAccruedIndex(asset address, timestamp uint256) 
// pass address of ERC token for which to read IPOR,
// and current timestamp  

From the index calculation contract

  • It provides the real-time IPOR for a given block.

calculateIpor(asset address) // pass address of ERC token for which to calculate IPOR

From the API

  • Does not require a connection to the blockchain

  • It provides historical data.

  • Does not require any authentication, and it's free to query.

Publishing IPOR

Because the calculation of IPOR is done on-chain in the calculation index, it is possible for specific DAO-appointed validators to run an on-chain update of the oracle contract. Albeit not the most gas efficient, it may be beneficial in some cases to force an update of IPOR if you rely on the most recent data in our integration.

updateIndex(asset address)
https://etherscan.io/address/0x421C69EAa54646294Db30026aeE80D01988a6876#readProxyContractetherscan.io
https://etherscan.io/address/0x9D4BD8CB9DA419A9cA1343A5340eD4Ce07E85140#readProxyContractetherscan.io
https://api.ipor.io/data/chartsapi.ipor.io
Currently, the front-end application uses API for reading the IPOR to display the charts. A dedicated API will be provided.
https://etherscan.io/address/0x421C69EAa54646294Db30026aeE80D01988a6876#writeProxyContractetherscan.io