Skip to main content
These methods compose the pool’s state, and can change with any frequency including multiple times per transaction

Functions

slot0

The 0th storage slot in the pool stores many values, and is exposed as a single method to save gas when accessed externally.

Return Values:

feeGrowthGlobal0X128

The fee growth as a Q128.128 fees of token0 collected per unit of liquidity for the entire life of the pool This value can overflow the uint256

feeGrowthGlobal1X128

The fee growth as a Q128.128 fees of token1 collected per unit of liquidity for the entire life of the pool This value can overflow the uint256

grossFeeGrowthGlobal0X128

The gross fee growth of token0 as a Q128.128, tracking fees before protocol fee deduction. Ramses-specific.

grossFeeGrowthGlobal1X128

The gross fee growth of token1 as a Q128.128, tracking fees before protocol fee deduction. Ramses-specific.

protocolFees

The amounts of token0 and token1 that are owed to the protocol Protocol fees will never exceed uint128 max in either token

liquidity

The currently in range liquidity available to the pool This value has no relationship to the total liquidity across all ticks

ticks

Look up information about a specific tick in the pool

Parameters:

Return Values:

a specific position.

tickBitmap

Returns 256 packed tick initialized boolean values. See TickBitmap for more information

positions

Returns the information about a position by the position’s key In Ramses V3, the position key is computed as: keccak256(abi.encodePacked(owner, index, tickLower, tickUpper)) — note the extra index parameter compared to Uniswap V3.

Parameters:

Return Values:

observations

Returns data about a specific observation index You most likely want to use #observe() instead of this method to get an observation as of some amount of time ago, rather than at a specific index in the array.

Parameters:

Return Values:

positionPeriodSecondsInRange

Returns the seconds a specific position was in range during a given period. Used by GaugeV3 for proportional reward distribution.

Parameters:

Return Values:

periods

The pool maintains an array of period snapshots that store cumulative data per weekly epoch. These are used by the GaugeV3 contract to distribute rewards proportionally based on time-weighted in-range liquidity during each period.