Contains functions for managing tick processes and relevant calculations
Copy function tickSpacingToMaxLiquidityPerTick (
int24 tickSpacing
) internal pure returns ( uint128 ) Derives max liquidity per tick from given tick spacing
Executed within the pool constructor
Parameters: โ arrow-up-right
The amount of required tick separation, realized in multiples of tickSpacing e.g., a tickSpacing of 3 requires ticks to be initialized every 3rd tick i.e., ..., -6, -3, 0, 3, 6, ...
Return Values: โ arrow-up-right
Copy function getFeeGrowthInside (
mapping( int24 => struct Tick . Info ) self ,
int24 tickLower ,
int24 tickUpper ,
int24 tickCurrent ,
uint256 feeGrowthGlobal0X128 ,
uint256 feeGrowthGlobal1X128
) internal view returns ( uint256 feeGrowthInside0X128 , uint256 feeGrowthInside1X128) Retrieves fee growth data
Parameters: โ arrow-up-right
mapping(int24 => struct Tick.Info)
The mapping containing all tick information for initialized ticks
The lower tick boundary of the position
The upper tick boundary of the position
The all-time global fee growth, per unit of liquidity, in token0
The all-time global fee growth, per unit of liquidity, in token1
Return Values: โ arrow-up-right
The all-time fee growth in token0, per unit of liquidity, inside the position's tick boundaries
The all-time fee growth in token1, per unit of liquidity, inside the position's tick boundaries
Updates a tick and returns true if the tick was flipped from initialized to uninitialized, or vice versa
Parameters: โ arrow-up-right
mapping(int24 => struct Tick.Info)
The mapping containing all tick information for initialized ticks
The tick that will be updated
A new amount of liquidity to be added (subtracted) when tick is crossed from left to right (right to left)
The all-time global fee growth, per unit of liquidity, in token0
The all-time global fee growth, per unit of liquidity, in token1
true for updating a position's upper tick, or false for updating a position's lower tick
The maximum liquidity allocation for a single tick
Return Values: โ arrow-up-right
Whether the tick was flipped from initialized to uninitialized, or vice versa
Clears tick data
Parameters: โ arrow-up-right
mapping(int24 => struct Tick.Info)
The mapping containing all initialized tick information for initialized ticks
The tick that will be cleared
Transitions to next tick as needed by price movement
Parameters: โ arrow-up-right
mapping(int24 => struct Tick.Info)
The mapping containing all tick information for initialized ticks
The destination tick of the transition
The all-time global fee growth, per unit of liquidity, in token0
The all-time global fee growth, per unit of liquidity, in token1
Return Values: โ arrow-up-right
The amount of liquidity added (subtracted) when tick is crossed from left to right (right to left)