IAlgebraPoolState
Pool state that can change
Developer note: Credit to Uniswap Labs under GPL-2.0-or-later license: https://github.com/Uniswap/v3-core/tree/main/contracts/interfaces
Functions
globalState
function globalState() external view returns (uint160 price, int24 tick, int24 prevInitializedTick, uint16 fee, uint16 timepointIndex, uint8 communityFee, bool unlocked)
view external
The globalState structure in the pool stores many values but requires only one slot and is exposed as a single method to save gas when accessed externally.
Returns:
totalFeeGrowth0Token
function totalFeeGrowth0Token() external view returns (uint256)
view external
The fee growth as a Q128.128 fees of token0 collected per unit of liquidity for the entire life of the pool Developer note: This value can overflow the uint256
Returns:
totalFeeGrowth1Token
function totalFeeGrowth1Token() external view returns (uint256)
view external
The fee growth as a Q128.128 fees of token1 collected per unit of liquidity for the entire life of the pool Developer note: This value can overflow the uint256
Returns:
liquidity
function liquidity() external view returns (uint128)
view external
The currently in range liquidity available to the pool Developer note: This value has no relationship to the total liquidity across all ticks. Returned value cannot exceed type(uint128).max
Returns:
tickSpacing
function tickSpacing() external view returns (int24)
view external
The current tick spacing Developer note: Ticks can only be used at multiples of this value e.g.: a tickSpacing of 60 means ticks can be initialized every 60th tick, i.e., ..., -120, -60, 0, 60, 120, ... This value is an int24 to avoid casting even though it is always positive.
Returns:
tickSpacingLimitOrders
function tickSpacingLimitOrders() external view returns (int24)
view external
The current tick spacing for limit orders Developer note: Ticks can only be used for limit orders at multiples of this value This value is an int24 to avoid casting even though it is always positive.
Returns:
communityFeeLastTimestamp
function communityFeeLastTimestamp() external view returns (uint32)
view external
The timestamp of the last sending of tokens to community vault
Returns:
getCommunityFeePending
function getCommunityFeePending() external view returns (uint128 communityFeePending0, uint128 communityFeePending1)
view external
The amounts of token0 and token1 that will be sent to the vault Developer note: Will be sent COMMUNITY_FEE_TRANSFER_FREQUENCY after communityFeeLastTimestamp
Returns:
getReserves
function getReserves() external view returns (uint128 reserve0, uint128 reserve1)
view external
The tracked token0 and token1 reserves of pool Developer note: If at any time the real balance is larger, the excess will be transferred to liquidity providers as additional fee. If the balance exceeds uint128, the excess will be sent to the communityVault.
Returns:
secondsPerLiquidityCumulative
function secondsPerLiquidityCumulative() external view returns (uint160)
view external
The accumulator of seconds per liquidity since the pool was first initialized
Returns:
ticks
function ticks(int24 tick) external view returns (uint128 liquidityTotal, int128 liquidityDelta, uint256 outerFeeGrowth0Token, uint256 outerFeeGrowth1Token, int24 prevTick, int24 nextTick, uint160 outerSecondsPerLiquidity, uint32 outerSecondsSpent, bool hasLimitOrders)
view external
Look up information about a specific tick in the pool
Returns:
limitOrders
function limitOrders(int24 tick) external view returns (uint128 amountToSell, uint128 soldAmount, uint256 boughtAmount0Cumulative, uint256 boughtAmount1Cumulative, bool initialized)
view external
Returns the summary information about a limit orders at tick
Returns:
tickTable
function tickTable(int16 wordPosition) external view returns (uint256)
view external
Returns 256 packed tick initialized boolean values. See TickTree for more information
Returns:
positions
function positions(bytes32 key) external view returns (uint256 liquidity, uint256 innerFeeGrowth0Token, uint256 innerFeeGrowth1Token, uint128 fees0, uint128 fees1)
view external
Returns the information about a position by the position's key
Returns:
activeIncentive
function activeIncentive() external view returns (address incentiveAddress)
view external
Returns the information about active incentive Developer note: if there is no active incentive at the moment, incentiveAddress would be equal to address(0)
Returns: