Summary

Liquidity pools are one of the core technologies underlying the current DeFi ecosystem. It is an essential part of automated market makers, borrowing and lending protocols, return capture, compound assets, on-chain insurance, blockchain gaming – and much more.

The idea itself is very simple. A liquidity pool is essentially money collected in a large digital pile. But what can you do with this pile in a public environment where anyone can add liquidity to it? Let's explore how DeFi has evolved thanks to the idea of ​​liquidity pools.


the introduction

DeFi has led to a massive increase in on-chain activity. It has become possible for the sizes of decentralized trading platforms to truly compete with the size of centralized trading platforms. In December 2020, the value locked in DeFi protocols reached approximately $15 billion. The system is expanding rapidly with the emergence of new types of products.

But what makes all this expansion possible? Liquidity pool is one of the core technologies behind all of these products.


What is a liquidity pool?

A liquidity pool is a pool of funds held in a smart contract. Liquidity pools can be used to facilitate lending, decentralized trading, and many other functions that we will explore later.

Liquidity pools are the cornerstone of many decentralized trading platforms, such as  Uniswap. Users, called liquidity providers, add value equal to two tokens in a pool to create a market. In exchange for providing their funds, they earn trading fees from trades that occur in their pool in proportion to their share of total liquidity.

Since anyone can be a liquidity provider, automated market makers have made market creation easier.

Bancor was one of the first protocols to use liquidity pools, but the concept has attracted more attention as Uniswap has grown in popularity. Other popular trading platforms that use liquidity pools on the Ethereum network include SushiSwap, Curve, and Balancer. The liquidity pools on these platforms contain ERC-20 tokens. Equivalent liquidity pools on the Binance Smart Chain include PancakeSwap, BakerySwap, and BurgerSwap, where the pools contain BEP-20 tokens.


Liquidity pools versus order lists

To understand how liquidity pools are different, we'll take a look at the basic building block of e-commerce – the order list. Simply put, an order list is a collection of orders that are currently open in a particular market.

The system that matches requests to each other is called a matching engine. Along with the matching engine, the order list is the core of any centralized trading platform. This model is great at facilitating efficient trading, and has allowed the creation of complex financial markets.

But decentralized trading involves executing trades on-chain without a central party holding the funds. This presents a problem when it comes to wishlists. Every interaction with the order list incurs a processing fee, which makes executing trades more expensive.

This also makes the job of market makers, which are the traders who provide liquidity to the trading pairs, more difficult. But most important of all, most blockchains cannot handle the throughput needed to trade billions of dollars daily.

This means that on any blockchain, such as Ethereum, trading using an on-chain order list is practically impossible. You must use sidechains or Layer 2 solutions that will be released soon. But the network cannot handle throughput in its current form.

Before we continue, it's worth mentioning here that there are already decentralized trading platforms that work well using on-chain order lists. Binance's decentralized trading platform is built on the Binance Chain and is specifically designed for fast, low-cost trading. Another example is Project Serum, which is built on the Solana blockchain.

However, since a lot of assets in the cryptocurrency space are on Ethereum, you can't trade them on other networks unless you use some sort of cross-chain bridge.


How do liquidity pools work?

Automated market makers have changed the rules of this game. These makers represent an important innovation that allows for on-chain trading without the need for an order list. Since there is no need for a direct counterparty to execute trades, traders can enter and exit trades on token pairs, which are often highly illiquid on trading platforms that use order lists.

You can think of a trading platform that uses order lists as a peer-to-peer platform where the order list connects buyers and sellers. For example, trading on the decentralized trading platform Binance is considered peer-to-peer trading because trades occur directly between users' wallets.

Trading with an automated market maker is different. You can think of trading on any automated market maker as trading from person to contract.

As mentioned, a liquidity pool is a pool of funds that liquidity providers deposit into a smart contract. When you execute a trade on an automated market maker, you do not have a counterparty in the traditional sense. Rather, the trading process is carried out against liquidity in the liquidity pool. For a buyer to buy, there is no need for a seller to be present at the same moment, but only to have sufficient liquidity in the pool.

When you buy the latest food coin on Uniswap, there is no seller on the other side in the traditional sense. Rather, your activity is managed by an algorithm that governs what happens in the pool. Moreover, the price is determined by this algorithm also based on the trading operations that occur in the pool. If you would like to take a closer look at how this works, please read our article on the Automated Market Maker.

Liquidity has to go somewhere, of course, and anyone can be a liquidity provider, so you can view others as your counterparty in some way. But this does not apply to the order list form; You are interacting with a contract that governs the pool.


What are liquidity pools used for?

We have focused our discussion so far on automated market makers, which have been the most widely used among liquidity aggregators. But, as we mentioned, pooling liquidity into pools is a very simple concept and can therefore be used in many different ways.

One of these methods is revenue generation or liquidity mining. Liquidity pools are the basis of yield generating platforms like Yearn where users add their funds to pools, which are then used to generate returns.

Distributing new tokens into the hands of the right people is a very difficult problem in cryptocurrency projects. Liquidity mining has been one of the most successful approaches. Essentially, tokens are distributed by algorithms to users who place their tokens in a liquidity pool. The newly minted tokens are then distributed in proportion to each user's stake in the pool.

Remember that these tokens can also be tokens from other liquidity pools called pool tokens. For example, if you provide liquidity to Uniswap or lend money to the Compound platform, you will receive tokens that represent your stake in the pool. You may be able to deposit these tokens into another pool and earn a return. These chains can become very complex, as protocols incorporate compiler codes from other protocols into their products, and so on.

We can also think of governance as a use case. Sometimes, the minimum number of token votes needed to be able to submit a formal governance proposal is too high. But if the funds were pooled together instead, participants could collaborate to champion a common cause they see as important to the Protocol.

Another emerging DeFi sector is smart contract risk insurance. Finance aggregators operate many applications for this insurance.

Another, more sophisticated use of liquidity pools is segmentation. It is a concept borrowed from traditional finance that involves dividing financial products based on their risks and returns. As expected, these products allow liquidity providers to choose customized risk and return paths.

Mining complex assets on the blockchain also relies on liquidity pools. Add a security to your liquidity pool, link it to a trusted broker, and you get a compound token tied to any asset you want. Well, actually, the issue is more complicated than that, but the basic idea is that simple.

What else can we think about? There are likely many other uses for liquidity pools yet to be discovered, and it's all down to the creativity of DeFi developers.


➟ Do you want to start trading cryptocurrencies? Buy Bitcoin (BTC) on Binance!


Liquidity pool risks

If you are supplying an automated market maker with liquidity, you should be aware of a concept called impermanent loss. In short, it is a loss in dollars compared to holding when you provide an automated market maker with liquidity.

If you are supplying an automated market maker with liquidity, you are likely incurring an impermanent loss. This loss can sometimes be small, and other times it can be huge. Be sure to read our article on this loss if you're considering putting money into a dual liquidity pool.

Another thing to consider is the risks of smart contracts. When you deposit money into a liquidity pool, this money is in the pool. So even though there are not actually any intermediaries in possession of your funds, the contract itself can be considered a custodian of those funds. And if there are bugs or any other type of exploitation with a  flash loan, for example, your money could be lost forever.

Also beware of projects where developers are authorized to change the rules governing the complex. Sometimes, developers may have an administrator key or other privileged access right within the smart contract code. This could enable them to do something malicious, like control the funds in the pool. Read our article on DeFi scams to try to avoid rug pulls and termination scams as best as possible.


Concluding thoughts

Liquidity pools are one of the core technologies underlying the current DeFi technology stack. These pools enable decentralized trading, lending, revenue generation, and much more. These smart contracts power almost every part of decentralized finance, and will likely continue to do so.

Still have questions about liquidity pools and DeFi? Check out our Q&A platform Ask Academy where the Binance community will answer your questions.