Skip to main content

IScalingPriceOracle

contract that receives a chainlink price feed and then linearly interpolates that rate over a 1 month period into the VOLT price. Interest is compounded monthly when the rate is updated

Methods

MAXORACLEDEVIATION

function MAXORACLEDEVIATION() external view returns (uint256)

the maximum allowable deviation in basis points for a new chainlink oracle update only allow price changes by 20% in a month. Any change over this threshold in either direction will be rejected

Returns

NameTypeDescription
_0uint256undefined

TIMEFRAME

function TIMEFRAME() external view returns (uint256)

the time frame over which all changes in CPI data are applied 28 days was chosen as that is the shortest length of a month

Returns

NameTypeDescription
_0uint256undefined

getCurrentOraclePrice

function getCurrentOraclePrice() external view returns (uint256)

get the current scaled oracle price applies the change smoothly over a 28 day period scaled by 18 decimals

Returns

NameTypeDescription
_0uint256undefined

monthlyChangeRateBasisPoints

function monthlyChangeRateBasisPoints() external view returns (int256)

current amount that oracle price is inflating/deflating by monthly in basis points

Returns

NameTypeDescription
_0int256undefined

oraclePrice

function oraclePrice() external view returns (uint256)

oracle price. starts off at 1 scaled up by 18 decimals

Returns

NameTypeDescription
_0uint256undefined

Events

CPIMonthlyChangeRateUpdate

event CPIMonthlyChangeRateUpdate(int256 oldChangeRateBasisPoints, int256 newChangeRateBasisPoints)

event when the monthly change rate is updated

Parameters

NameTypeDescription
oldChangeRateBasisPointsint256undefined
newChangeRateBasisPointsint256undefined