Tick
Manages tick processes and computes variables stored in the tick state
Last updated
Manages tick processes and computes variables stored in the tick state
Last updated
Derives max liquidity per tick from given tick spacing. Executed within the pool constructor.
Params:
Returns:
Computes growth of fees, collateral, Spear and Shield deltas within a tick boundary.
Params:
Returns:
Updates a tick and returns true if the tick was flipped from initialized to uninitialized, or vice versa.
Params:
Returns:
Clears tick data
Params:
Transitions to next tick as needed by price movement
Params:
Returns:
Name
Type
Description
tickSpacing
int24
The amount of required tick separation, realized in multiples of tickSpacing
Type
Description
uint128
Maximum liquidity per tick
Name
Type
Description
self
mapping(int24 => struct Tick.Info)
The mapping containing TickInfo. See Types
tickLower
int24
The lower tick boundary of the position
tickUpper
int24
The upper tick boundary of the position
tickCurrent
int24
The current tick
global
GrowthX128
The GrowthX128 info struct per unit of liquidity as of the last update to the pool's global state
Name
Type
Description
inside
GrowthX128
The GrowthX128 info struct per unit of liquidity inside the tick range
Name
Type
Description
self
mapping(int24 => struct Tick.Info)
The mapping containing TickInfo. See Types
tick
int24
The tick that will be updated
tickCurrent
int24
The current tick
liquidityDelta
int128
The change in liquidity
global
GrowthX128
The GrowthX128 info struct per unit of liquidity as of the last update to the pool's global state
maxLiquidity
uint128
The maximum liquidity allocation for a single tick
upper
bool
Indicates whether the tick represents the upper boundary
Name
Type
Description
flipped
bool
Whether the tick was flipped from initialized to uninitialized, or vice versa
Name
Type
Description
self
mapping(int24 => struct Tick.Info)
The mapping containing TickInfo. See Types
tick
int24
The tick that will be cleared
Name
Type
Description
self
mapping(int24 => struct Tick.Info)
The mapping containing TickInfo. See Types
tick
int24
The destination tick of the transition
global
GrowthX128
The GrowthX128 info struct per unit of liquidity as of the last update to the pool's global state
Name
Type
Description
liquidityNet
int128
The net liquidity