# Liquidity Concentration

Let's understand how liquidity deposited in DEX is used for swaps, and what it means to concentrate liquidity to specific price ranges.

### Distribution of DEX liquidity by price range

Let's define **price P = (Y/X)^0.5** .

When a trader sells X tokens to buy Y tokens, the price of the pool goes down, and when a trader sells Y tokens to buy X tokens, the price of the pool goes up.

In other words, when a trade occurs in a direction that makes price go up, the pool must receive X tokens and give Y tokens to the trader, and when a trade occurs in the direction that makes price go down, the pool must receive Y tokens and give X tokens to the trader.

Therefore, **the pool needs Y tokens to process transactions in the downward direction** from the current price, and **X tokens to process transactions in the upward direction** from the current price.

![](https://lh5.googleusercontent.com/IR9oll_TMjaJveyKZ9FIY5bXgJ59J62ttCASsAOS9y9DmCctsLZwsp19F1z0UnSeopPYvS45OukGz0Ii6gX-QSyRyYCHu0TzWUjqbGUUMJXKMbEnXVtjh8Hvaff7JPpSrPp3Xk7jk_N26GonbgjgsQ)

This is similar to the mechanism that happens in stock trading where you “deposit cash (≈Y tokens) to place a buy order at a price lower than the current market price” and “deposit stocks (≈X tokens) to place a sell order at a price higher than the current market price”.

### Liquidity Concentration

Based on the graph above, the quantity of X and Y tokens required to provide liquidity in a given price range is derived as follows.

$$
amountY = L \cdot (P\_c - P\_a) \ amountX = L \cdot (\frac{1}{P\_c} - \frac{1}{P\_b})
$$

Based on the formula above, the quantity of X and Y tokens required to provide L amount of liquidity for the entire price range (0\~∞) in Uniswap V2 manner is derived as follows.

$$
amountY\_{full range} = L \cdot (P\_c - 0) = L P\_c\ amountX\_{full range} = L \cdot (\frac{1}{P\_c} - \frac{1}{\infty}) = \frac{L}{P\_c}
$$

However, as mentioned in the previous chapter(Lazy Liquidity), the actual price of the two tokens does not vary from 0 to infinity, except for extremely exceptional cases. If the price of the two tokens changes between 50% and 200% (=-50%\~+100%) from the current price, how much of the liquidity provided to the entire price range will actually be used for the swap? Let's look at the formula below.

$$
amountY\_{50% \sim 100%} = L \cdot (P\_c - \frac{1}{\sqrt 2} P\_c) = \frac{2 -\sqrt2}{2} LP\_c \simeq 0.29 \* amountY\_{fullrange} \ amountX\_{100% \sim 200%} = L \cdot (\frac{1}{P\_c} - \frac{1}{\sqrt 2P\_c} ) = \frac{2 -\sqrt2}{2} \frac{L}{P\_c} \simeq 0.29 \* amountX\_{fullrange}
$$

If the price changes between 50% and 200% from the current price, only about 29% of the supplied liquidity is used for the actual swap (Active Liquidity), and the remaining 71% of the liquidity is not used for the swap (Lazy Liquidity).

![](https://lh4.googleusercontent.com/A3SNdwM3WzRiOex6g1PdjFF5pN7VK3iTsXWMJ4cAR0r3G8Ly5fMQ3VTQ6aiyR9FPIvSITnfz0Nbpr1HV-tX1KfrC6RAV-101iCFmKVU6uK4IQ-MEUp4ePsxaEj0kYbR_mH4CS7O0ZvShAoUqHzp1Vg)

In other words, it can be understood as follows.

* Concentrating liquidity to the 50%\~200% price range with the V3 method yields the same effect with only 29% of the liquidity compared to the V2 method.
* Concentrating liquidity to the 50%\~200% price range with the V3 method is 3.41 times (1/(29%)) more effective than the V2 method.

### Concentration Ratio

**Concentration Ratio** is a number that indicates **the efficiency that increases compared to the V2 method** of liquidity provision by concentrating liquidity to a specific price range(In the service UI, the term Fee Boost is used to help users understand. Fee Boost = Concentration Ratio). Concentration Ratio **increases as the price range that is provided liquidity to is more concentrated**, and can be expressed by the following formula.

* reference : [uniswapv3#capital-efficiency](https://uniswap.org/blog/uniswap-v3#capital-efficiency)

$$
Concentration Ratio = \frac{1}{1-{\frac{P\_l}{P\_u}^{0.25}}}
$$

Concentration Ratio by price range is as follows :

<table><thead><tr><th width="209.57142857142856">Price Range</th><th>Concentration Ratio</th></tr></thead><tbody><tr><td>Full Range</td><td>1.00</td></tr><tr><td>10% ~ 1,000%</td><td>1.46</td></tr><tr><td>25% ~ 400%</td><td>2.00</td></tr><tr><td>50% ~ 200%</td><td>3.41</td></tr><tr><td>90% ~ 111%</td><td>21.49</td></tr><tr><td>95% ~ 105%</td><td>41.49</td></tr></tbody></table>
