FluidRangeAuthDex ​
Inherits:Variables, Error, Events
Functions ​
validAddress ​
Validates that an address is not the zero address
solidity
modifier validAddress(address value_);
onlyMultisig ​
Validates that an address is the team multisig
solidity
modifier onlyMultisig();
constructor ​
solidity
constructor(address wstethEthDex_, address weethEthDex_);
getRanges ​
solidity
function getRanges(address dex_) public view returns (uint256 upperRangePercent_, uint256 lowerRangePercent_);
getThresholdConfig ​
solidity
function getThresholdConfig(address dex_)
public
view
returns (uint256 upperThresholdPercent_, uint256 lowerThresholdPercent_, uint256 thresholdShiftTime_);
setRanges ​
Sets the upper and lower range for a dex
This function can only be called by team multisig
solidity
function setRanges(address dex_, uint256 upperRangePercent_, uint256 lowerRangePercent_, uint256 shiftTime_)
external
onlyMultisig;
Parameters
Name | Type | Description |
---|---|---|
dex_ | address | The address of the dex |
upperRangePercent_ | uint256 | The new upper range to be set |
lowerRangePercent_ | uint256 | The new lower range to be set |
shiftTime_ | uint256 |
setRangesByPercentage ​
Sets the upper and lower range for a dex by percentage to change from current config
This function can only be called by team multisig
solidity
function setRangesByPercentage(
address dex_,
int256 newUpperRangePercentage_,
int256 newLowerRangePercentage_,
uint256 shiftTime_
) external onlyMultisig;
Parameters
Name | Type | Description |
---|---|---|
dex_ | address | The address of the dex |
newUpperRangePercentage_ | int256 | The new upper range percentage change, 10000 = 1%. Positive to increase, negative to decrease |
newLowerRangePercentage_ | int256 | The new lower range percentage change, 10000 = 1%. Positive to increase, negative to decrease |
shiftTime_ | uint256 |
setThresholdConfig ​
Sets the upper and lower threshold percent for a dex
This function can only be called by team multisig
solidity
function setThresholdConfig(
address dex_,
uint256 upperThresholdPercent_,
uint256 lowerThresholdPercent_,
uint256 thresholdShiftTime_,
uint256 shiftTime_
) external onlyMultisig;
Parameters
Name | Type | Description |
---|---|---|
dex_ | address | The address of the dex |
upperThresholdPercent_ | uint256 | The new upper threshold percent, 10000 = 1% |
lowerThresholdPercent_ | uint256 | The new lower threshold percent, 10000 = 1% |
thresholdShiftTime_ | uint256 | The new threshold shift time |
shiftTime_ | uint256 |
_percentDiffForValue ​
solidity
function _percentDiffForValue(uint256 oldValue_, uint256 newValue_)
internal
pure
returns (uint256 configPercentDiff_);
_getNewRange ​
solidity
function _getNewRange(uint256 currentRange_, int256 newRangePercentage_) internal pure returns (uint256 newRange_);
_validatePercentChange ​
solidity
function _validatePercentChange(uint256 percent_) internal pure;
_validateChange ​
solidity
function _validateChange(uint256 oldConfig_, uint256 newConfig_) internal pure;
_validateShiftTime ​
solidity
function _validateShiftTime(address dex_, uint256 shiftTime_) internal view;
_validateLastUpdateTime ​
solidity
function _validateLastUpdateTime(address dex_, UpdateType updateType_) internal view;
_abs ​
solidity
function _abs(int256 value_) internal pure returns (uint256);