CenturionDEX

Tick interval

Last modified:

In the previous example, we allowed any integer iZi \in \mathbb{Z} to serve as a tick index. In practice, however, CenturionDEX v3 restricts the set of tick indexes that may be used as position boundaries through a parameter called the tick spacing. Let ss be a positive integer denoting this parameter. Then a tick index ii is admissible as a lower or upper bound of a position only if

i0(mods).i \equiv 0 \pmod{s}.

Equivalently, only multiples of ss may be used as position boundaries. For example, if s=20s=20, then the admissible tick indexes are

,40,20,0,20,40,\ldots,-40,-20,0,20,40,\ldots

Thus, the tick spacing determines the granularity with which liquidity providers can choose price intervals.

Returning to the example above, suppose now that the pool uses tick spacing

s=20.s=20.

Recall that the target price interval was

[pa,pb]=[2300,3100].[p_a,p_b]=[2300,3100].

Because only multiples of 2020 are admissible, the actual boundary ticks must be chosen among such indexes. To obtain a tick-aligned interval that contains the desired range, we select

ia=20log1.0001(2300)20=77,400,i_a = 20\left\lfloor \frac{\log_{1.0001}(2300)}{20}\right\rfloor = 77{,}400,

and

ib=20log1.0001(3100)20=80,400.i_b = 20\left\lceil \frac{\log_{1.0001}(3100)}{20}\right\rceil = 80{,}400.

The neighboring admissible ticks around the target bounds are therefore

77,400,77,420,80,380,80,400.77{,}400,\quad 77{,}420,\quad 80{,}380,\quad 80{,}400.

The prices associated with these admissible ticks are approximately:

Tick index77,40077,42080,38080,400Tick price (approx.)2297.5832302.1833095.1703101.366\begin{array}{c|cccc} \text{Tick index} & 77{,}400 & 77{,}420 & 80{,}380 & 80{,}400 \\ \hline \text{Tick price (approx.)} & 2297.583 & 2302.183 & 3095.170 & 3101.366 \end{array}

Hence, the tick-aligned interval determined by the admissible bounds that contains the desired range [2300,3100][2300,3100] is

[p(77,400),p(80,400)][2297.583,  3101.366].[p(77{,}400),\,p(80{,}400)] \approx [2297.583,\;3101.366].

Therefore, with tick spacing s=20s=20, a liquidity provider cannot implement the exact continuous interval [2300,3100][2300,3100]. Instead, the position must be defined using admissible discrete tick boundaries, which in this case leads to the interval [2297.583,3101.366][2297.583,3101.366].

The tick spacing parameter is fixed when the pool is created. A smaller value of ss allows liquidity providers to choose price ranges more precisely, but it also makes the system more granular and may increase execution costs when the price crosses initialized ticks. Conversely, a larger tick spacing reduces boundary precision, but it can make the bookkeeping of liquidity changes more efficient.