CenturionDEX

Multiple liquidity positions

Last modified:

A CenturionDEX v3 pool may contain many active positions, each with its own liquidity parameter and its own price interval. At any price pp that is not a boundary price of an existing position, only the positions whose intervals contain pp contribute liquidity. The effective liquidity at that price is therefore obtained by aggregating the liquidity of those active positions. By contrast, at an initialized boundary price, the set of active positions may change abruptly, so the liquidity to the left and to the right of that price need not coincide.

Proposition. Suppose that a CenturionDEX v3 pool contains nn positions. For each j{1,2,,n}j \in \{1,2,\dots,n\}, let [pa,j,pb,j][p_{a,j},p_{b,j}] be the price interval of position jj, and let LjL_j be its liquidity parameter. Define the set of all boundary prices by

T={pa,1,,pa,n,pb,1,,pb,n}.T=\{p_{a,1},\dots,p_{a,n},p_{b,1},\dots,p_{b,n}\}.

Let p0>0p_0>0 be such that p0Tp_0\notin T, and define the active set at price p0p_0 by

A(p0)={j{1,2,,n}p0[pa,j,pb,j]}.A(p_0)=\left\{j\in\{1,2,\dots,n\}\mid p_0\in[p_{a,j},p_{b,j}]\right\}.

Then the effective liquidity parameter of the pool at price p0p_0 is

Ltot(p0)=jA(p0)Lj.L_{\mathrm{tot}}(p_0)=\sum_{j\in A(p_0)}L_j.

Proof. If A(p0)=A(p_0)=\varnothing, then no position is active at price p0p_0, and the effective liquidity is zero, which agrees with the empty sum.

Assume now that A(p0)A(p_0)\neq\varnothing. Since p0Tp_0\notin T, there exists an open interval II containing p0p_0 such that no boundary price lies in II. Hence, throughout the whole interval II, the set of active positions remains constant and is equal to A(p0)A(p_0).

For each jA(p0)j\in A(p_0), let xjv(p)x_j^{v}(p) and yjv(p)y_j^{v}(p) denote the virtual reserves of position jj at price pIp\in I. Since position jj is active throughout II, its virtual reserves satisfy

xjv(p)yjv(p)=Lj2x_j^{v}(p)\,y_j^{v}(p)=L_j^2

and

yjv(p)xjv(p)=p.\frac{y_j^{v}(p)}{x_j^{v}(p)}=p.

Therefore,

xjv(p)=Ljp,yjv(p)=Ljp.x_j^{v}(p)=\frac{L_j}{\sqrt{p}}, \qquad y_j^{v}(p)=L_j\sqrt{p}.

Summing over all active positions, the total virtual reserves of the pool at price pIp\in I are

Xv(p)=jA(p0)xjv(p)=1pjA(p0)LjX^{v}(p)=\sum_{j\in A(p_0)}x_j^{v}(p) =\frac{1}{\sqrt{p}}\sum_{j\in A(p_0)}L_j

and

Yv(p)=jA(p0)yjv(p)=pjA(p0)Lj.Y^{v}(p)=\sum_{j\in A(p_0)}y_j^{v}(p) =\sqrt{p}\sum_{j\in A(p_0)}L_j.

Multiplying these two expressions, we obtain

Xv(p)Yv(p)=(jA(p0)Lj)2.X^{v}(p)\,Y^{v}(p)=\left(\sum_{j\in A(p_0)}L_j\right)^2.

Thus, for every pIp\in I, trading in the pool is equivalent to trading against a single constant-product AMM with liquidity parameter

jA(p0)Lj.\sum_{j\in A(p_0)}L_j.

In particular, this holds at p=p0p=p_0, which proves the result.

This proposition shows that, away from initialized boundary prices, a CenturionDEX v3 pool behaves locally like a standard constant-product AMM whose liquidity parameter is simply the sum of the liquidity parameters of the active positions.

We adopt the convention that a position with range [pa,j,pb,j][p_{a,j},p_{b,j}] is active on the closed interval. Hence, at a tick-aligned boundary pTp\in T, position jj contributes if and only if p[pa,j,pb,j]p\in[p_{a,j},p_{b,j}]. The piecewise function below reflects this convention; the proposition, which requires p0Tp_0\notin T, applies to all non-boundary points.

A simple illustration is obtained by considering two positions. Suppose that position 1 is active on the interval

[1800,3000][1800,3000]

with liquidity parameter

L1=900,L_1=900,

and that position 2 is active on the interval

[2400,3600][2400,3600]

with liquidity parameter

L2=1400.L_2=1400.

Then the effective liquidity of the pool is

Ltot(p)={0,p<1800,900,1800p<2400,2300,2400p3000,1400,3000<p3600,0,p>3600.L_{\mathrm{tot}}(p)= \begin{cases} 0, & p<1800,\\[4pt] 900, & 1800\le p<2400,\\[4pt] 2300, & 2400\le p\le 3000,\\[4pt] 1400, & 3000<p\le 3600,\\[4pt] 0, & p>3600. \end{cases}

In the overlap interval [2400,3000][2400,3000], both positions are active simultaneously, so their liquidity parameters add. Outside that overlap, only one of the two positions contributes liquidity. This is the basic mechanism by which multiple concentrated-liquidity positions combine inside a CenturionDEX v3 pool.