API reference v1.0
Introduction
periphery
tokenomics
AlgebraVirtualPoolBase

AlgebraVirtualPoolBase

AlgebraVirtualPoolBase

Abstract base contract for Algebra virtual pools

Modifiers

onlyFromPool

only pool (or FarmingCenter as "proxy") can call

onlyFarming

Variables

address farmingCenterAddress immutable

address farmingAddress immutable

address pool immutable

mapping(int24 => struct TickManager.Tick) ticks

uint128 currentLiquidity

int24 globalTick

uint32 timeOutside

uint160 globalSecondsPerLiquidityCumulative

uint32 prevTimestamp

Functions

getInnerSecondsPerLiquidity

getInnerSecondsPerLiquidity(int24,int24) view external

get seconds per liquidity inside range

NameTypeDescription
bottomTickint24
topTickint24

Returns:

NameTypeDescription
innerSecondsSpentPerLiquidityuint160

cross

onlyFromPool

cross(int24,bool) external

NameTypeDescription
nextTickint24The crossed tick
zeroToOneboolThe direction

increaseCumulative

onlyFromPool

increaseCumulative(uint32) external

NameTypeDescription
currentTimestampuint32The timestamp of the current swap

Returns:

NameTypeDescription
[0]enum IAlgebraVirtualPool.Status

applyLiquidityDeltaToPosition

onlyFarming

applyLiquidityDeltaToPosition(uint32,int24,int24,int128,int24) external

NameTypeDescription
currentTimestampuint32The timestamp of current block
bottomTickint24The bottom tick of a position
topTickint24The top tick of a position
liquidityDeltaint128The amount of liquidity in a position
currentTickint24The current tick in the main pool