DeFi News

How Do Liquidity Pools Work?

Pinterest LinkedIn Tumblr
IMG Source: CoinMarketCap

Decentralized finance is a revolutionary paradigm out of which new concepts, ideas and models are emerging that are not always easy to understand. One of these, Liquidity Pools, are becoming widely used instruments. An often seen term is Liquidity Pool, usually abbreviated with LP. Liquidity pools represent the backbone of important protocols such as Uniswap or Compound.

But what is a liquidity pool, and more importantly, what is it used for?

What is a liquidity pool?

Liquidity pools (or liquidity reserves) are reserves of tokens maintained in a smart contract. The liquidity pool tool is used in various categories of DeFi projects, such as decentralized exchanges or lending protocols.

Liquidity pools involve two types of actors in decentralized finance:

  • Liquidity Providers
  • Liquidity Users

On the one hand, liquidity providers deposit their tokens in the liquidity pool in exchange for a reward (fees, interest, etc.). On the other hand, there are users who benefit from this liquidity. They access it to perform various actions, such as trading or lending.

Before understanding more deeply how liquidity pools work, we should first address the reason for their existence. What problem do they solve?

What is the purpose of a liquidity pool?

As mentioned earlier, liquidity pools are widely found within the DeFi industry. They are used in a broad range of protocols, some of which have completely different functions. For example, they are present in decentralized exchange protocols (DEX) such as Uniswap or Balancer, as well as in lending protocols such as Compound or Aave.

Although the protocols are different, liquidity pools meet the same need: to ensure the presence of liquidity in the protocol at all times.

Liquidity pools in decentralized exchanges

The use case in decentralized exchanges seems the most favourable for understanding the usefulness of liquidity pools. You are probably familiar with services such as Coinbase or Binance. These trading platforms operate through a mechanism called an order book.

In this model, buyers and sellers come together to place their respective orders. For the trade to be successful, the price set by the buyer must match the price set by the seller. To facilitate and smooth the exchange activity, actors called market makers come into play.

These are individuals, professionals or companies, who provide their liquidity to ensure that each order is completed. They earn from the spread (the difference between the selling and buying price) on a given market. It is these market makers that ensure the liquidity and usability of an exchange.

This mechanism is extremely complicated to implement in a decentralized manner. Market maker activity requires the permanent entry or withdrawal of sell or buy orders. The problem is that current blockchains perform poorly in terms of operations which can be carried out in a short period of time.

In other words, they suffer from poor performance, rendering order books very impractical.

Furthermore, unlike Binance or Coinbase, every order in an order book on the blockchain, whether entered or revoked, must deal with the cost of gas, be it completed or not.

At this rate, a market maker on the blockchain could have greater losses from gas costs than potential profits from its activity.

From these limitations comes the need to find a new solution, to enable decentralized exchanges to take place effectively and efficiently.

This involves the use of liquidity pools and automated market makers, also known by the abbreviation AMM.

How do liquidity pools work?

The operation of liquidity pools is relatively simple.

Liquidity providers make their tokens available to the protocol in exchange for a reward. Subsequently, anyone can use those cryptocurrencies depending on the mechanics of the protocol.

Let’s look at the case of Uniswap.

Since this is the most popular DEX in the DeFi space, we will analyze how Uniswap’s liquidity pools work.

On Uniswap, liquidity providers deposit a pair of assets, for example the DAI/ETH pair. A 50/50 ratio is set by the protocol, so when a user adds 1 ETH to this pair, they must necessarily provide the corresponding value in DAI.

In order to ensure that the protocol has permanent liquidity, Uniswap uses the automated market maker formula.

It means that during an exchange, the amount paid depends on the ratio between the two tokens in the pool (in our case DAI/ETH).

From this, it follows that the higher the order placed in relation to the size of the pool, the worse the exchange ratio will be as the ratio moves along the curve.

This phenomenon is called slippage.

Other protocols may use different formulas.

Balancer, for example, allows the creation of liquidity pools with ratios other than the classic 50/50. Even lending protocols use liquidity pools that work in a relatively similar way.

Write A Comment

chainlink
Chainlink (LINK) $ 25.07
yearn-finance
yearn.finance (YFI) $ 29,878.00
ethlend
Aave [OLD] (LEND) $ 2.53
uniswap
Uniswap (UNI) $ 20.39
havven
Synthetix Network Token (SNX) $ 7.75
uma
UMA (UMA) $ 13.41
compound-governance-token
Compound (COMP) $ 289.24
maker
Maker (MKR) $ 3,079.34
wrapped-nxm
Wrapped NXM (WNXM) $ 73.13
0x
0x (ZRX) $ 1.18
loopring
Loopring (LRC) $ 2.87
republic-protocol
REN (REN) $ 0.905878
kyber-network
Kyber Network Crystal Legacy (KNCL) $ 2.00
numeraire
Numeraire (NMR) $ 40.51
band-protocol
Band Protocol (BAND) $ 7.79
terra-luna
Terra (LUNA) $ 55.95
yfii-finance
DFI.money (YFII) $ 3,504.15
sushi
Sushi (SUSHI) $ 7.50
balancer
Balancer (BAL) $ 21.21
thorchain
THORChain (RUNE) $ 11.16
reserve-rights-token
Reserve Rights Token (RSR) $ 0.051658
ampleforth
Ampleforth (AMPL) $ 1.26
nest
Nest Protocol (NEST) $ 0.011268
serum
Serum (SRM) $ 5.49
keep-network
Keep Network (KEEP) $ 0.853637
augur
Augur (REP) $ 21.93
curve-dao-token
Curve DAO Token (CRV) $ 4.71
kava
Kava (KAVA) $ 5.04
bancor
Bancor Network Token (BNT) $ 4.10
just
JUST (JST) $ 0.075497
gnosis
Gnosis (GNO) $ 454.57
force-protocol
ForTube (FOR) $ 0.076672
cream-2
Cream (CREAM) $ 35.03
melon
Enzyme (MLN) $ 106.60
tellor
Tellor (TRB) $ 53.74
akropolis
Akropolis (AKRO) $ 0.031705
aurora-dao
IDEX (IDEX) $ 0.376996
nectar-token
Nectar (NEC) $ 0.115536
bzx-protocol
bZx Protocol (BZRX) $ 0.292287
airswap
AirSwap (AST) $ 0.431682
switcheo
Switcheo (SWTH) $ 0.015393
orion-protocol
Orion Protocol (ORN) $ 8.38
dforce-token
dForce Token (DF) $ 0.174301
meta
mStable Governance Token: Meta (MTA) $ 1.55
pnetwork
pNetwork (PNT) $ 1.26