One of the key aspects of the digital asset concept and culture is decentralisation and anonymity. These values are most fully embodied in decentralised finance platforms (DeFi), but they are implemented using technical solutions that are not widely used or known in traditional markets. One such solution is liquidity pools, which are the foundation of most decentralised crypto exchanges.
In this education guide we will look at what a liquidity pool is, explain how it works, and weigh the pros and cons of this technology.
What is a liquidity pool: explained in simple terms
A liquidity pool is a smart contract where users deposit cryptocurrency to support the operation of decentralised exchanges (DEX) and other DeFi platforms. These funds are used to instantly exchange assets without the involvement of intermediaries and can be withdrawn by owners at any time.
Technically, liquidity pools are an alternative to the order book (exchange stack) on which most centralised exchange platforms operate.
Typically, each trading pair on a decentralised exchange has its own liquidity pool consisting of two assets of equal value. For example, if a user wants to add $400 worth of liquidity to the ETH/USDT pool, they will need to transfer two tokens at once, each worth $200.
However, some platforms, such as Balancer or Curve Finance, allow users to add assets in different proportions or to contribute only one cryptocurrency to the pool.
How a liquidity pool works and what it is used for?
A liquidity pool acts as an accumulator of assets, allowing a transaction to be completed quickly even if there are no matching bids from buyers and sellers.
At the same time, the exchange rate in each pool is formed and changed on the basis of the internal balance of assets using a special mathematical algorithm – an automatic market maker (AMM).
Algorithm of pool operation
- Creation of a smart contract (the pool itself) holding two or more tokens. This pool is populated by users called liquidity providers – they lock their assets into the pool for a fee.
- When liquidity providers deposit assets into the pool, they receive LP tokens (Liquidity Provider Tokens), which reflect their share of the pool and entitle them to be rewarded with a portion of the trading commissions.
- When a user wants to exchange cryptocurrency, they enter one token of a trading pair into a smart contract and receive another token in return, changing their ratio in the pool.
- When changing the ratio, AMM applies a special formula based on which it adjusts the price to ensure a certain balance of assets.
For example, if a user buys a certain amount of etherium in the ETH/USDT pool, this means that they have changed the balance between these assets, increasing the amount of USDT and decreasing the amount of ETH. To compensate, the algorithm will increase the price of the latter to restore the ratio.
Impermanent losses
Impermanent Loss is the loss that liquidity providers may incur due to the volatility of the assets in the pool. The more the price differs from the initial price, the higher the impermanent loss.
These losses are called non-permanent losses because as long as the assets remain in the pool, the loss is not fixed and there is a possibility that the price will return to the previous level.
It should be noted that when two or more assets are in the pool, non-permanent losses are possible regardless of the direction in which the price moves.
Slippage
Slippage is the difference between the expected transaction price and the actual transaction price. Slippage can occur in traditional markets, but when using automated market makers the potential magnitude of slippage can be greater and depends on the amount of liquidity in the pool.
Therefore, in some cases (particularly for large transactions), the final buy or sell price may be significantly different from what the trader saw before the transaction. The greater the imbalance in the pool as a result of the transaction, the more noticeable the slippage.
Most decentralised platforms inform the user in advance of slippage and its approximate size, and even allow the user to set acceptable deviations.
Concentrated liquidity
The development of decentralised crypto exchanges has led to the concept of concentrated liquidity. This is a more sophisticated type of smart contract that allows users to choose the price range in which the assets they provide can be exchanged.
Such a solution allows to
- Increase the liquidity of trading pairs at current price levels;
- Reduce slippage and speed up the execution of large trades;
- Increase revenues for liquidity providers.
However, providing liquidity in concentrated pools requires manual management of spreads and constant price monitoring.
Pros and cons of liquidity pools
Some of the key advantages of liquidity pools include
- Market availability. Liquidity pools are not dependent on the availability of buyers and sellers, and therefore provide the ability to exchange assets without time constraints;
- Decentralisation. Technically, liquidity pools are smart contracts, so they can operate without a single administrator or owner, and their replenishment is provided by a wide range of providers;
- Revenue potential. Liquidity providers receive a portion of the commission for each transaction and may also receive additional rewards in the form of incentives from one service or another;
- Tokenised position. Users can use their LP tokens to farm and earn additional income on DeFi platforms, increasing capital efficiency.
However, this mechanism also has certain drawbacks:
- The risk of volatile losses. Liquidity providers may lose capital due to changes in the ratio of tokens in the pool due to high volatility;
- High transaction costs. Exchange transactions, especially on busy networks, can cost significantly more than the transaction fee on centralised exchanges;
- Security. Liquidity pool smart contracts may be vulnerable to hacking or contain bugs in the code, putting users’ assets at risk.
- Lack of liquidity. If there are insufficient funds in the pool, this can lead to high volatility and slippage, with negative consequences for both liquidity providers and traders.
In general, in order to work with liquidity pools, users should consider many factors, such as the level of commissions, the level of liquidity and volatile losses, which requires prior study of the mechanism of their operation and the technical features of a particular DeFi venue.
What are liquidity pools used for in DeFi?
The main purpose of liquidity pools is to enable the exchange of assets without the need for counterparties or market makers. Therefore, the main application of these smart contracts in DeFi is the creation of decentralised exchanges.
However, the liquidity accumulated in pools can also be used for other purposes, such as loans or leverage for trading transactions, so pools are used in one form or another by many DeFi platforms.
For users, however, it is primarily a tool for generating passive income as a liquidity provider. Traders can also use the peculiarities of the pricing mechanism in pools to find opportunities to make money, for example through arbitrage trades.
How to make money from liquidity pools?
Ordinary users can earn income in exchange for locking assets in a liquidity pool. Their profits can come from several sources at the same time:
- Transaction fees. Liquidity providers receive a portion of the commissions from each exchange in proportion to their share of the pool;
- LP tokens. Tokens representing the liquidity provider’s position can be redeemed on DeFi services for additional rewards;
- Incentives. Many DeFi projects reward users with bonuses in the form of their own tokens or other cryptocurrencies.
The amount of earnings is usually directly related to the amount and duration of blockchain assets in the pool. However, certain factors such as asset price volatility or pool depletion can affect the final outcome.
Conclusions
Liquidity pools are one of the core elements of decentralised exchanges and other DeFi platforms, enabling the exchange of assets without the involvement of counterparties and centralised market makers.
They allow users to generate passive capital income and trade outside of traditional exchanges, but also carry certain risks such as volatile losses, high transaction fees, slippage and vulnerability to hacking.
To work successfully with liquidity pools, it is necessary to understand how they work, the specifics of each smart contract, and to calculate all possible risks and rewards in advance.