Skip to content

IShifting ​

Git Source

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

NameTypeDescription
upperRange_uint256The target upper range value
lowerRange_uint256The target lower range value
dexVariables2_uint256needed in case shift is ended and we need to update dexVariables2

Returns

NameTypeDescription
<none>uint256The 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

NameTypeDescription
upperThreshold_uint256The target upper threshold value
lowerThreshold_uint256The target lower threshold value
dexVariables2_uint256needed in case shift is ended and we need to update dexVariables2

Returns

NameTypeDescription
<none>uint256The 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

NameTypeDescription
centerPrice_uint256The current center price

Returns

NameTypeDescription
<none>uint256The updated center price