Liquidity pools are essentially replacements for the order book found by traders on centralized exchanges and, at the same time, solves the liquidity issues faced by decentralized exchanges — especially in their initial phase.
Based on the use of smart contracts and automated market makers, liquidity pools became a fundamental part of the success of decentralized finance, both by offering a viable alternative to traditional financial platforms and by allowing DeFi users to get incentives for their contribution to decentralization.
In this article you’ll find all you need to know about liquidity pools: what they are, how they work, what are their functions and the main issues related to liquidity pools.
Liquidity Pools and DeFi — How Liquidity Pools Work
Liquidity pools are the tools that allow Decentralized Exchanges (DEXs) to solve their liquidity problems.
Before liquidity pools, decentralized finance was struggling to attract enough users: despite the benefits provided by this innovative financial system, all the efforts of decentralized platforms weren’t enough to overcome the lack of liquidity and users.
Low liquidity is rarely what most traders look for, because it can cause several problems: one of these problems is slippage, which can be defined as a difference in price that may occur before the trader executes a transaction. If the price is lower, the trader has an advantage, but when the price increases, the trader loses part of his capital.
Slippage is the result of volatility, but it can be solved by providing more liquidity to the market. By attracting more liquidity and market participants, it’s far less probable that single entities are able to influence the market. DEXs like KyberSwap and 1inch aggregates liquidity from several DEXs and find the lowest prices for traders to mitigate volatility-related issues.
But it’s also the very functioning of liquidity pools that manages to favour higher liquidity levels. Their underlying technology based on AMMs, allowed DeFi exchanges to offer their users a system similar to traditional financial platforms, but eliminated the middleman.
Automated Market Makers are smart contract-based systems that are able to assess what the average price of a crypto asset should be — thanks to the collection of info from other exchanges, to automate trades and assign fees to liquidity providers.
So, while AMMs are usually the technology that favour automation and fairness, liquidity pools are the actual tool that favours higher liquidity and trades, as well as the solution to the systems used by traditional financial platforms to match buy and sell orders — that is, order books.
To better understand this point, let’s make a comparison with the functioning of centralized platforms.
How Liquidity Pools Replace Order Books
When traders try to buy or sell assets by using CeFi exchanges, they make orders that are recorded on order books: these books are like ledgers where you can find buy and sell orders made on the platform, and it’s possible to maintain them because there is a centralized database. Traders and investors can choose to use a price for which they’ve already found a counterpart, or to choose a totally different price and become market makers, or to trade at market prices. Basically, as we said, order books match buy and sell orders.
But in DeFi, born to avoid centralization and any middleman, this system was hard to replicate, especially for lack of liquidity.
Liquidity pools managed to provide an alternative for DeFi exchanges. To give a definition of liquidity pool, consider it as a pool that collects crypto assets in order to facilitate trades. All assets are locked in smart contracts, so as to allow the automation of trades without the need for any third party.
So, there is also another difference between centralized and decentralized exchanges to consider: when traders use centralized exchanges, they are trading against other traders gathered by the central database. On the other hand, when you use a decentralized exchange you’re trading against the pool.
When you trade with an order book, you provide just one crypto token or fiat currency, you can easily verify if you have a counterpart or if you’re a market maker, since all data about trades are collected and visible. When you trade against the pool, usually you need to provide at least two tokens, consider the pool ratio, LP fees and volatility of the assets. So, in general, you need to consider more aspects when you use liquidity pools.
What is a Liquidity Provider?
Anyone can provide liquidity to liquidity pools just by using their DeFi wallets.
Those who put their assets in a liquidity pool are called liquidity providers — LPs.
DeFi exchanges, to attract more users and solve liquidity issues, created a system that would incentivize the provision of liquidity, and that’s where liquidity pools come into play: liquidity providers, once they add assets to a pool, are rewarded with a share of the fees produced every time that a trade occurs in that pool.
Liquidity providers are a fundamental element for the functioning of the DeFi space: decentralization means distribution, and differently from centralized systems DeFi relies on the work of its users.
Liquidity providers are rewarded for their contribution, and the higher the amount of assets they provide, the higher the amount of their earnings.
They’ll receive liquidity provider tokens, usually different according to the exchange, and they’ll also represent the share of capital invested by the provider.
Benefits of Liquidity Pools
DeFi liquidity pools brought many benefits to the decentralized crypto space.
The first problem they solved is liquidity: not being able to support the model of centralized platforms, liquidity pools made it possible to obtain the amount of liquidity necessary for decentralized exchanges to work.
By using AMMs, liquidity pools contribute to keeping prices fair: arbitrage opportunities still exist, but it’s nothing compared to the discrepancies that assets’ prices on DEXs would reach with respect to market prices.
Moreover, a system based on smart contracts allows to avoid any intermediaries: this not only reduces costs — since you don’t have to pay additional fees for the services offered by centralized platforms, but it also makes it possible for anyone to participate in this new financial space — if conditions set by using smart contracts aren’t met, no transaction can be finalized, and by reducing the counter-party risk DEXs don’t need to ask for your personal details. Liquidity providers (LPs) are able to earn strings of passive income thanks to DEXs, as well as traders can use an exchange where fees are lower than those you find on centralized exchanges.
In general, liquidity pools had an unexpected success, and permitted the whole DeFi financial system to work correctly and thrive.
There are still issues, mainly related to volatility and to the use of models that are not able to fully reflect markets’ developments.
Risks of Liquidity Pools — Impermanent Loss
Let’s discuss one of the main risks of decentralized exchanges: Impermanent Loss.
Slippage and impermanent loss are perhaps two of the reasons why decentralized exchanges still require a higher level of knowledge than centralized exchanges.
To better understand impermanent loss, it’s worth noting that decentralized exchanges (DEXs) that use Automated Market Makers usually set fixed LP fees — that is, the fees charged on trades to reward the liquidity provider.
Impermanent loss, as we mentioned, occurs when the crypto assets provided by the LP lose value.
Liquidity providers add to the pool at least two tokens: they have the same value and their ratio stays fixed — remember that value doesn’t always correspond to the amount of tokens.
This simply means that the product of the two assets must always be the same, independent of what happens in the market.
As a market becomes volatile, the amount of tokens that lose value increases — to maintain the ratio. While the amount of the other token decreases.
So, when liquidity providers want to withdraw liquidity, they might end up losing tokens. Or, they can be forced to withdraw tokens whose value is lower than the value it had when the LP added it to the pool.
The reason why this kind of loss is defined as ‘impermanent’ is that the loss can be recovered if the market becomes more stable or if the value of the assets provided increases. The loss becomes permanent if the LP withdraws before this happens.
Now, part of these losses can be covered by the fees earned by the liquidity provider, but since they’re usually fixed, they don’t manage to fully reflect what happens in the pool — that is, in the market — or to make it possible to recover the entire loss.
Consider that the decentralized space in general, and decentralized exchanges in particular, are continuously evolving: they’re usually open-source, so they rely on the work and experience of countless developers and financial savvy people who constantly improve the whole system.
This variety is reflected by the fact that not all decentralized exchanges work in the same way, or focus on the same type of assets.
An example is Curve, whose exchange is entirely focused on stablecoins — and this prevents its users from facing problems related to volatility.
Stablecoins are cryptocurrencies whose price is pegged to a national fiat currency — like dollars or euros. That’s why they experience far less volatility, which is a common point in many financial issues that involve cryptocurrencies.
Even through we covered this point earlier in the article, it would be useful to provide you a practical example. To make a comparison with a well known type of asset, think of penny stocks, where almost anyone can accumulate large shares of stocks and influence the market. The functioning of low liquidity markets is very similar, and even if DeFi pools largely improved the possibility for traders to actually benefit from decentralization, the DeFi space still needs some adjustments.
Since the crypto market doesn’t only include stablecoins, these adjustments may involve totally different models.
For instance, KyberSwap uses both amplification — that mimics higher levels of liquidity to avoid volatility — and the Dynamic Market Model (DMM) — based on a dynamic LP fees system that lowers fees when the market is stable, since it can attract a higher number of users more easily, and increases LP fees when the market is less stable, to better cover the possible losses of LPs.
Smart contracts and automated market makers, as well as other smart-contract based models, make it possible to avoid intermediaries, and anyone can participate in the system just by using a DeFi wallet.
Despite this, there are still disadvantages, mainly related to volatility. The two main issues are slippage — when the market has insufficient liquidity — and impermanent loss — which mainly occurs when tokens are too volatile.
To counter these large issues, the DeFi space — which is continually being developed — is made up of exchanges that use a variety of systems to reflect markets or that specialize in assets like stablecoins.
If you want to learn more about decentralized finance, follow our Kyber Academy to get all the info you need.