Skip to main content

Concentrated Liquidity Market Maker (CLMM) - State of adoption DEX (P.5)

Concentrated Liquidity Market Marker

Curve finance (Micheal 2019) adjusts the pricing curve to tackle the capital inefficiency of CPMM, both Balancer and DODO have constructed a new oracle-based pricing curve; while Uniswap has innovated version 3 with a new definition of “Concentrated Liquidity Market Maker” or CLMM that enables liquidity providers more power over the price ranges in which their fund is utilized, with minimal impact on liquidity dispersion and gas inefficiency (Adam et al, 2021). Whitepaper of Uniswap V3 (2021) provides several innovative features: 


Concentrated Liquidity: LPs are given the authority to limit their liquidity within an arbitrage price range. This increases the capital efficiency of the pool and enables LPs to estimate their chosen reserve curve but remain optimally aggregated with the rest of the pool. 


Adaptable fee: The transaction fee is no longer fixed at 0.3%. Instead, the fee level for each pool is determined at the time of initiation with supported tier 0.05%, 0.3% and 1%. Various asset classes will migrate toward fee levels, if the price of an asset is low volatile, LPs will get a lower risk to hold it, and traders will be encouraged to acquire a better execution price. In other words, a lower fee tier is applied for low-volatility assets (Uniswap.org). Conversely, assets that are traded infrequently, will inevitably attract a higher fee to balance the price risk of LPs. 

Basically, each fee tier is suitable for each type of token pair. Fee tier of 0.05% is an ideal for tokens that frequently trade at a set or directly associated rate such as stablecoin pairs (e.g DAI/USDT, DAI/USDC, USDC/USDT). In these pools, LPs take on low price risk, and traders anticipate to pay relatively small fees. The 0.3 % fee tier is perfectly suitable for token pairs that are less related (e.g USDC/WETH, WETH/USDT, WETH/WBTC, UNI/WETH) and are vulnerable to large price fluctuations both up and down. This higher charge is more likely to reimburse LPs for the additional price risk they assume in comparison with stablecoin. The 1% fee tier is for exotic pairs where LPs are willing to undertake substantial price risk (e.g SHIB/WETH, ELON/WETH). 

Since both V2 and V3 charge 0.3% fee, trade volume should be shared proportionately between them. Based on the concentrated liquidity model of V3, LPs can invest a lower amount of capital distributed within a range while still obtaining compatible volume and fee. Therefore, in the next section, this research will select a specific token pair in the 0.3%-fee market to compare the capital efficiency between two versions.


Protocol fee administration: It has adaptability in determining the percentage of swap fee collected.


Enhanced price oracle and liquidity oracle

Fig. 14. Difference of liquidity distribution between CPMM and CLMM

6.1 CLMM Model

CLMM is primarily based on the previous model of constant product “xy = kThere is no limit in terms of providing liquidity, hence, the price range runs in (0, ∞).

The term “Concentrated Liquidity” implies that the liquidity is centred on a specific price range

[pa, pb]

Fig. 15. Virtual reserves vs Real reserves in liquidity pool


Let pa(xa,ya) and  pb(xb,yb)are the virtual reserve (x , y), the real reserves (xreal, yreal) and L denotes liquidity units of the pool of token A and token B and L = k

In CPMM:

The basic function is: xy = k = L2

The basic price relationship: p = yx

The bonding curve: x = Lp; y = Lp 

After a transaction, the bonding curve is:
(x +∆x)(y+∆y) = L2

In CLMM:

The real reserves curve equation from Uniswap V3 white paper is:

(xreal + Lpb) (yreal+Lpa) = L2

Suppose there is a price range [pa, pb

For pm (pa, pb): 

xreal = Lpm-Lpb = Lpb-pmpmpb

yreal = L(pm-pa)

If the price moves from pm to upper bound pb: ∆x = xm- xb  and ∆y = yb- ym

(The ∆x units of token A must be retained to cover the depletion by sending ∆y units of token B to the contract).

Similarly, if the price decreases to lower bound pa: ∆y = ym- ya and ∆x = xa- xm

(Sending ∆x units of token A to the contract is to cover the depletion of ∆y units of token B)

Suppose pm (pa, pb): xm = xa and y = 0 or ym = yb and x = 0,

the liquidity is no longer functional and gets activated again once the price returns to the range.

According to Robin F (2021), liquidity providers cannot choose their liquidity limit at random.

Alternatively, the price range is separated by ticks (i): p(i) = 1.0001i(Adams et al, 2021)which

can be used as liquidity range boundaries.

Concentrated liquidity is a combination of a traditional order book and a constant product in which

LPs can give the entire price range (0,∞)(Yann Huynh, 2022). LPs are able to customize the

“range orders” to supplement market orders (Uniswap.org).

Suppose a LP wants to deposit $10M worth of ETH  into ETH/USDC pool:

The current price of ETH/USDC: PUSDC/ETH = 1,927

Price range: [1700 ; 2100]

If PUSDC/ETH > 2100:

Liquidity will have entirely converted to USDC, LP has to withdraw the liquidity to prevent

being converted back to ETH when PUSDC/ETH < 2100.

Generally, when LPs offer liquidity through the AMM mechanism, they will be rewarded with

fungible LP tokens. Under the CLMM mechanism, LP holdings will be represented by an NFT

- non-fungible token (Adams et al, 2021), which represents the token pair, volume, and price range

for which the user provides liquidity. Everyone might also construct an external contract that covers

an individual liquidity position in an ERC-721 non-fungible tokens (ethereum.org)

6.2 Uniswap V2 vs V3

Uniswap demonstrates the difference between V2 (CPMM) and V3 (CLMM) through a specific example: 

Suppose that a LP wants to provide liquidity in an  ETH/DAI pool with the price of one ETH is 1500 DAI.

There are two options, one is in Uniswap V2 with $1M of capital (including 500,000 DAI and 333.33 ETH)

and the other is in Uniswap V3 with the same amount of capital but the price range [1000, 2250].

It can be seen that Uniswap V3 performs better capital efficiency (Fig. 16)

Fig. 16. Example of providing liquidity in Uniswap V2 and V3


Comments

Popular posts from this blog

Uniswap V3 Breakdowns - State of adoption in DEX (P.8)

  On 23 March 2021, Uniswap team announced the details of their upcoming V3 release but it officially launched on 5 May 2021.  As a result, all analysis of Uniswap V3 would take place from May 2021 onwards.  Fig. 47.  Number of market supported on Uniswap V3 A day after its launch, about 280 new pools were formed in which the 0.3%-fee market had 151 pools because users were becoming accustomed to the general fee of the previous version. Besides, users also created many new pools in the 1%-fee market with 99 new pools. Other lower fee tiers were not of favor to liquidity providers, 0.05%-fee market has only 31 new ones, while no pool was in 0.01%-fee market. Up to now, the number of pools created on V3 has been fairly limited, averaging only about 2 to 20 pools established daily (Fig. 47). It is insignificant when compared to V2.  Fig. 48. Daily positions created in Uniswap V3 in May 2022 In May 2022, on average, more than 300 positions were generated every day;...

State of adoption in DEX (P.10)

  A powerful incentive of AMM-based DEX for liquidity provision The results from analyzing the operation of Uniswap V2 and V3 reveal answers to the research question. In most circumstances, exchange operators have a motivation to attempt to and enhance the observed volume on a certain exchange. Increased volume indicates increased liquidity and trust, which will attract more people. This motivation may differ for completely decentralized exchanges, but it is a significant aspect to consider for most existing ones. According to the previous section, V3 market is extremely active when gradually occupying the market share of its predecessor, especially recently when the number of users participating as traders in both versions has become equal. Although the number of pairs made on V3 cannot be compared with a huge variety of pairs on V2, it does not affect the number of swaps executed on V3, particularly in May 2022. All these aspects are facilitating V3 to be an attractive market for...

Uniswap V3 Polygon Breakdowns - State of adoption in DEX (P.9)

The Uniswap community approved the deployment of Uniswap V3 on Polygon in December 2021. Since then the number of swaps per day has been around 65,000  or less (Fig. 64). However in May 2022, this number has spiked, particularly on 11 May 2022, more than 174 thousand of swap was executed with $348.1m of trading volume (Fig. 65). The liquidity providers reaped about $245k of fee (Fig. 66) and Uniswap V3 Polygon gained $240k revenue (Fig.67) at the same time. It was the time when V3 Polygon achieved the most profit ever. Compared with V3 on Ethereum, the popularity of V3 Polygon is still restricted. On the same day, the traded volume of V3 Ethereum was $544m, and a $1.63m fee was generated for LPs. It can be seen that only 1.56 times higher trading volume brought 6.65 times higher LP’s fee in V3 Ethereum. Looking at the Polygon price per trade, except for several days in Jan 2022 with a higher gas fee of more than $0.7 per swap, each transaction on V3 Polygon just costs about $0.115 ...