IAlgebraVirtualPoolBase

Base interface for virtual pools

Functions

timeOutside

function timeOutside() external view returns (uint32) view external

Returns:

ticks

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

Returns:

currentLiquidity

function currentLiquidity() external view returns (uint128) view external

Returns:

globalTick

function globalTick() external view returns (int24) view external

Returns:

globalSecondsPerLiquidityCumulative

function globalSecondsPerLiquidityCumulative() external view returns (uint160) view external

Returns:

prevTimestamp

function prevTimestamp() external view returns (uint32) view external

Returns:

deactivated

function deactivated() external view returns (bool) view external

Returns:

getInnerSecondsPerLiquidity

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:

deactivate

function deactivate() external external

This function is used to deactivate virtual pool. Deactivated virtual pool will return Status.NOT_EXIST in increaseCumulative function

applyLiquidityDeltaToPosition

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