Concentrated Liquidity
Last updated
Last updated
Let's see how Uniswap defines the novel idea of Uniswap v3.
In the earlier versions of Uniswap, liquidity was distributed uniformly along the reserves curve, where π₯ and π¦ are the respective reserves of two assets X and Y, and π is a constant. In other words, earlier versions were designed to provide liquidity across the entire price range (0, β).
π₯ Β· π¦ = π
This is simple to implement and allows liquidity to be efficiently aggregated, but it means that much of the assets held in a pool are never touched. Considering this, it seems reasonable to allow LPs to concentrate their liquidity to smaller price ranges than (0, β).
We call liquidity concentrated to a finite range a position. A position only needs to maintain enough reserves to support trading within its range and therefore can act as a constant product pool with more extensive reserves (we call these the virtual reserves) within that range.
Specifically, a position only needs to hold enough asset X to cover price movement to its upper bound because the upwards price movement corresponds to depletion of the X reserves.
Similarly, it only needs to hold enough asset Y to cover price movement to its lower bound. Fig. 1 depicts this relationship for a position on a range [ππ, ππ ] and a current price ππ β [ππ, ππ ]. π₯real and π¦real denote the positionβs real reserves. When the price exits a positionβs range, the positionβs liquidity is no longer active and earns zero fees.
At that point, its liquidity is composed entirely of a single asset, because the reserves of the other asset must have been entirely depleted. If the price ever reenters the range, the liquidity becomes active again. The amount of liquidity provided can be measured by the value πΏ, which is equal to β π.
The real reserves of a position are described by the following curve: (π₯ + πΏ β ππ ) (π¦ + πΏ β ππ) = πΏ 2
This curve is a translation of formula 2.1, such that the position is solvent exactly within its range.
Liquidity providers (LPs) are allowed to create as many positions as they see fit, each with its own price range. In this way, LPs can approximate any desired distribution of liquidity on the price space (see Fig. 2 for a few examples).
Moreover, this serves as a mechanism to let the market decide where the liquidity should be allocated. Rational LPs can reduce their capital costs by concentrating their liquidity in a narrow band around the current price, and adding or removing tokens as the price moves to keep their liquidity active.
(Extract from Uniswap v3: https://uniswap.org/whitepaper-v3.pdf)