Providing Concentrated Liquidity (CLMM) - TUTORIAL

in #hive-16792218 hours ago


Source

The other day, I was learning more about Concentrated Liquidity Pools on Solana, and I thought it would be a good idea to do a quick tutorial for others who want to venture into this area of DeFi. This tutorial will be about Solana Liquidity Pools, but the basic idea is transferrable to other protocols.

What is Concentrated Liquidity?

Concentrated Liquidity is not a new concept, but since I know that most of my readers are not used to this concept, I will provide a brief overview.

However, I recommend that you study this concept in depth before jumping in because there are a few peculiarities that are very important to understand.

Concentrated Liquidity allows liquidity providers to allocate liquidity in a predefined price range. Unlike traditional XYK liquidity pools, where liquidity is spread uniformly across the entire price range, Concentrated Liquidity pools allocate liquidity more efficiently by offering a high degree of flexibility and control for liquidity providers to decide how they wish to allocate their capital.

This type of pool typically allows providers to achieve very high yields; however, they come with a cost.

Because you only earn a share of the trading fees while the market price is within your range, Concentrated Liquidity providers must actively monitor and manage their positions to ensure they stay within range for as long as possible.

As I mentioned, this is only a brief overview and I suggest you are comfortable with the implications of providing concentrated liquidity before making any significant investments.

Now that we have that out of the way, let's get to the actual tutorial.

What you need

Here is what you need to follow this tutorial step-by-step:

A DEX that supports Concentrated Liquidity Pools (I'll use Raydium)
A wallet supported by the DEX you choose (I'll use Ctrl Wallet)
A balance of the base token of the network you chose in your wallet (I'll use $SOL)

Once you have all of the above, you'll be ready to roll.

Providing Concentrated Liquidity on Raydium

Go to Raydium, click on "Connect Wallet" and sign the transaction on your wallet to connect to the DEX.

Before getting to the actual Liquidity Pools, it's essential to make sure you have a balance of both of the tokens you will pair in the pool. If you need to make adjustments, use the "Swap" function on Raydium. It's very straightforward and works the same as most swap interfaces.

Once you have that covered, click on "Liquidity". By default, you should be redirected to the Concentrated Liquidity Pool list. If not, click on the "Concentrated" tab.

Scroll the list to locate the pool to which you want to provide liquidity. In this case, we will pick the SOL-USDC pool. Once you have your pick, click "Deposit" on the right.

The first thing you need to do is set your price range on the left part of your screen. You can do that by dragging the blue sliders on the chart, clicking the "+" and "-" buttons on the "Min" and "Max", manually inputting the values or clicking any of the preset buttons right below the price fields.

This is a crucial step, and it will define key characteristics of your position, so make sure you understand and are comfortable with these settings.

You will notice a narrower range results in a higher estimated APR, but remember; you will only earn anything while the market price is within your range, meaning that a very narrow range can potentially increase your efforts in monitoring and adjusting your position.

Your price range will also define your deposit ratio, so make sure to consider that also.

Once you're happy with your price range, go to the right part of the screen and set the deposit amount. This will be defined by two things: your balances of each of the tokens you are pooling and the deposit ratio, which, as I said before, is a consequence of your price range settings.

Note: you will need some SOL to pay for the fees to perform actions on the DEX, such as creating and managing your position, claiming (harvesting) your rewards and so on, so depositing 100% of your SOL balance in the pool may not be the best idea.

When you are ready, click on "Create Position". You will be prompted to confirm the transaction on your wallet. Do that and wait for the transaction to be confirmed.

If everything goes well, you will receive a confirmation notification and a popup letting you know that an NFT representing your Liquidity position was minted and sent to your wallet.

This is very important: do NOT lose, transfer or delete this NFT. If you do that, your position will be lost. You don't need to do anything with the NFT itself, so just leave it in your wallet and don't touch it.

After your transaction is confirmed, you can go to the "Portfolio," where you can check and manage your positions.

Final thoughts

Providing Concentrated Liquidity can be very lucrative, but due to the particularities of this type of investment, it's crucial to understand all the details of the operation.

Before making any decision, understand the basics of liquidity pools, the implications of setting a price range, what impermanent loss is, and ask yourself whether you are comfortable with the associated risk.

If you decide to provide concentrated liquidity, actively monitor your positions to ensure the market is within your price range.

Posted Using INLEO