Liquidity Pools in DeFi

Getting Started with Liquidity Pools

Decentralized Finance (DeFi) created a more accessible, cheaper, and more convenient way of executing financial transactions. It allowed users to manage their assets more securely and favorably in cryptocurrency markets. This generally shows through the liquidity pools in DeFi.

Prior to the inception of DeFi, users stored cryptocurrency assets on centralized exchanges like Coinbase, Binance, and others. Although it is a good option for fund liquidity, its security risks can completely ruin users’ assets since it retains custody of their assets. Users risk losing everything they own if the platform is confined to a security breach.

However, DeFi protects users from this primary risk exposure. DeFi makes it possible through a mechanism called Liquidity Pool.

A Liquidity Pool is the backbone of any exchange, whether centralized or decentralized.

What is Liquidity Pool?

A Liquidity Pool is a collection or storage of cryptocurrencies or digital assets where users can keep their digital assets to ensure enough liquidity so anyone can exchange assets anytime.

The transaction runs through a smart contract without an intermediary, in which users can deposit their assets in exchange for rewards for supplying liquidity to the protocol. 

It aims to facilitate a trustless, automatic, and more accessible transaction on a Decentralized Exchange (DEX) platform.

Anyone can provide liquidity by depositing funds in a liquidity pool. Individuals depositing assets are known as Liquidity Providers (LPs). 

The trading fees accumulated as a result of any token swaps in that liquidity pool are distributed to the liquidity providers as rewards for their asset contributions to the liquidity pool.

So, that’s how the liquidity pool powers decentralized exchange platforms. Now, let’s break down the elements that govern the liquidity pool.

Elements of a Liquidity Pool

The Liquidity Pool consists of three main elements to run as follows: 

  1. Liquidity Provider (LP)

A liquidity provider is an individual who deposits his digital currencies into a specific liquidity pool to provide liquidity to a decentralized exchange platform. 

In exchange for your deposits, the exchange platform issues a token called LP Tokens (Liquidity Provider Tokens). 

  1. Pool Funds

A pool is where the liquidity provider deposits his cryptocurrencies for the platform to use. 

In a DEX platform, the liquidity pool consists of a dual asset pool, creating a market of two cryptocurrency pairs, such as ETH/DAI.

  1. Liquidity Pool Platform Category

Although a wide range of decentralized platforms uses liquidity pools to support the protocol, these can generally be divided into the following categories:

  • Lending Platforms (Single Asset Liquidity Pool)

Lending platforms are a simple, decentralized market for borrowing and lending. It employs only one asset deposited in the liquidity pool of assets. 

Therefore, if someone wants to lend his tokens, he must deposit his tokens in the liquidity pool. He need not communicate with the borrower but through a smart contract. 

The most popular examples of lending platforms are Compound, Maker, and AAVE.

  • Decentralized Exchange Platforms (Dual Asset Liquidity Pool)

Two tokens make up a decentralized exchange liquidity pool. The ratio at which both tokens would be deposited into the pool is decided by an algorithm called Automated Market Makers (AMMs).

The AMM algorithm makes sure it adjusts asset prices such that this value-to-price ratio is always 1:1.

For example, there are 10 ETH and 30,000 DAI in an ETH/DAI pool. ETH cost is calculated as 30,000/10, which amounts to 3,000 DAI. 

Therefore, considering the AMM price for 1 ETH is 3,000 DAI, the liquidity provider will be required to deposit his tokens exclusively in this ratio. That means a provider who wants to deposit 5 ETH would also need to deposit 15,000 DAI.

Some examples of DEX platforms are Uniswap, Sushiswap, Bancor, and Riverex.

How Do Liquidity Pools Work?

The basic format of a liquidity pool consists of two tokens, which establishes a new market exchange for the assets.

Let’s say a liquidity provider created a new pool; he now sets the initial assets exchange rate within the pool. Then each following provider has to invest an equal amount of tokens into the pool. The AMM protocol will automatically set the rate of the second token based on the number of tokens available in the pool. 

For example, if a user wants to swap ETH from a DAI/ETH pool, the supply of ETH increases while the supply of DAI decreases. Therefore, the swap lowers ETH’s price while increasing DAI’s price. 

The liquidity provider also sets the fee on which the commission rates or LP Tokens will be based. These LP Tokens will be calculated on how much liquidity providers supply to the pool. So, if someone swaps tokens on the pool, the LP commission is distributed among all the members of the pool.

Therefore, maximizing the members’ profit while securing the liquidity of the pool. Should the LP decides to extract the assets from the pool, the interest received will be sent directly to the user’s wallet right after the transaction.


Providing liquidity to a pool provides liquidity in DEX platforms, operates the DEX without intermediaries or order books, and lets users earn passive income.

To create your own liquidity pool in the Riverex platform, we have created a step-by-step guide to help you on your pool journey.