Base interface for virtual pools
function timeOutside() external view returns (uint32)
view external
Returns:
Name | Type | Description |
---|---|---|
function ticks(int24 tickId) external view returns (uint128 liquidityTotal, int128 liquidityDelta, uint256 outerFeeGrowth0Token, uint256 outerFeeGrowth1Token, int56 outerTickCumulative, uint160 outerSecondsPerLiquidity, uint32 outerSecondsSpent, bool initialized)
view external
Name | Type | Description |
---|---|---|
Returns:
Name | Type | Description |
---|---|---|
function currentLiquidity() external view returns (uint128)
view external
Returns:
function globalTick() external view returns (int24)
view external
Returns:
function globalSecondsPerLiquidityCumulative() external view returns (uint160)
view external
Returns:
function prevTimestamp() external view returns (uint32)
view external
Returns:
function getInnerSecondsPerLiquidity(int24 bottomTick, int24 topTick) external view returns (uint160 innerSecondsSpentPerLiquidity)
view external
This function is used to calculate the seconds per liquidity inside a certain position
Returns:
function applyLiquidityDeltaToPosition(uint32 currentTimestamp, int24 bottomTick, int24 topTick, int128 liquidityDelta, int24 currentTick) external
external
Developer note: This function is called when anyone farms their liquidity. The position in a virtual pool should be changed accordingly
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
[0]
uint32
tickId
int24
liquidityTotal
uint128
liquidityDelta
int128
outerFeeGrowth0Token
uint256
outerFeeGrowth1Token
uint256
outerTickCumulative
int56
outerSecondsPerLiquidity
uint160
outerSecondsSpent
uint32
initialized
bool
[0]
uint128
[0]
int24
[0]
uint160
[0]
uint32
bottomTick
int24
The bottom tick of a position
topTick
int24
The top tick of a position
innerSecondsSpentPerLiquidity
uint160
The seconds per liquidity inside the position
currentTimestamp
uint32
The timestamp of current block
bottomTick
int24
The bottom tick of a position
topTick
int24
The top tick of a position
liquidityDelta
int128
The amount of liquidity in a position
currentTick
int24
The current tick in the main pool