What are CLMMs (Concentrated Liquidity Market Makers)?

The CLMM increases the capital efficiency of decentralized exchanges, and it's an excellent source of yield for liquidity providers on Solana.

The concentrated liquidity market maker (CLMM) is a next-generation automated market maker (AMM). CLMMs increase the capital efficiency of decentralized exchanges (DEX) and are an excellent source of yield for liquidity providers (LPs).    

In this article on crypto basics, we’ll introduce the concept of CLMMs. Then, we’ll look at how they work, what differentiates CLMMs from other AMMs, and how they could be a game changer for anyone who cares about capital efficiency and deep liquidity, which is just about everyone participating in decentralized finance (DeFi).    

There are a growing number of DEXs offering CLMMs on Solana. Currently, Orca Whirlpools, Invariant, Cykura, Lifinity, and Crema provide DEXs powered by a CLMM on Solana.

Starting Point: What are Automated Market Makers?

First of all, an AMM is a piece of code that facilitates token swaps. By swapping tokens through an AMM, users don’t have to interact with an intermediary like a centralized exchange (CEX); instead, a user’s tokens are swapped between liquidity pools where other users have deposited tokens for this purpose.  

The first AMM, launched in 2018 by Uniswap, facilitated trades by relying on an invariant formula x*y=k, where x represents Token A, y represents Token B, and k represents a constant value. This formula determines the quantity of Token B users receive for swapping Token A through an AMM, since the two tokens have different prices and cannot be exchanged 1:1.

This kind of AMM, also known as a constant product market maker (CPMM), makes tokens from the liquidity pool available at a price range of zero to infinity. So, a trade can always be executed through an AMM, even if it moves the value of the token being swapped for closer to infinity (slippage).

How are Traditional Automated Market Makers Inefficient?

Since the tokens provided in a DEX’s liquidity pools are spread out across a price range from zero to infinity, the AMM allocates an equal number of tokens available for trade at current prices as it does at prices outside this range. This is a great tool for price discovery, since the value of tokens measured by x*y=k is automatically adjusted by supply and demand.

If there are lots of Token B in a liquidity pool (deep liquidity) slippage is negligible. Conversely, if liquidity is thin for Token B versus Token A, then the price will rise for Token B as the trade is executed–the trade itself moves the market and affects the price of the tokens being traded simultaneously.

lifinity crema cykura AMM CLMM
Prices move along a hyperbola that extends to infinity.

For example, Bob is trying to swap $2,000 USDC for Token B at the spot price of $5. There are so many tokens deposited in Token B’s liquidity pool that there are theoretically a thousand tokens available at the spot price (and also at every price from zero to infinity), so Bob receives 399.9 Token B and barely moves the price.

Alice, on the other hand, is trying to swap $2,000 USDT for Token B at the spot price of $5, but the liquidity is thin for this pool. There are theoretically only 100 Token B available at the spot price, so to fulfill Alice’s order, the AMM must give her tokens allocated to values above the spot price. Alice only receives 350 Token B, because her swap moved the price.

Since liquidity is spread out equally across a price curve from zero to infinity, the vast majority of tokens represented on this curve are never utilized for swaps except in pools with extremely low liquidity.

What does this mean for LPs, the people whose tokens are being used to facilitate these swaps? Their capital is being deployed inefficiently and could be put to good use elsewhere; only a very small fraction of their deposited tokens will generate revenue from facilitating swaps, and the rest of the tokens are sitting idle.

Providing liquidity to a first-generation AMM is like throwing your tokens into a bag with everyone else’s tokens, and everyone splits the fees proportionate to how many tokens they’ve contributed to the bag. Consequently, users who deposit the most liquidity will earn the most fees.

Providing tokens to x*y=k also means that a significant amount of liquidity is siphoned from the rest of DeFi to support decentralized trades, one of the most important services in DeFi. Billions of dollars worth of tokens are sitting as idle capital on AMMs so a much smaller proportion of tokens can be used to facilitate swaps and earn fees.

How Do Concentrated Liquidity Market Makers Increase Capital Efficiency?

When LPs provide liquidity on a CLMM, they can choose the price range where they would like their tokens allocated, for example, from $20-$30. This range is broken down into “ticks,” where liquidity is distributed equally.

For example, in the range of $20-$30, there could be a tick for $21 tokens, $22 tokens, and so on. The tokens remain supplied in these ticks until they are withdrawn, and an LP cannot receive fees if the market value of the tokens they’ve supplied moves outside their set range.  

Tokens provided on a CLMM are not spread out across a massive price range and instead are supplied at or around the current market value of a token, so capital efficiency is increased exponentially compared to first-generation AMMs. With a CLMM, it no longer takes 1,000 tokens to supply 10 tokens at the current token price. For LPs, 10 tokens deposited in a CLMM can return the same yield as 1,000 tokens inefficiently deployed from zero to infinity.

Allocating liquidity more efficiently is a boon for LPs, traders, and projects. LPs can collect more fees earned with fewer tokens deposited (that can be used to earn yield elsewhere in DeFi), traders can experience less slippage, and projects can more efficiently realize deep liquidity for their tokens without having to deploy capital that could be used elsewhere for growth.

How To Configure Your Position and Provide Liquidity on CLMMs

The ability to choose a price range makes CLMMs similar to an order book. You get to choose the price range where you would like to provide liquidity, and you can also select what fees you’d like to receive as an LP.

Providing Liquidity for Stable Pairs

Here’s an example of what it looks like to provide liquidity for USDC/USDH on Invariant (USDH is the quote token, and the price shown is USDH per USDC). The green line on the chart reveals where liquidity is already available, and the purple lines show the range we’ve selected for providing our liquidity. Most liquidity has been allocated around the current price.

Invariant clmm concentrated liquidity amm
Setting up a range for providing stablecoin liquidity on Invariant.

Suppose we want to provide liquidity at a range equidistantly above and below the current price of USDH (between -0.10% and +0.10%). Notice how the 0.01% fee is highlighted as “best,” since this rate will likely attract swaps, and both assets are relatively stable (less risk). Also, notice that we must supply more USDH, since USDH is trading slightly lower than the value of USDC.

Let’s see what happens if we change the minimum side of the price range (between -0.02% and +0.10%).

cykura clmm solana concentrated liquidity amm
Moving the lower bound of the range closer to the current price affects token deposits.

Check it out! We’ve leveraged our position and can supply much less USDH than USDC. The converse applies if we adjust the upper bound of the range to a concentration closer to the current price (between -0.10% and +0.02%).

what is a clmm concentrated liquidity stableswap
Moving the upper range closer to the current price affects token deposits as well.

We will have to supply much more USDH than USDC for this extremely concentrated position. Another option for adjusting your range on Invariant is sliding a bar that sets the concentration of your liquidity provision.

how to use a clmm on solana
Invariant allows users to add liquidity by choosing their concentration threshold.

By sliding the bar to the extreme right, we have attained a -0.10% to +0.10% range around the current price of USDC in terms of USDH. This is considered a risky concentration, because if the price rises or falls outside of this range, we experience 100% impermanent loss (IL).

With a CLMM, we can end up with a position that is entirely composed of one token until the price comes back into our set range. We also cannot collect fees when the price exceeds our range.

Less volatile assets, like stablecoins, will have more ticks within a price range than more volatile assets, so you can provide liquidity with incredibly granular precision. Since we are LPing stablecoins, price fluctuation is less extreme, and we can concentrate liquidity more tightly without going out of range, missing out on fees, and experiencing IL.

We can also close our position, swap our 100% position in one stablecoin into an even split, and then set a new position around the new price point. Thankfully, since we are doing this on Solana, the fees for executing these transactions are extremely low.

Providing Liquidity for Volatile Assets

The tick spacing for LPing more volatile assets is less precise than for LPing two stablecoins. In addition, the fees are usually higher as price volatility increases the risks of incurring IL, so the rewards can be set to reflect this risk.

uniswap v3 clmm amm
Fees for providing liquidity for unstable pairs are usually set higher than stable pairs.

The only pool currently available on Invariant for SNY/USDC is set to a 0.3% fee rate, since SNY is a more volatile asset than stablecoins. You can create a pool for any token pair and at any fee rate you choose on Invariant, but right now, only the 0.3% fee pool has been created.

Similar to LPing stablecoins, adjusting the parameters of the range around a token’s current price will affect deposit amounts. You can also choose to provide liquidity outside the current price range if you think the market will move soon, and then you only need to deposit one token.

clmm yield farming solana
Deposit single assets when your range is beyond the current price.

If we think SYN will appreciate in price and want to provide liquidity at a higher price range, then we only need to provide SNY. The opposite is true if we believe SYN will trade at a lower range than it does now.

cykura invariant lifinity whirlpool orca
You can also deposit a different single asset depending on your range placement.

You can begin earning fees if and when the asset moves into this range. If a rewards program has been set up to incentivize deposits, you will not earn rewards until you provide liquidity around the current price range.

Trading strategies can apply to providing liquidity for volatile pairs. Since you’re pairing a volatile asset with a stablecoin, you will end up with a 100% stablecoin position if prices move above your range, which is essentially a sell order that earns fees instead of paying them.

Considerations When Providing Liquidity on CLMMs

A study performed half a year after the release of Uniswap V3, the first DEX to introduce the CLMM, found that less than half of the LPs using the CLMM were making a profit compared to holding tokens.

Providing a CLMM with liquidity can require a lot of active management if you want to keep your concentrated position tightly around the current price. This means you’ll have to close your position and set up a new range when prices move towards the boundaries of your current range, or you’ll experience IL and earn zero fees.

This can be incredibly expensive on Ethereum Virtual Machine chains (EVM) that face problems with scalability issues and high fees during high traffic periods. On Solana, this isn’t an issue, since executing transactions on Solana costs less than a penny; however, you will still end up with 100% of the less valuable token LPed if prices wander outside of your range.

Another thing you don’t have to worry about when providing CLMM liquidity on Solana is just-in-time (JIT) liquidity. This is when validators notice a large trade being executed via a CLMM in the mempool and deposit liquidity just in time and at a very high concentration to collect the most fees. Solana has no mempool, so this cannot happen.

Keeping your liquidity within a tightly concentrated range requires active participation in maintaining your position. Liquidity provided at a 1%-5% range has historically earned more fees than liquidity provided at more passive ranges.

uniswap v3 clmm what is concentrated liquidity market maker
Trade history from Uniswap v3 shows tighter ranges earn more fees.

One interesting feature of providing liquidity on a CLMM is that you can open multiple positions for the same token pair. Since you are not “throwing your tokens into the same big bag,” you can set positions at multiple ranges as a strategy to optimize your returns.

What's the Future Look Like for Concentrated Liquidity?

While one study showed that LPs realized losses by providing concentrated liquidity instead of holding, another study around the same time discovered that highly active LPs were in the green.

Providing liquidity to an Orca Whirlpool is not a "set it and forget it" strategy. It's been shown that the more active one maintains their range on a CLMM, the higher their ability to earn fees, and the automation of CLMM range adjustment should usher in a new wave of DeFi services benefitting the community at large.

Increasing capital efficiency in DeFi means much of the TVL trapped in AMMs that goes unused can be spread across the ecosystem.

Increased capital efficiency in DEX trades benefits users seeking additional yield opportunities by maximizing their tokens on hand, and the entire DeFi community should benefit from the boost in liquidity.

Much like the way liquid staking tokens allow tokens to be staked to secure Proof of Stake (PoS) blockchains and be used as liquidity on DEXs and lending platforms, CLMMs address inefficiencies of the current DeFi system, and this could mean extraordinary possibilities for DeFi.

This article is not financial advice. Always do your own research before participating in DeFi.

Keep in Touch

Website | Twitter | Telegram | Discord | Email | Reddit

You've successfully subscribed to Hubble Blog
Great! Next, complete checkout to get full access to all premium content.
Error! Could not sign up. invalid link.
Welcome back! You've successfully signed in.
Error! Could not sign in. Please try again.
Success! Your account is fully activated, you now have access to all content.
Error! Stripe checkout failed.
Success! Your billing info is updated.
Error! Billing info update failed.