DeFi liquidity is the ability for tokens, or cryptocurrency, to be swapped for other tokens. Without it, there is no decentralized finance.
after reading this, you'll understand:
Liquidity providers are incentivized to add tokens to liquidity pools because they receive fees and rewards.
Automated market maker algorithms and smart contracts enable liquidity pools to track and maintain the proper price of the assets in the pool.
Yield farming enables liquidity providers to earn more significant returns for accepting additional risk.
Liquidity refers to how easily users can trade one cryptocurrency for another on an exchange. On a decentralized exchange, liquidity correlates directly with the amount of tokens locked in a liquidity pool. If a token lacks liquidity, holders may not be able to sell their tokens when they wish. Many DeFi exchanges allow market makers to create multiple liquidity pools with various tokens. For example, someone could create one liquidity pool where users can exchange ETH for HBAR and another where they can trade USDT for HBAR, creating additional liquidity for the HBAR token.
Without liquidity, there is no DeFi. It would mean there is no interest in cryptocurrency and/or there is no arena in which people can trade it. The whole point of decentralized finance is to remove the middlemen involved in traditional exchanges and thus remove barriers to liquidity.
That said, liquidity issues crop up in DeFi. For example, low liquidity leads to slippage, an issue in which the actual returns on a token sale are less than what the expected price would have brought. In other words, the price received is less than the price named at the beginning of a trade. Volatility plays a role too. Most decentralized exchanges let users specify slippage tolerances to limit their losses. Many exchanges cap slippage tolerances at around 5%. We should note that slippage can occur in the favor of a trader as well.
Low liquidity also leads to higher price volatility. For example, if a token’s liquidity pool has only $10,000 in locked value, and someone sells $1,000 worth of the token into the pool, it could impact the price by nearly 10%. Automated market makers can determine how many tokens are being purchased from the pool, and adjust the price accordingly for large sales and buys. Still, higher liquidity will always lead to lower volatility.
Liquidity pools are designed to provide a near-continuous flow of liquidity for traders. Liquidity providers are incentivized to add tokens to liquidity pools because they receive rewards from transaction fees. When adding to DeFi liquidity pools, users have to add both types of tokens to the pool. For example, if someone wants to provide liquidity to a USDT/HBAR pool, they’d have to add an equal value of both HBAR and USDT to the pool. In exchange for adding liquidity to the pool, the liquidity provider would receive a proportionate amount of LP tokens, entitling them to a portion of the transaction fees earned by the pool.
Automated market maker algorithms and smart contracts enable liquidity pools to track and maintain the proper price of the assets in the pool. Token prices in liquidity pools may vary on different exchanges or for different asset pairs, although arbitrage traders often regulate the price by buying and selling assets into various pools. For example, if HBAR’s price is lower in an HBAR/USDT pool than in the HBAR/ETH pool, arbitrage traders buy HBAR from the pool with the lower price and sell it into the pool with the higher price, averaging the price between the two pools.
Marketplaces increase liquidity in the DeFi ecosystem in several ways. Many protocols offer yield farming incentives, allowing users to stake cryptocurrencies to earn tokenized rewards. Yield farming enables liquidity providers to earn more significant returns for the additional risk.
Many cryptocurrency exchanges increase their liquidity by allowing global users to add liquidity to the pools. Some exchanges offer governance tokens or other native tokens to add liquidity to their platforms. Having numerous currency pairs is a way to indirectly increase a token’s liquidity, as it allows users to trade their tokens for various other tokens.
Impermanent loss is the primary risk for all liquidity providers in decentralized finance. Impermanent loss can be challenging to understand, but it is an important concept.
An impermanent loss can occur when a liquidity provider adds tokens to a liquidity pool. The loss is the difference between the value of the tokens had the provider simply held onto them, minus the value of the tokens after they were added to a pool and a volatile market reduced their value. The potential for loss stems from the fact that a liquidity provider must add an equal value of the two tokens in the liquidity pool.
The worst-case scenario comes when one of the tokens is more volatile and more expensive than the other. Let's say that the volatile token rises in price outside of a liquidity pool, which we will call XYZ. Arbitrage traders notice the difference and start buying the lower-priced tokens from XYZ and selling them elsewhere in the crypto markets for the higher price. Eventually the trading causes the price of the volatile token to increase inside XYZ, which now has less of the volatile token.
As the liquidity pool tries to maintain an equilibrium between the two tokens, the liquidity provider ends up with slightly less of the more volatile (and more valuable) token than he started with and slightly more of the less valuable one.
If that liquidity provider sells now, the impermanent loss would become permanent. Leaving the tokens in the pool makes it possible to see that impermanent loss disappear. Another important factor to consider is that liquidity providers earn transaction fees and also might benefit from liquidity mining programs that give providers bonus tokens. These gains often outweigh the impermanent loss. Otherwise, no one would step in as a liquidity provider.
Impermanent loss is often negligible in pools with high volume and low volatility. An example of the latter is an exchange that deals only with stablecoin.
There also are smart contract risks to consider. Suppose the automated market maker’s developers accidentally misplaced a decimal in the smart contract or otherwise left the contract open to be exploited. In that case, hackers could potentially drain the liquidity from the pools.
One recent example is the TinyMan exploit on the Algorand blockchain. The TinyMan exploit involved hackers adding assets to a liquidity pool, burning the pool tokens, and receiving two of the same tokens instead of one of each type that were initially added. The details of initiating the exploit were shared publicly, causing numerous copycat hackers to jump in. The exploiters were able to repeat this process multiple times, leading to the theft of over $3 million.
Rug pulls are a risk to all cryptocurrency traders, but might have a more significant impact on liquidity providers. Rug pulls often involve cryptocurrency project managers holding a large sum of their token, promoting it to find buyers, and then selling a large sum of their token into a liquidity pool to drain the pool of its funds. Rug pulls often lead to huge losses for liquidity providers and drain the tokens of their value.
Liquidity pools are an essential piece of the DeFi ecosystem. Hedera, the open source, enterprise-grade public ledger, powers numerous DeFi applications, such as SaucerSwap and Tangent Finance, that offer liquidity pools for a variety of currency pairs. Get started building or using DeFi applications on Hedera today.