What Are Liquidity Pools in DeFi and How Do They Work?

By Bolide | Bolide Finance Blog | 26 Jul 2022


Today we are going to understand what liquidity is in general, why liquidity pools are needed, how they relate to the cryptocurrency market, and why liquidity pools are one of the most important elements for decentralized exchanges. Additionally, we will explain how they work, and even examine what liquidity mining and yield farming are, and designate risks.

Let’s start from the beginning. What is liquidity?

Imagine, you have some assets, such as a car, real estate, securities, and money itself. Each of these assets can be converted into a cash equivalent. Liquidity, in a crypto context, refers to the ability to make these conversions. It turns out that cars and real estate are low-liquid assets because their value falls over time and, if you are unlucky, you can spend weeks selling them. Securities are highly liquid assets, as they are in high demand, which leads to them being sold quickly on the stock exchange. Money is the most liquid asset.

What is a liquidity pool? And what does this have to do with cryptocurrency?

Everything! Cryptocurrency is an easy asset to exchange, but it is important to know that for this exchange to happen as quickly as possible, market participants store their assets into some kind of vault to create a trading source for anyone wishing to exchange this asset. This is called a liquidity pool.

This is especially relevant for small tokens, as exchanges often simply don’t have that many coins for large buyers.

Basically, a liquidity pool in cryptocurrency is a stock of tokens, which are fixed on the balance of a special smart contract (an algorithm, which in this case automatically ensures the correct operation of the exchange). A pool is necessary to organize trading on decentralized exchanges.

Why a liquidity pool is necessary for DeFi, and how this mechanism works on a centralized exchange like Binance

DeFi is literally decentralized finance.

As DeFi expands, it encompasses all financial transaction applications and services that run on public blockchains.

Why decentralize finance? So that more people can access information, thanks to open-source protocols. DeFi provides an alternative to the usual banking instruments, which charge huge commissions on transactions, loans and trades. DeFi is a financial system between people, and provides an opportunity for people to make money for themselves, instead of for major financial institutions. Transactions are free from interference by authorities and users can control their assets. Popular decentralized exchanges (DEX) are UniSwap, MDEX, SushiSwap, BurgerSwap, JastSwap.

Swap, swap, swap!!! If you make your DEX, insert the word swap — maybe that’s the secret to success.

To ensure the existence of a cryptocurrency exchange, a stock of assets is necessary. In a centralized exchange (CEX), this function is performed by an order book: sellers want to sell tokens at a higher price, and buyers want to buy at the lowest price. If the participants of the process cannot agree on the price and there is no exchange, then market makers — owners of a large number of assets who are always ready to buy/sell tokens at a fair but still more favorable price — come into play to maintain trading activity. This makes the process seamless, and you don’t have to wait for someone to deign to put their tokens on the exchange.

DEX has automatic market makers or AMMs instead of big market players. This is an algorithm that changes the rate of tokens depending on the exchange of tokens taking place in the liquidity pool. That is, if the LP with the currency pair DOGE/ETH buys more ETH, this cryptocurrency becomes more expensive, while DOGE reduces in value.

How liquidity pools work

Let’s define the participants of the process: you can buy or sell cryptocurrencies, and you can become a liquidity provider. If everything is more or less standard with buying/selling, then the liquidity provider is essentially an investor. How does one become a liquidity provider?

To create a pool, market participants contribute two types of tokens to form a 50/50 currency pair. For example, DOGE for $1,000,000 and ETH for $1,000,000. The starting rate is determined by the first contributor. If the rate seriously differs from the generally accepted one on the world market, the participants may get into arbitrage and lose the invested money. Therefore, maintaining a balance between tokens is very important.

After the transfer of assets, each provider receives LP-tokens equal to the contribution of real cryptocurrency and locks its coins in a smart contract. Investors earn a DEX commission, which is charged when coins are bought/sold, according to their initial deposit. Typically, the exchange commission is 0.3%-0.5% The biggest part of this commission goes to liquidity providers. So, for example, if the total pool is $100 and Mr N invested $1, he would earn $0.03. But it is good to know that if you want to withdraw your funds and leave the pool, you must burn your LP-tokens.

What if a buyer comes along who is willing to take a lot of cryptocurrencies? So that this does not greatly affect the exchange rate, protocols such as Balancer motivate depositors to invest in small pools for their growth. After all, liquidity providers make money on transaction fees, and if the rate is unfair, there will be fewer transactions. Thus, large liquidity pools are more sustainable and are the ultimate goal of both investors and market participants.

The process of rocking a pool is called liquidity mining, and the investment itself on the part of investors to further profit from financial transactions is called yield farming. The latter two concepts exploded the cryptocurrency information field in 2020 and continue to gain momentum, as they represent new ways of making money, with their own sophisticated strategies for depositing and withdrawing cryptocurrency and distributing it among venues.

If finance is decentralized, how do you know if the system is working?

There is a Total Value Locked — TVL — for that.

This is the amount of all blocked assets on DeFi-Landings and other services.

DeFi-Lending is a lending tool where the user deposits his/her funds to receive interest from them or, conversely, borrows against the collateral him/herself. The assets are on a smart contract, so you do not interact with the other party, and the process happens directly. We’ll cover lending in the next article.

So there we go, TVL is an index that generally measures the market for yield farming. If you need, you can also segment the market and compare this index between segments. The calculation can be done with DeFi’s tool, DeFi Pulse. The higher the TVL index, the more locked-in assets there are in the liquidity pools, hence they will produce good returns. Most often, TLV is measured in ETH, USD, and BTC.

What types of liquidity pools exist now?

For example, Uniswap uses basic types of pools, in other words, these are two cryptocurrencies where the rate is directly dependent on buy/sell.

But this strategy is not suitable for all types of transactions, as there are assets whose price should not change from supply or demand. These are assets that are tied to real money, such as the dollar. These include USDT, USDC, and others. So, Curve has made a less sensitive algorithm to each exchange, which keeps a stable rate.

Another way of development is offered by Balancer protocol: the creators have no limits on two types of coins in one loyalty pool, and can increase the volume to 8 types of tokens.

What can go wrong?

  • System bugs in the code, which is the problem with everything made on the blockchain.
  • Investors’ assets are locked into a smart contract. That means they are not on the exchange, and the liquidity provider cannot use it normally, namely by using stop-losses and take-profits.
  • False tokens. A centralized exchange has a complex algorithm for verifying tokens, in contrast to DeFi, where the protocols are open and the responsibility for checking tokens falls on the market participants themselves. It leads to you not being able to sell such tokens.
  • Impermanent Loss. Here, let’s elaborate. Impermanent Losses are formed due to a large divergence in the price movements of tokens in a pair. That is, if you want to withdraw your assets, they may be at a rate less than the ones you invested. Therefore, it is recommended to invest in pairs of two stablecoins, or in a pool where one stablecoin moves similarly to the second token. Impermanent Loss can be predicted with the Impermanent loss calculator.

That’s all, ladies and gentlemen! Try the DEX you like because the future is moving in this precise direction. Read the documentation carefully and don’t fall for any scams such as false tokens. XOXO and much love.


How do you rate this article?


Bolide Finance Blog
Bolide Finance Blog

Welcome to Bolide Blog. Here we will publish our notes on how your crypto can make money!

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.