An Introduction to Liquidity Pool Farming

09 Feb 2022 Defi

Liquidity Pool is a big part of DeFi (Decentralized Finance) with very high yields ranging from 10-300%. A good and stable pool would be around 30%. It is a good investment as you are holding on to a pair of tokens, while they earn passively.

In this post I will give a quick introduction what they are, and how you can get started.

👉🏻 You can also watch this step-by-step video on how I farm on Raydium.

What is Liquidity Pool?

A Liquidity Pool (LP) is made up of 2 tokens for anyone to swap them. An LP investor will add the 2 tokens with exactly equal value into the pool.

This is thus becoming a Decentralized Exchange (DEX) operator, but for only a single pair of token eg. SOL-USDC. This provides instant liquidity using Automated Maket Maker. In comparison, centralized exchange use a book order to match buyer and seller.

In other words, DEX has make it possible for anyone to operate an exchange and earn from it!

Why invest in a pool?

As a Decentralized Exchange, you will earn trading fees, just like Centralized Exchange. But everybody who invested in the pool earns!

Trading fees is around 0.3%, and this profit will be distributed to the platform and added back to the pool (which you will take when you withdraw).

Moreover, there are bonus rewards from participating in certain LP. You can receive other tokens, aka project emissions. These are free tokens that you can hold, or sell for extra cash.

How to get started?

There are many DEX platforms, and they support different networks. So depending on which network you want to play this DeFi game, there will be different DEX to choose from.

A good starting place is Defi Llama. Select a network (aka chain/blockchain/L1 layer) to see all the Defi (not just DEX, but includes Lending etc).

By default, it is sorted by Total Volume Locked (TVL), which is the total value of all the tokens that are in the liquidity pools.

Choose one with high TVL, as they should be safer as they probably have been around longer. For Solana, the biggest DEXs are:

  1. Raydium
  2. Saber
  3. Orca

Go to the DEX website and they will have a guide on how to get started.

Guide to invest in a pool

Without going into the specific details of each DEX, these are the steps:

  1. Select a liquidity pool to invest. Which pair of tokens to invest?
  2. Obtain equal value of the 2 tokens (use the swap feature if needed). Eg. For SOL-USDC, obtain $500 of SOL + $500 USDC.
  3. Add the 2 tokens of equal value to the pool. In exchange, you will get the LP token. This proves that you own a portion of the pool.
  4. Stake the LP token to earn additional incentive tokens

After some time, you will see those accumulated incentive tokens, but you need to “harvest” them to transfer them to your wallet. This harvesting incurs transaction fees, so do it when you want to use the tokens.

When you want to withdraw from the pool, you have to unstake the LP token first, then withdraw from the pool. Your LP token is the same amount, but the 2 tokens that you exchange back (hopefully) should be more, as the pool would have included the trading fees that it earns during that period.

The risks

While the pool definitely earns you trading fees and additional incentive tokens, you are taking the risk of the 2 tokens prices diverging. This is often known as impermanent loss, and there is a calculator for that.

Divergence loss is a better word. When the token prices diverge, you have a “loss” compared to simply holding them. But it is not much:

  • 1.5x price change results in a 2.0% loss relative to holding
  • 2x price change results in a 5.7% loss relative to holding
  • 4x price change results in a 20.0% loss relative to holding

So unless they diverge a lot, this loss is small compared to the LP earnings.

From another perspective, this divergence loss shouldn’t even be a concern. If you didn’t intend to simply hold those tokens, then you shouldn’t compare to the holding strategy. Instead, think of it as investing eg. $1,000 into the LP, earning the trading fees and rewards, and hoping the token price increase along the way.

As always, other risks include trust with the DEX platform and smart contract bugs.