IShifting ​
Functions ​
_calcRangeShifting ​
Calculates the new upper and lower range values during an active range shift
solidity
function _calcRangeShifting(uint256 upperRange_, uint256 lowerRange_, uint256 dexVariables2_)
external
returns (uint256, uint256, uint256);
Parameters
Name | Type | Description |
---|---|---|
upperRange_ | uint256 | The target upper range value |
lowerRange_ | uint256 | The target lower range value |
dexVariables2_ | uint256 | needed in case shift is ended and we need to update dexVariables2 |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The updated upper range, lower range, and dexVariables2 |
<none> | uint256 | |
<none> | uint256 |
_calcThresholdShifting ​
Calculates the new threshold values during an active threshold shift
solidity
function _calcThresholdShifting(uint256 upperThreshold_, uint256 lowerThreshold_, uint256 dexVariables2_)
external
returns (uint256, uint256, uint256);
Parameters
Name | Type | Description |
---|---|---|
upperThreshold_ | uint256 | The target upper threshold value |
lowerThreshold_ | uint256 | The target lower threshold value |
dexVariables2_ | uint256 | needed in case shift is ended and we need to update dexVariables2 |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The updated upper threshold, lower threshold, and dexVariables2 |
<none> | uint256 | |
<none> | uint256 |
_calcCenterPrice ​
Calculates the new center price during an active center price shift
solidity
function _calcCenterPrice(uint256 centerPrice_) external returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
centerPrice_ | uint256 | The current center price |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The updated center price |