DeFi liquidity pools, explained
What are DeFi liquidity pools?
A DeFi liquidity pool is a smart contract that locks tokens to ensure liquidity for those tokens on a decentralized exchange. Users who provide tokens to the smart contract are called liquidity providers.
DeFi liquidity pools emerged as an innovative and automated way of solving the liquidity challenge on decentralized exchanges. They replace the traditional order book model used by centralized crypto exchanges, which was lifted directly from the established financial markets.
In this model, the exchange serves as a marketplace where buyers and sellers come together and agree on prices for assets based on the relative supply and demand. However, this model depends on there being enough buyers and sellers to create liquidity. Therefore, the market makers’ role exists to ensure that there is always someone to meet the demand, effectively keeping prices fair by contributing liquidity.
The basic model has proved to be ineffective for a decentralized exchange. Ethereum’s gas fees and slow block time make it unattractive to market makers, resulting in low liquidity for DEXs’ attempt to replicate the order book model. Therefore, liquidity pools have become the go-to solution of choice in decentralized finance, offering continuous, automated liquidity for decentralized trading platforms.
How do DeFi liquidity pools work?
The simplest version of a DeFi liquidity pool holds two tokens in a smart contract to form a trading pair.
Let’s use Ether (ETH) and USD Coin (USDC) as an example, and to make it simple, the price of ETH can be equal to 1,000 USDC. Liquidity providers contribute an equal value of ETH and USDC to the pool, so someone depositing 1 ETH would have to match it with 1,000 USDC.
The liquidity in the pool means that when someone wants to trade ETH for USDC, they can do so based on the funds deposited, rather than waiting for a counterparty to come along to match their trade.
Liquidity providers are incentivized for their contribution with rewards. When they make a deposit, they receive a new token representing their stake, called a pool token. In this example, the pool token would be USDCETH.
The share of trading fees paid by users who use the pool to swap tokens is distributed automatically to all liquidity providers proportionate to their stake size. So if the trading fees for the USDC-ETH pool are 0.3% and a liquidity provider has contributed 10% of the pool, they’re entitled to 10% of 0.3% of the total value of all trades.
When a user wants to withdraw their stake in the liquidity pool, they burn their pool tokens and can withdraw their stake.
What are the examples of major DeFi liquidity pools?
There are several platforms that became exceedingly popular in 2020.
The example above is a simple one based on the Uniswap model, the biggest decentralized exchange operating some of the largest liquidity pools. At the time of writing, there is around $250 million in the USDC-ETH pool. Other popular pools on Uniswap include WBTC-ETH, DAI-ETH and ETH-USDT.
Curve Finance, Balancer and SushiSwap all operate DeFi liquidity pools. The biggest Curve pools are multi-token and focused on stablecoins. Balancer allows for up to eight tokens in a pool, whereas SushiSwap is a virtual clone of Uniswap.
What are the risks of DeFi liquidity pools?
The algorithm that determines the price of an asset may fail, slippage due to large orders, smart contract failure and more.
The price of assets in a liquidity pool is set by a pricing algorithm that continually adjusts based on the pool’s trading activity. If an asset’s price varies from the global market price, arbitrage traders that take advantage of price differences across platforms will move to profit from the variance.
In the event of price fluctuations, liquidity providers can incur a loss in the value of their deposits, known as impermanent loss. However, once a provider withdraws their deposit, the loss becomes permanent. Depending on the size of the fluctuation and the length of time the liquidity provider has staked their deposit, it may be possible to offset some or all of this loss with transaction fee rewards.
Due to the pricing algorithm, smaller pools can suffer from slippage if someone suddenly wants to place a large trade. There have been instances, such as the bZx hack in 2020, where users exploited smaller liquidity pools as part of a broader market manipulation attack.
DeFi users face other risks, such as smart contract failure, if the underlying code isn’t audited or fully secure. Make sure to understand all the risks before depositing any funds.
What are the benefits of DeFi liquidity pools?
The most obvious benefit of liquidity pools is that they ensure a near-continuous supply of liquidity for traders wanting to use decentralized exchanges. They also offer the opportunity to profit from cryptocurrency holdings by becoming a liquidity provider and earning transaction fees.
Furthermore, many projects and protocols will offer additional incentives to liquidity providers to ensure that their token pools remain large, reducing the risk of slippage and creating a better trading experience. Therefore, there’s an opportunity to generate further gains from yield farming reward tokens in return for becoming a liquidity provider.
Some protocols, including Uniswap, Balancer and Yearn.finance reward liquidity providers in their own platform tokens. When SushiSwap emerged in summer 2020, it used this model to launch a so-called “vampire attack” on Uniswap. Users could yield farm the SUSHI token on Uniswap by providing liquidity in advance of SushiSwap’s launch and later migrate the liquidity to the SushiSwap platform, which was also a fork of Uniswap’s code.
How can I join DeFi liquidity pools?
The exact procedure for joining DeFi liquidity pools varies according to the platform. In general, one would need to set up an account on the platform of choice and then connect an Ethereum wallet such as MetaMask or other Web 3.0 wallets from the homepage. After that, tokens can be deposited into the relevant liquidity pool.
On platforms, such as Uniswap, one would need to search for a specific pair they want to provide liquidity to and then connect the wallet. After checking the returns, such as the pool ratio and the exchange rate, a user can deposit the tokens into the pool.