IPOR Protocol
Search…
⌃K

IPOR Oracle

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

Warren Buffet
Introducing IPOR Oracle. Besides from providing IPOR rate to the blockchain community, IPOR Oracle is responsible for computing some simple yet important metrics that can be used by other smart contracts:
  • exponential moving variance (EMVar)
  • exponential moving average (EMA)
  • IBT (Interest Bearing Token) - a measure of interest rate over time

Public Functions

Function
Notes
getIndex
It returns the most recently published IPOR value for a given asset.
getAccruedIndex
It returns the structure with: - the most recent IPOR - exponential moving average - exponential moving variance (a measure of volatility) - IBT as calculated to the current timestamp. See calculateAccruedIbtPrice
calculateAccruedIbtPrice
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.
updateIndex
Function available only to whitelisted addresses. It allows for IPOR publication. This function will also trigger a recalculation of - exponential moving average (EMA), exponential moving variance (EMVAR), and IBT
updateIndexes
Allows IPOR updating for multiple assets simultaneously.
addUpdater
Adds address to whitelist of updaters
removeUpdater
Removes address from the whitelist of updaters
addAsset
Adds asset for which IPOR can be compiled. This function allows for adding initial values of MVAR and EMA so that they can be to the real values quicker.
removeAsset
It removes asset.