Résumé

Liquidity pools are one of the foundational technologies of today's DeFi ecosystem. They are an integral part of automated market makers (AMM), borrowing protocols, yield farming, synthetic assets, blockchain insurance, blockchain gaming and more.

In itself, the idea is very simple. A liquidity pool is essentially funds pooled into a larger digital fund. But what can you do with this fund in a permissionless environment, where anyone can add liquidity to it? Let’s take a look at how DeFi iterated on the idea of ​​liquidity pools.


Introduction

Decentralized finance (DeFi) has spawned an explosion in blockchain activity. DEX volumes can significantly compete with centralized exchange volumes. As of December 2020, nearly $15 billion of value is locked in DeFi protocols. The ecosystem is growing rapidly with new types of products.

But what makes this expansion possible? One of the main technologies behind all of these products is liquidity pooling.


What is a liquidity pool?

A liquidity pool is a collection of cryptocurrency tokens locked in a smart contract. Liquidity pools are used to facilitate decentralized trading, lending, and many other functions which we will explore later.

Liquidity pools are the backbone of many decentralized exchanges (DEXs), such as Uniswap. Users called liquidity providers (LPs) add an equal value of two tokens into a pool to create a market. In exchange for depositing funds, they earn trading fees from transactions that occur in their pool, proportional to their share of the total liquidity.

As anyone can be a liquidity provider, AMMs have made market making more accessible.

Bancor was one of the first protocols to use liquidity pools, but the concept gained prominence with the popularization of Uniswap. Other popular exchanges that use liquidity reserves on Ethereum are SushiSwap, Curve and Balancer. The liquidity pools of these platforms contain ERC-20 tokens. The equivalents on Binance Smart Chain (BSC) are PancakeSwap, BakerySwap and BurgerSwap, these pools contain BEP-20 tokens.


Comparison of liquidity pools and order books.

To understand how liquidity pools are different, let's look at the basic element of electronic trading: the order book. Simply put, the order book is a set of orders currently open for a given market.

The system that associates orders with each other is called an association engine. Along with the association engine, the order book is the heart of any centralized exchange (CEX). This model is ideal for enabling efficient operation as well as the creation of complex financial markets.

DeFi trading, on the other hand, involves executing transactions on the blockchain, without a centralized party holding the funds. This presents a problem when it comes to ordering books. Each interaction with the order book requires paying gas fees, making trade execution much more expensive.

It also makes the work of market makers, traders who provide liquidity for trading pairs, extremely expensive. Most importantly, most blockchains cannot handle the throughput needed to exchange billions of dollars every day.

This means that on a blockchain like Ethereum, an on-chain order book exchange is virtually impossible. You can use sidechains or second layer solutions, which are currently under development. However, the network is not able to handle the throughput in its current form.

Before going any further, it is important to note that there are DEXs, which work perfectly with blockchain order books. Binance DEX, which is built on Binance Chain, is specially designed to ensure fast and efficient transactions. cheap. Another example is the Serum project, built on the Solana blockchain.

Even though a large portion of the assets in the crypto space are on Ethereum, you cannot trade them on other networks unless you use an inter-blockchain gateway.


How do liquidity pools work?

Automated Market Makers (AMM) have changed the game. This is a significant innovation that allows trading on a blockchain without requiring an order book. Since no direct counterparty is required to execute trades, traders can enter and exit positions in token pairs that would otherwise be highly illiquid in order book markets.

You can think of an order book exchange as a peer-to-peer exchange, where buyers and sellers are connected through the order book. For example, trading on Binance DEX is done peer-to-peer since trades are made directly between user wallets.

Trading using an AMM is different. You can think of trading using an AMM as a peer-to-peer contract.

As we mentioned, a liquidity pool is a collection of funds deposited into a smart contract entered into by liquidity providers. When you execute a trade on an AMM, you do not have a counterparty in the traditional sense. Instead, you execute the trade against the liquidity of the liquidity pool. For the buyer to buy, there is no need for there to be a seller at that specific time, only sufficient liquidity in the pool.

When you buy the latest food token on Uniswap, there is no seller in front of you in the traditional sense. Instead, your activity is managed by the algorithm that governs the pool's transactions. Additionally, the price is also determined by this algorithm based on the trades that take place in the pool. If you want to learn more about how this system works, read our article dedicated to AMMs.

Of course, liquidity has to go somewhere and anyone can be a liquidity provider, so anyone could be considered your counterparty. So it's very different from an order book, because you interact with the contract that governs the pool.


What are liquidity pools used for?

So far we have mainly discussed AMMs, which have been the most popular use of liquidity pools. However, as we said, liquidity pooling is a very simple concept, so it can be used in many different ways.

One of them is yield farming or liquidity mining. Liquidity pools are the basis of automated yield-generating platforms like yearn, where users add their funds to pools which are then used to generate returns.

Getting new tokens into the hands of the right people is a very difficult problem for crypto projects. Liquidity mining has been one of the most effective approaches. Basically, tokens are distributed algorithmically to users who have placed their tokens in a liquidity pool. Then, newly issued tokens are distributed in proportion to each user's share of the pool.

Keep in mind that these can even be tokens from other liquidity pools called pool tokens. For example, if you provide liquidity to Uniswap or lend funds on Compound, you will receive tokens that represent your share of the pool. You may be able to deposit these tokens into another pool and generate a yield. These chains can get quite complicated as protocols integrate other protocols' pool tokens into their products and so on.

We could also consider governance as a use case. In some cases, a very high threshold of votes is necessary to be able to present a formal governance proposal. If funds are instead pooled, participants can rally around a common cause that they deem important to the protocol.

Another emerging sector of DeFi is insurance against smart contract risks. Many of its implementations are also fueled by cash reserves.

Another, even more extensive use of cash reserves is the creation of credit tranches. This is a concept borrowed from traditional finance that involves classifying financial products based on their risks and returns. As you would expect, these products allow liquidity providers (LPs) to select personalized risk and return profiles.

The issuance of synthetic assets on the blockchain also relies on liquidity pools. Add collateral to a liquidity pool, connect it to a trusted oracle, and you have a synthetic token that scales to the asset of your choice. In reality, it's a more complicated problem than that, but the basic idea is simple.

What else can we think of? There are likely many other uses for liquidity pools, yet to be discovered, and it all depends on how ingenious DeFi developers can be.


➟Do you want to get started with cryptocurrencies? Buy Bitcoin (BTC) on Binance!


If you are providing liquidity to an AMM, you need to be aware of a concept called non-permanent loss. In short, it is a loss in dollar value compared to an HODL strategy when you provide liquidity to an AMM.

If you provide liquidity to an AMM, you are likely exposed to non-permanent losses. Sometimes losses can be small, sometimes significant. Be sure to read our article on this topic if you are considering placing funds in a dual-token liquidity pool.

We must also keep in mind the risks associated with smart contracts. When you deposit funds into a liquidity pool, they are stored in the pool. So while there is technically no intermediary holding your funds, the contract itself can be considered the custodian of those funds. If a bug or some type of hack occurs through a Flash loan, for example, your funds could be lost forever.

Also be wary of projects where developers have permission to change the rules governing the pool. Sometimes developers may have an administrator key or other privileged access in the smart contract code. This can allow them to carry out malicious operations, such as taking control of the funds in the pool. Read our article on DeFi scams to try to avoid rug pull or exit scams as best as possible.


To conclude

Liquidity pools are one of the foundational technologies of today's DeFi ecosystem. They enable decentralized trading, lending, yield generation, and much more. These smart contracts power almost every part of DeFi, and they will most likely continue to do so.

Do you still have questions about liquidity pools and decentralized finance? Visit our Q&A platform, Ask Academy, where the Binance community will answer your questions.