Liquidity pools are the bread and butter of many DeFi protocols. But what actually makes up liquidity pools, why liquidity pools are important and how do they work?
In this Learn Center post, we'll walk you through how liquidity pools power decentralized exchanges and provide liquidity for trading and other uses. You’ll also learn about the different components that liquidity pools use, the types of liquidity pools that exist, the pros and cons of liquidity pools and examples of protocols that use them, including Bitcoin-based decentralized exchanges (DEXs).
A History of Crypto Liquidity Pools Amidst the Rise of DeFi
To start, liquidity of an asset is super important for determining how easily it can be bought, sold and exchanged. Crypto liquidity pools work to make cryptocurrency easier to turn around in transactions and improve their overall efficacy and utility.
Decentralized exchanges were introduced about six years ago, with DEXs like EtherDelta and IDEX being some of the original names. They relied on order books for trading and required matching buying and selling numbers.
But then came Automated Market Makers (AMMs), which was proposed by Vitalik Buterin in a 2016 post. This marked a departure from order books and into liquidity pools that rely on market pricing and algorithms, with one of the significant DEXs that popularized liquidity pools being Uniswap.
And throughout the years, as DeFi protocols have taken off, notable platforms have emerged that have not only used liquidity pools (like crypto swaps), but also cemented them as essential to the crypto space.
How Liquidity Pools Work
A liquidity pool is a collection of funds locked in smart contracts that enable DEXs to facilitate trading without relying on traditional order books as we mentioned above. In these pools, users contribute funds (these users are called liquidity providers) to buy and sell different cryptocurrencies, and they earn a share of the trading fees proportional to their contribution. This system helps ensure that liquidity pools provide enough liquidity for a DeFi protocol to operate, and provide an incentive for users to contribute liquidity to a pool.
To start a liquidity pool, users deposit equal values of two tokens into the pool, creating what is known as a trading pair. For instance, if you want to create a liquidity pool for BTC and ETH, you’d deposit an equal value of both assets.
Liquidity pools leverage algorithms to determine token prices. These are based on the ratio of tokens in the pool, enabling automated trading and simplifying the process of matching buyers and sellers. Pools let users trade tokens directly from them without relying on a centralized intermediary. Liquidity providers play a crucial role in keeping the pool liquid to prevent low liquidity situations. They earn rewards for pooling tokens, which are a portion of the trading fees.
Sometimes, due to price fluctuations, the value of deposited tokens can be temporarily reduced. This situation is called impermanent loss, and it refers to when the value of your tokens in the pool falls to be less than the value of the initial deposit. Trading fees can often compensate for the temporary losses.
Examples of Popular Liquidity Pools
There are different types of liquidity pools, and each one serves a different purpose. From classic Constant Product pools to the versatile Hybrid Pools, each has features that appeal to different providers.
- Constant Product: This is what people tend to think of as your typical liquidity pool, given that it is also the most common type of decentralized liquidity pool. The pool maintains a fixed product of tokens. As an example, say you deposit 1 BTC and 16 ETH, the pool will always maintain this product of tokens. The total value of ETH will always equal the total value of BTC.
- Constant Sum: This is also known as a Balancer pool. These allow users to enjoy an automatically balancing pool, and are custom portfolios of varying token weights. Liquidity providers can deposit multiple tokens exchanged at rates.
- Stablecoin Pools: This is also known as a Curve pool. These are optimized for trading stablecoins, which are also crucial for many DeFi protocols and transactions. These pools are designed to minimize losses during swaps.
- Hybrid Pools: An example of one of these is SushiSwap. Hybrid pools combine characteristics of multiple pool types for added flexibility. SushiSwap, for instance, allows liquidity providers to earn SUSHI tokens in addition to the usual trading fees.
- Liquidity Bootstrapping Pools: These pools, such as Balancer LBP, are used to launch new tokens with gradual price adjustments. They allow projects to attract liquidity and bootstrap their token's value.
- Dynamic Fee Pools: Dynamic fee pools are used to adjust transaction fees based on network demand and congestion. As the network experiences higher usage and congestion, the fees increase to incentivize miners or validators to prioritize transactions and process them more quickly, while during periods of lower demand, fees decrease to ensure more affordable transactions.
The Pros and Cons of Liquidity Pools
Liquidity pools have their strengths and weaknesses, as do many technologies.
On the one hand, the pools offer instant, efficient token swaps and seamless trading. They empower users to be liquidity providers, promoting decentralization in the crypto market. Providers get rewards in trading fees and sometimes, native tokens. Given those benefits, the application of liquidity pools offers a new kind of financial independence and agency around decentralized cryptocurrency.
But liquidity pools do come with risks as well. Token prices can drop, exposing liquidity providers to impermanent loss and impacting their overall returns. Vulnerabilities in smart contract systems can also lead to security risks and, not only that, but in many cases, users do have limited control over their assets until they withdraw their funds. The pools also need providers to buy in with a sufficient number of tokens, and they can be tough for beginners to understand and ultimately master.
Examples of Bitcoin-Based Liquidity Pools in DeFi
Several DEXs built on Bitcoin have embraced liquidity pools as an integral part of their functionality. Here are a few noteworthy examples:
Stackswap is a cross-chain DEX for swapping BTC, ETH, and USDC (ERC20) with Stacks-based tokens (SIPs). With Stackswap, Bitcoin users can have a seamless on-ramp to explore the Stacks ecosystem of DeFi and other Web3 dApps. The platform utilizes Hiro Wallet for swapping assets and STX tokens for transaction fees.
Bisq is an off-chain, peer-to-peer decentralized crypto trading platform for buying and selling BTC in exchange for fiat and other cryptocurrencies. The Bisq exchange utilizes a network of nodes to facilitate trades between users. The software is designed to make transactions more secure, private, and censorship resistant than those executed on centralized exchanges. Bisq uses a multi-signature escrow process, which holds onto funds until a trade is completed and offers a decentralized dispute resolution system to resolve any issues.
THORChain is a decentralized exchange that has 8 supported blockchains, including Bitcoin. Based on the Cosmos software development kit (SDK), it uses an automated market maker (AMM) model to swap digital assets across blockchain networks in a non-custodial manner. By enabling cross-chain swaps, THORChain empowers crypto traders to move digital assets across ecosystems without relying on centralized entities. There are several interfaces that integrate with THORChain’s technology, including THORWallet.
LNSwap, a Trust Machines product, is also a protocol that allows users to swap their Bitcoin for digital assets on the Stacks Bitcoin layer, and vice versa. The protocol relies heavily on atomic swaps, and a network of users, liquidity providers, and aggregators.
Liquidity Pools in DeFi
Liquidity pools play a pivotal role in shaping decentralized exchanges, providing essential liquidity for traders and enabling seamless token swaps. Understanding their components and what different types of liquidity pools can enable will allow users to explore the evolving DeFi ecosystem.
And of course, this ultimately allows users to delve into many of the trustless technologies being built on Bitcoin and other blockchains today. For more information on liquidity pools and crypto swaps (particularly on Bitcoin), head to LNSwap.com to find out all you need to know about becoming a liquidity provider, liquidity mining and other related topics.