Decentralized Finance (DeFi) ecosystem value has already surpassed the $60 billion mark.
Liquidity pools are one of the fundamental parts of the DeFi ecosystem today. It is an essential part of automated market makers (AMM), borrow-lend protocols, yield farming, synthetic assets, on-chain insurance, blockchain gaming and more.
What is a Liquidity Pool?
Liquidity Pools are the game-changing innovation in Decentralized Finance (DeFi) that facilitates trading on Decentralized Exchanges (DEX) and provide liquidity through a collection of funds locked in a smart contract.
Why do we need Liquidity Pools?
Like traditional stock exchanges, trading on Centralized cryptocurrency exchanges is based on the Order Book model, where buyers and sellers place orders. While buyers try to buy an asset at the lowest price possible, sellers try to sell it for as high as possible. For the trade to occur, both buyer and seller have to agree on the price.
What if neither buyer nor the seller converges on the price? Or, what if there is not enough liquidity for the order to get executed? That is where the concept of Market Makers comes into play. Market makers facilitate trading by willing to buy or sell a particular asset, thereby providing liquidity and enabling traders to trade without waiting for another buyer or seller to show up.
In Decentralized Finance (DeFi), excessive dependence on external market makers may result in transactions being relatively slow and expensive. That is something Liquidity Pools can address.
How do Liquidity Pools work?
In Decentralized Finance, Smart Contracts govern what happens in the Liquidity Pool. Automated Market Makers (AMMs) have been the most popular use of Liquidity Pools. Utilized by Uniswap, each asset swap facilitated by the smart contract results in a price adjustment.
A basic Liquidity Pool creates a market for a particular pair of assets on a decentralized exchange (e.g: DAI/ETH). When the Liquidity Pool is created, a liquidity provider sets the initial price and equal supply of both assets. This concept of an equal supply of both assets remains the same for all the other liquidity providers willing to supply liquidity to the pool.
Liquidity providers are incentivized in proportion to the amount of liquidity they supply to the Liquidity Pool. When the trade is facilitated, the transaction fee is proportionally distributed among all Liquidity Providers.
Different smart contracts enable various use cases of Liquidity Pools. The Constant Market Maker algorithm, for instance, ensures a constant supply of liquidity. The ratio of the tokens in the Liquidity Pool dictates the price of assets. For example, when you buy ETH from the DAI/ETH pool, the supply of ETH is reduced from the pool, and the supply of DAI is increased proportionally. This will increase the price of ETH and decrease the price of DAI.
Some smart contracts also incentivize liquidity providers with some extra tokens. This process is called Liquidity Mining.
Practical use cases of Liquidity Pools
Uniswap, a DeFi protocol used to exchange cryptocurrencies, encourages the basics of using Liquidity Pools. But many other Decentralized Exchanges rely on the core principle of Liquidity Pools while differentiating themselves in terms of their practical use cases.
For example, the concept behind Automated Market Makers (AMMs) doesn’t work well for assets with similar prices like stablecoins or wrapped tokens. Curve, an exchange liquidity pool on Ethereum, has managed to offer lower fees and slippage when exchanging similarly-priced assets through its implementation of a different algorithm.
An automated market maker (AMM) protocol Balancer came up with the concept that Liquidity Pools don’t necessarily have to be limited to two assets. It allows up to 8 tokens in a single Liquidity pool.
Drawbacks of Liquidity Pools
Impermanent losses are one of the risks of Liquidity Pools. It results in a temporary loss of funds by liquidity providers because of volatility in a trading pair.
The bigger the Liquidity Pool in proportion to trade, the smaller the difference between the expected price at which the trade is executed. This price difference is called slippage. Since larger Liquidity Pools can accommodate more significant trades they create less slippage, which results in a better trading experience.
To recap, Liquidity Pools eliminate the need for Centralized order books while significantly reducing the dependence on external market makers to provide constant liquidity supply to Decentralized exchanges.