> ## Documentation Index
> Fetch the complete documentation index at: https://docs.krokoswap.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Concentrated Liquidity

> How V3 enables capital-efficient liquidity provision

# Concentrated Liquidity

V3 introduces **concentrated liquidity** — LPs choose a specific price range `[priceLower, priceUpper]` in which to provide liquidity, rather than spreading it across the entire price spectrum (0 to infinity) as in V2.

## The Core Idea

In V2, most liquidity sits idle. If ETH/USDC trades at $3,000, liquidity at $1 or \$100,000 is never used. V3 solves this by letting LPs concentrate their capital where it matters.

```mermaid theme={null}
---
config:
  xyChart:
    xAxis:
      label: Price
    yAxis:
      label: Liquidity
---
xychart-beta
    x-axis "Price" ["$0", "$500", "$1k", "$1.5k", "$2k", "$2.5k", "$3k", "$3.5k", "$4k", "$4.5k", "$5k"]
    y-axis "Liquidity"
    bar "V2 (full range)" [30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30]
    bar "V3 (concentrated)" [0, 0, 0, 0, 0, 80, 100, 80, 0, 0, 0]
```

## Capital Efficiency

A V3 LP providing liquidity in the range `[$2,500, $3,500]` achieves the same depth as a V2 LP with **\~4.24x more capital**. For tighter ranges, the multiplier is even higher.

$$
\text{Capital Efficiency} = \frac{\sqrt{p_{\text{upper}}}}{\sqrt{p_{\text{upper}}} - \sqrt{p_{\text{lower}}}}
$$

| Range (relative to current price) | Efficiency vs V2 |
| --------------------------------- | ---------------- |
| Full range                        | 1x (same as V2)  |
| ±50%                              | \~3.5x           |
| ±10%                              | \~17x            |
| ±1%                               | \~170x           |

## How It Works

Under the hood, V3 uses the same `x * y = k` formula, but applies it only within each LP's chosen range using a **virtual reserves** model.

Within a position's range:

$$
(x + \frac{L}{\sqrt{p_{\text{upper}}}}) \times (y + L \times \sqrt{p_{\text{lower}}}) = L^2
$$

Where `L` is the position's liquidity — a measure of the depth the position provides.

## Active vs Inactive Liquidity

* **In-range**: The current price is within the position's range. The position earns fees.
* **Out-of-range**: The current price has moved outside the position's range. The position holds only one token and earns no fees until the price re-enters.

When the price crosses a position's boundary:

* **Upper bound crossed**: The position becomes 100% token0 (no token1 remaining)
* **Lower bound crossed**: The position becomes 100% token1 (no token0 remaining)

## Single-Sided Liquidity

You can create positions entirely above or below the current price:

* **Range above current price**: Deposit only token0. Acts like a limit sell order.
* **Range below current price**: Deposit only token1. Acts like a limit buy order.

## Trade-offs

| Advantage                               | Trade-off                                   |
| --------------------------------------- | ------------------------------------------- |
| Higher capital efficiency               | Requires active management                  |
| Higher fee earnings per unit of capital | Risk of position going out of range         |
| Limit-order-like behavior               | More complex than V2                        |
| Custom strategies per LP                | Impermanent loss amplified in narrow ranges |
