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
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
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
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
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
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
monthlyChangeRateBasisPoints
function monthlyChangeRateBasisPoints() external view returns (int256)
current amount that oracle price is inflating/deflating by monthly in basis points
Returns
Name | Type | Description |
---|---|---|
_0 | int256 | undefined |
oraclePrice
function oraclePrice() external view returns (uint256)
oracle price. starts off at 1 scaled up by 18 decimals
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
Events
CPIMonthlyChangeRateUpdate
event CPIMonthlyChangeRateUpdate(int256 oldChangeRateBasisPoints, int256 newChangeRateBasisPoints)
event when the monthly change rate is updated
Parameters
Name | Type | Description |
---|---|---|
oldChangeRateBasisPoints | int256 | undefined |
newChangeRateBasisPoints | int256 | undefined |