Enabled ticks
Last modified:
In CenturionDEX v3, each tick can be in one of two states: initialized or uninitialized. Initialized ticks are precisely those that serve as lower or upper bounds of at least one active liquidity position. These ticks are especially important because the liquidity parameter may change when the market price crosses them, as the set of active positions changes at that point. By tracking only initialized ticks, CenturionDEX v3 avoids the need to recompute liquidity information every time the price moves across an arbitrary tick; updates are required only when the price crosses a tick that actually marks the boundary of an existing position.
Whenever a new position is created using a tick that was not previously active as a boundary, that tick becomes initialized. Conversely, if a tick is the boundary of only one position and that position is later removed, the tick becomes uninitialized. To keep track of this information efficiently, CenturionDEX v3 uses a tick bitmap in which each bitmap entry corresponds to a tick index. A value of indicates that the tick is initialized, whereas a value of indicates that it is uninitialized.