IPIDRateSetter
Inherits: IAuthorizable, IModifiable
Functions
oracleRelayer
The oracle relayer where the redemption price and rate are stored
function oracleRelayer() external view returns (IOracleRelayer _oracleRelayer);
pidCalculator
The PID calculator used to compute the redemption rate
function pidCalculator() external view returns (IPIDController _pidCalculator);
params
Getter for the contract parameters struct
function params() external view returns (PIDRateSetterParams memory _pidRateSetterParams);
Returns
Name | Type | Description |
---|---|---|
_pidRateSetterParams | PIDRateSetterParams | PIDRateSetter parameters struct |
_params
Getter for the unpacked contract parameters struct
function _params() external view returns (uint256 _updateRateDelay);
Returns
Name | Type | Description |
---|---|---|
_updateRateDelay | uint256 | Enforced gap between calls |
lastUpdateTime
The timestamp of the last update
function lastUpdateTime() external view returns (uint256 _lastUpdateTime);
updateRate
Compute and set a new redemption rate
function updateRate() external;
Events
UpdateRedemptionRate
Emitted when the redemption rate is updated
event UpdateRedemptionRate(uint256 _marketPrice, uint256 _redemptionPrice, uint256 _redemptionRate);
Parameters
Name | Type | Description |
---|---|---|
_marketPrice | uint256 | Computed price of the system coin |
_redemptionPrice | uint256 | Redemption price of the system coin |
_redemptionRate | uint256 | Resulting new redemption rate |
Errors
PIDRateSetter_InvalidPriceFeed
Throws if the market price feed returns an invalid value
error PIDRateSetter_InvalidPriceFeed();
PIDRateSetter_RateSetterCooldown
Throws if the call to updateRate
is too soon since last update
error PIDRateSetter_RateSetterCooldown();
Structs
PIDRateSetterParams
struct PIDRateSetterParams {
uint256 updateRateDelay;
}