Sirwin
Sirwin
Liquidity pool

What is a Liquidity Pool?

By Bichoco | BiChoco | 26 Jul 2020


Decentralized finance is a constantly evolving ecosystem. New concepts, which are not always easy to understand, are emerging. Among these concepts, you may have heard about Liquidity Pools, the backbone of protocols such as Uniswap or Compound. Let's see together what these famous liquidity pools are.

The Liquidity Pool (or cash reserve) is a pool of tokens blocked in a smart contract. They are used in various projects, such as decentralised exchange platforms or lending protocols.

Thus, these reserves are used by two types of actors:

  • Liquidity providers.
  • The users of this liquidity.

On the one hand, liquidity providers deposit tokens in the reserve in exchange for a reward (fees, interest, etc.). On the other hand, the users of this liquidity access it to carry out various actions such as exchanges or loans.

Before we understand how they work, let's go back to the problem they solve.

As we have seen, these liquidity pools are used by protocols with diametrically opposed purposes. Indeed, they are used by decentralized exchange protocols (DEXs) such as Uniswap or Balancer, as well as by lending protocols such as Compound or Aave.

In all of these cases, they meet the same need: to ensure the presence of liquidity, at all times, in the protocol.

The case of decentralized exchanges seems to be the most propitious for understanding their usefulness.

You are probably familiar with services such as Coinbase or Binance. These exchange platforms operate through a system called order book.

In this model, buyers and sellers come together to place their respective orders. For trading to take place, the price set by the buyer must be the same as the price set by the seller.

To do this, players called market makers come into play. These are private individuals, professionals or companies, ensuring that each order is completed by providing their own liquidity, hoping to take advantage of the spread (difference between the buy and sell price) on a given market. It is these market makers who ensure the liquidity and usability of an exchange.

However, this mechanism is extremely complicated to set up in a decentralised manner. Indeed, the market maker's activity requires the permanent placement or withdrawal of buy and sell orders.

However, the current blockchains are performing poorly in terms of actions that can be achieved in a short period of time. In other words, the lack of transactions per second makes decentralised order books very inefficient.

Also, unlike Binance or Coinbase, each order published in an order book on Ethereum costs gas, whether or not it is completed. As a result, a market maker on Ethereum would ruin himself in gas costs, even before taking advantage of the potential benefits of his activity.

This is why a new solution had to be found to ensure decentralised exchanges. This solution lies in the use of Liquidity Pools and automated market makers.

Their operation is relatively basic. Cash suppliers provide tokens in exchange for a reward. After that, anyone can use that cash according to the mechanisms of the protocol.

The Uniswap case

Because this is the most telling example, we will describe how Uniswap pools work. In this case, liquidity providers deposit a pair of assets, for example, the DAI/ETH pair. A ratio of 50/50 is set by the protocol, so when a user adds 1 ETH to this pair, he must necessarily bring the same value in DAI.

Thereafter, anyone wishing to trade between either of the assets will tap one side of the pool while depositing on the other. For example, if we wish to exchange ETH into DAI, the protocol takes our ETH and sends us the corresponding DAI value in exchange.

In order to ensure that the protocol has liquidity at all times, the protocol uses an automatic market maker formula. Thus, during a swap, the amount returned is based on the ratio between the two tokens in the pool (in our case ETH/DAI). However, the larger the order you place in relation to the size of the pool, the worse the rate you will get as the ratio moves along the curve. This phenomenon is called slippage.

Of course, other protocols use different formulas. For example, Balancing allows you to create pools with different ratios than the classic 50/50. On the other hand, lending protocols also use liquidity pools with a relatively similar operation.

And that's it, we've done the rounds of the famous liquidity pools! Although the concept itself is not particularly complicated, it is a revolution in the ecosystem of decentralised finance. Since its inception, many protocols have adopted it. Among them, Uniswap, Balancer, Compound, Pooltogether, Nexus Mutual and many others. The future will probably bring new projects and new ways of using liquidity pools.

How do you rate this article?

7



BiChoco
BiChoco

Interested by finance, cryptos and sports ;)

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.