What Are Liquidity Pools in DeFi and How Do They Work? | Binance Academy (2024)

TL;DR

Liquidity pools are one of the foundational technologies behind the current DeFi ecosystem. They are an essential part of automated market makers (AMM), borrow-lend protocols, yield farming, synthetic assets, on-chain insurance, blockchain gaming – the list goes on.

In itself, the idea is profoundly simple. A liquidity pool is basically funds thrown together in a big digital pile. But what can you do with this pile in a permissionless environment, where anyone can add liquidity to it? Let’s explore how DeFi has iterated on the idea of liquidity pools.

Introduction

Decentralized Finance (DeFi) has created an explosion of on-chain activity. DEX volumes can meaningfully compete with the volume on centralized exchanges. As of December 2020, there are almost 15 billion dollars of value locked in DeFi protocols. The ecosystem is rapidly expanding with new types of products.

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

What Is a Liquidity Pool?

A liquidity pool is a collection of funds locked in a smart contract. Liquidity pools are used to facilitate decentralized trading, lending, and many more functions we’ll explore later.

Liquidity pools are the backbone of many decentralized exchanges (DEX), such as Uniswap. Users called liquidity providers (LP) add an equal value of two tokens in a pool to create a market. In exchange for providing their funds, they earn trading fees from the trades that happen 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.

One of the first protocols to use liquidity pools was Bancor, but the concept gained more attention with the popularization of Uniswap. Some other popular exchanges that use liquidity pools on Ethereum are SushiSwap, Curve, and Balancer. Liquidity pools in these venues contain ERC-20 tokens. Similar equivalents on BNB Chain are PancakeSwap, BakerySwap, and BurgerSwap, where the pools contain BEP-20 tokens.

Liquidity Pools vs Order Books

To understand how liquidity pools are different, let’s look at the fundamental building block of electronic trading – the order book. Simply put, the order book is a collection of the currently open orders for a given market.

The system that matches orders with each other is called the matching engine. Along with the matching engine, the order book is the core of any centralized exchange (CEX). This model is great for facilitating efficient exchange and allowed the creation of complex financial markets.

DeFi trading, however, involves executing trades on-chain, without a centralized party holding the funds. This presents a problem when it comes to order books. Each interaction with the order book requires gas fees, which makes it much more expensive to execute trades.

It also makes the job of market makers, traders who provide liquidity for trading pairs, extremely costly. Above all, however, most blockchains can’t handle the required throughput for trading billions of dollars every day.

This means that on a blockchain like Ethereum, an on-chain order book exchange is practically impossible. You could use sidechains or layer-two solutions, and these are on the way. However, the network isn’t able to handle the throughput in its current form.

Before we go any further, it’s worth noting that there are DEXes that work just fine with on-chain order books. Binance DEX is built on BNB Chain, and it’s specifically designed for fast and cheap trading. Another example is Project Serum being built on the Solana blockchain.

Even so, since much of the assets in the crypto space are on Ethereum, you can’t trade them on other networks unless you use some kind of cross-chain bridge.

How Do Liquidity Pools Work?

Automated market makers (AMM) have changed this game. They are a significant innovation that allows for on-chain trading without the need for an order book. As no direct counterparty is needed to execute trades, traders can get in and out of positions on token pairs that likely would be highly illiquid on order book exchanges.

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

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

As we’ve mentioned, a liquidity pool is a bunch of funds deposited into a smart contract by liquidity providers. When you’re executing a trade on an AMM, you don’t have a counterparty in the traditional sense. Instead, you’re executing the trade against the liquidity in the liquidity pool. For the buyer to buy, there doesn’t need to be a seller at that particular moment, only sufficient liquidity in the pool.

When you’re buying the latest food coin on Uniswap, there isn’t a seller on the other side in the traditional sense. Instead, your activity is managed by the algorithm that governs what happens in the pool. In addition, pricing is also determined by this algorithm based on the trades that happen in the pool.

Of course, the liquidity has to come from somewhere, and anyone can be a liquidity provider, so they could be viewed as your counterparty in some sense. But, it’s not the same as in the case of the order book model, as you’re interacting with the contract that governs the pool.

What Are Liquidity Pools Used For?

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

One of these 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 that are then used to generate yield.

Distributing new tokens in the hands of the right people is a very difficult problem for crypto projects. Liquidity mining has been one of the more successful approaches. Basically, the tokens are distributed algorithmically to users who put their tokens into a liquidity pool. Then, the newly minted tokens are distributed proportionally to each user’s share of the pool.

Bear in mind; these can even be tokens from other liquidity pools called pool tokens. For example, if you’re providing liquidity to Uniswap or lending funds to Compound, you’ll get tokens that represent your share in the pool. You may be able to deposit those tokens into another pool and earn a return. These chains can become quite complicated, as protocols integrate other protocols’ pool tokens into their products, and so on.

We could also think about governance as a use case. In some cases, there’s a very high threshold of token votes needed to be able to put forward a formal governance proposal. If the funds are pooled together instead, participants can rally behind a common cause they deem important for the protocol.

Another emerging DeFi sector is insurance against smart contract risk. Many of its implementations are also powered by liquidity pools.

Another, even more cutting-edge use of liquidity pools is for tranching. It’s a concept borrowed from traditional finance that involves dividing up financial products based on their risks and returns. As you’d expect, these products allow LPs to select customized risk and return profiles.

Minting synthetic assets on the blockchain also relies on liquidity pools. Add some collateral to a liquidity pool, connect it to a trusted oracle, and you’ve got yourself a synthetic token that’s pegged to whatever asset you’d like. Alright, in reality, it’s a more complicated problem than that, but the basic idea is this simple.

What else can we think of? There are probably many more uses for liquidity pools that are yet to be uncovered, and it’s all up to the ingenuity of DeFi developers.

The Risks of Liquidity Pools

If you provide liquidity to an AMM, you’ll need to be aware of a concept called impermanent loss. In short, it’s a loss in dollar value compared to HODLing when you’re providing liquidity to an AMM.

If you’re providing liquidity to an AMM, you’re probably exposed to impermanent loss. Sometimes it can be tiny; sometimes it can be huge. Make sure to read our article about it if you’re considering putting funds into a two-sided liquidity pool.

Another thing to keep in mind is smart contract risks. When you deposit funds into a liquidity pool, they are in the pool. So, while there are technically no middlemen holding your funds, the contract itself can be thought of as the custodian of those funds. If there is a bug or some kind of exploit through a flash loan, for example, your funds could be lost forever.

Also, be wary of projects where the developers have permission to change the rules governing the pool. Sometimes, developers can have an admin key or some other privileged access within the smart contract code. This can enable them to potentially do something malicious, like taking control of the funds in the pool. Read our DeFi scams article to try and avoid rug pulls and exit scams as best you can.

Closing Thoughts

Liquidity pools are one of the core technologies behind the current DeFi technology stack. 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.

What Are Liquidity Pools in DeFi and How Do They Work? | Binance Academy (2024)

FAQs

What Are Liquidity Pools in DeFi and How Do They Work? | Binance Academy? ›

For all there is, liquidity pools in decentralized exchanges are central to allowing market participants to swap one token for another in a permissionless setup without an intermediary. The first liquidity pool was forwarded by Bancor — one of the first DeFi protocols providing a trustless liquidity infrastructure.

What are liquidity pools in DeFi and how do they work? ›

A liquidity pool is a collection of crypto held in a smart contract. The purpose of the pool is to facilitate transactions. Decentralized exchanges (DEXs) use liquidity pools so that traders can swap between different assets within the pool.

What is a liquidity pool in DeFi lending? ›

DeFi Liquidity Pools facilitate a wide range of financial activities beyond simple trading, including lending, borrowing, and yield farming. Users can leverage their assets in innovative ways, creating a more open and diverse financial ecosystem.

How do people make money on liquidity pools? ›

You can think of liquidity pools as crowdfunded reservoirs of cryptocurrencies that anybody can access. In exchange for providing liquidity, those who fund this reservoir earn a percentage of transaction fees for each interaction by users.

How do you get paid from a liquidity pool fees? ›

A liquidity pool is typically created for a specific trading pair (e.g., ETH/DAI or any ERC-20 token pair). Users, known as liquidity providers, deposit their assets into these pools and in return receive liquidity tokens, which represent their share of the total liquidity pool.

How does DeFi get liquidity? ›

In DeFi, liquidity refers to the availability of funds to trade on a DEX. Liquidity providers (LPs) supply these funds to DEXs, and in return, they earn fees for their contributions. A liquidity pool is a smart contract that holds a pool of funds provided by LPs. These funds are used to facilitate trades on a DEX.

How long do liquidity pools last? ›

In most cases, crypto liquidity mining programs run for a predetermined period of time, usually ranging from a few weeks to several months. During this time, users can stake their tokens and earn rewards based on the amount of liquidity they provide.

What happens when a liquidity pool dries up? ›

Liquidity pools drying up

Because various users worldwide supply liquidity, the amount of liquidity can change as people pull their tokens from the pool. Low liquidity leads to higher slippage, meaning people will receive less money than expected when selling their tokens into the pool.

How do you run a liquidity pool? ›

How to use a liquidity pool
  1. Choose a platform. The most popular DEXs include Curve, Balancer, Uniswap, PancakeSwap, and SushiSwap. ...
  2. Connect your crypto wallet. Once you've found a liquidity pool, you'll need to connect your crypto wallet to the decentralized platform. ...
  3. Select a pair. ...
  4. Add liquidity.

What is liquidity risk in DeFi? ›

Liquidity pool vulnerabilities refer to weaknesses and risks associated with decentralized finance (DeFi) liquidity pools, which are a crucial component of many blockchain-based financial platforms. Liquidity pools are used for trading, lending, and other financial activities in the DeFi ecosystem.

How risky are liquidity pools? ›

Depositing your cryptoassets into a liquidity pool comes with risks. The most common risks are from DApp developers, smart contracts, and market volatility. DApp developers could steal deposited assets or squander them. Smart contracts might have flaws or exploits that lock or allow funds to be stolen.

What is the most profitable liquidity pool? ›

Pools Decentralized Exchange
PoolTVLCurrentTVL30D Change
1 P W PENDLE / WETH 0.3% Camelot V2 • Arbitrum$5.69M+36.85%
2 A W AIDOGE / WETH 0.5% Camelot V2 • Arbitrum$3.11M-13.77%
3 S W SFUND / WETH 0.3% Camelot V2 • Arbitrum$1.67M-48.48%
4 J W JONES / WETH 0.5% Camelot V2 • Arbitrum$1.55M-16.89%
37 more rows

Are liquidity pools worth it? ›

Yes, liquidity pools can be profitable but are subject to various risk factors, including impermanent loss.

What is a liquidity pool for dummies? ›

A liquidity pool is some where you 'pool' two tokens together and provide them as a sort of funding to help other users perform trades or swaps. Think about it. If someone has an apple and they want to swap it for an orange at the shop the shop keeper (DEX) needs to have oranges in stock to do so.

How do you cash out liquidity? ›

On the Web app: To remove Liquidity from Liquidity Mining, please go to your Liquidity Mining Page, scroll down until you see "My Liquidity", and then you can on the right side of the pool under "Actions", click "Remove".

What is liquidity for beginners? ›

Liquidity meaning

An asset with high liquidity can be more quickly bought and sold than an illiquid asset and it is also easier to sell it for the market price. Cash is the most liquid asset, whereas real estate or a rare painting, for example, can be less liquid because you may not be able to sell it immediately.

How do liquidity providers make money in crypto? ›

LPs earn rewards through trading fees that traders pay to DEXs for every transaction. In addition, some DEXs reward LPs with governance tokens for their contribution, based on their share of the total pool liquidity. This entire process is called liquidity mining.

What is the difference between liquidity pool and staking? ›

Liquidity pools maintain equilibrium and adjust for token prices during volatile market conditions. If users decide to withdraw their assets when token prices have deviated from their time of deposit, impermanent loss becomes permanent. Staking, however, is not subject to any kind of impermanent loss.

Is DeFi liquidity mining legit? ›

Yes, liquidity mining is risky. Risks include impermanent loss, market volatility, and the potential for rug pulls from potential fraudulent projects and platforms.

Top Articles
Latest Posts
Article information

Author: Rob Wisoky

Last Updated:

Views: 5878

Rating: 4.8 / 5 (48 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Rob Wisoky

Birthday: 1994-09-30

Address: 5789 Michel Vista, West Domenic, OR 80464-9452

Phone: +97313824072371

Job: Education Orchestrator

Hobby: Lockpicking, Crocheting, Baton twirling, Video gaming, Jogging, Whittling, Model building

Introduction: My name is Rob Wisoky, I am a smiling, helpful, encouraging, zealous, energetic, faithful, fantastic person who loves writing and wants to share my knowledge and understanding with you.