Constants
LIQUIDITY
contract IFluidLiquidity LIQUIDITY
TEAM_MULTISIG
address TEAM_MULTISIG
X16
uint256 X16
PERCENT_RATE_CHANGE_ALLOWED
uint256 PERCENT_RATE_CHANGE_ALLOWED
COOLDOWN
uint256 COOLDOWN
Events
LogUpdateRateAtKink
event LogUpdateRateAtKink(address borrowToken, uint256 oldRateKink1, uint256 newRateKink1, uint256 oldRateKink2, uint256 newRateKink2)
emitted when borrow rate for specified borrow token is updated based on team multisig input of rate at kinks
Structs
RateAtKinkV1
struct RateAtKinkV1 {
address token;
uint256 rateAtUtilizationKink;
}
RateAtKinkV2
struct RateAtKinkV2 {
address token;
uint256 rateAtUtilizationKink1;
uint256 rateAtUtilizationKink2;
}
Variables
tokenLastUpdateTimestamp
mapping(address => uint256) tokenLastUpdateTimestamp
last timestamp when a token's rate was updated
FluidRatesAuth
Sets borrow rate for specified borrow token at Liquidity based on team multisig input.
onlyMultisig
modifier onlyMultisig()
Validates that an address is a multisig (taken from reserve auth)
constructor
constructor(address liquidity_, uint256 percentRateChangeAllowed_, uint256 cooldown_) public
updateRateDataV1
function updateRateDataV1(struct Structs.RateAtKinkV1 rateStruct_) external
updateRateDataV2
function updateRateDataV2(struct Structs.RateAtKinkV2 rateStruct_) external
_percentDiffForValue
function _percentDiffForValue(uint256 oldValue_, uint256 newValue_) internal pure returns (uint256 configPercentDiff_)
_gets the percentage difference between oldValue_
andnewValue*
in relation tooldValue*
_