Skip to content

FluidRatesAuth ​

Git Source

Inherits:Constants, Error, Events, Variables, BasicValidations

Sets borrow rate for specified borrow token at Liquidity based on team multisig input.

Functions ​

onlyAuthLevelMid ​

solidity
modifier onlyAuthLevelMid() ;

constructor ​

solidity
constructor(address liquidity_, address authGate_) validAddress(liquidity_) validAddress(authGate_);

updateRateDataV1 ​

Update V1 rate curve. For kink, rateAtUtilizationKink, and rateAtUtilizationMax, calldata 0 means "leave unchanged" (previous stored value is kept). rateAtUtilizationZero is the only field where 0 is a real literal value (not a skip sentinel). All rates are capped at max(RATE_RELATIVE_MAX_DELTA relative, RATE_ABSOLUTE_MAX_DELTA absolute) per update in both directions. Kinks are capped at KINK_MAX_ABSOLUTE_DELTA absolute. Reverts RatesAuth__NoChange if the resolved config matches the current one.

solidity
function updateRateDataV1(AdminModuleStructs.RateDataV1Params calldata rateStruct_) external onlyAuthLevelMid;

updateRateDataV2 ​

Update V2 rate curve. Same semantics as V1: calldata 0 = leave unchanged for all fields except rateAtUtilizationZero (where 0 is a real literal). Caps same as V1. Reverts RatesAuth__NoChange if the resolved config matches the current one.

solidity
function updateRateDataV2(AdminModuleStructs.RateDataV2Params calldata rateStruct_) external onlyAuthLevelMid;

_absoluteDiff ​

solidity
function _absoluteDiff(uint256 a_, uint256 b_) internal pure returns (uint256);

_relativeDiff ​

relative diff of new_ vs old_ in 1e4 scale. Returns type(uint256).max when old_ == 0 so the relative leg is always exceeded and only the absolute cap applies.

solidity
function _relativeDiff(uint256 old_, uint256 new_) internal pure returns (uint256);

_requireKinkAbsoluteDelta ​

solidity
function _requireKinkAbsoluteDelta(uint256 oldValue_, uint256 newValue_) internal pure;

_requireBorrowRateDelta ​

all borrow rates: allowed |Δ| = max(RATE_RELATIVE_MAX_DELTA relative, RATE_ABSOLUTE_MAX_DELTA absolute). Reverts when the change exceeds both caps simultaneously (equivalent to exceeding the larger of the two).

solidity
function _requireBorrowRateDelta(uint256 old_, uint256 new_) internal pure;