What you will learn from this article
- What is a Liquidity Pool
- Liquidity Pools vs Order books
- Advantages of Liquidity Pool
- Liquidity pool exchanges: Uniswap and Bancor
- Creating a Liquidity pool token
You must have heard about liquidity pools, swaps and liquidity pool tokens and wondered how to contribute to a pool and earn some tokens too. You are definitely in the right place if you’re looking for some answers.
What is a Liquidity pool?
A liquidity pool is a cluster of funds locked in a smart contract for the facilitation of decentralized trading and many more functions. Therefore, Liquidity providers are users that add an equal worth of two tokens (trading pair) in a pool to form a market. Whenever liquidity is channeled into a pool, distinctive tokens known as liquidity tokens are minted and transferred to the liquidity provider’s address. These tokens are a representation of a given liquidity provider’s contribution to a pool. The proportion of the pool’s liquidity provided determines the number of liquidity tokens the provider receives.
Importance of Liquidity Pool to Decentralized Finance
Liquidity pools are one of the fundamental technologies behind the present DeFi ecosystem. They are an important component of the automated market makers (AMM), as well as borrow-lend protocols, synthetic assets, yield farming, decentralized insurance, and gaming. Decentralized exchanges (DEX) such as Uniswap and Bancor use liquidity pools as the venue for ERC 20 token pairings. In exchange for funding an equal value of two tokens in a pool to initiate a market, Liquidity providers earn trading fees from the trades that happen in their pool, which is proportional to their share of the total liquidity, i.e sharing of trading fees is on a pro-rata basis. Uniswap, for example, charges a 0.3% trade fee. Other exchanges that use liquidity pools against the traditional order books are Binance Smart Chain exchanges such as PancakeSwap, BurgerSwap, and BakerySwap containing BEP-20 tokens.
Liquidity pools vs. Order books
To fully examine what Liquidity pools are, there is a need to compare them to the alternative: Order book.
An order book is a list of orders that present offers from buyers and sellers for security. It is a collection of open orders for a particular market.
The system that matches buy orders with sell orders is called the matching engine. A Centralized exchange (CEX) would make use of the Order book. This design is great for facilitating systematic exchange and enables the creation of complex financial markets. Since Decentralized trading involves executing trades on-chain, without a centralized party getting involved by holding the funds, this idea negates the use of order books and necessitates Liquidity pools.
Advantages of liquidity pool
Compared to the traditional order book model, liquidity pools have the following advantages:
Assured liquidity at every price level
Liquidity pool is an automated market maker in the form of a smart contract that automatically matches traders’ buy and sell orders based on predefined parameters. So long as investors have deposited assets into the pool, liquidity is constant and traders do not need to be matched directly with other traders.
Ideal for an environment with low liquidity
When liquidity is low, it becomes challenging for the order book to match orders. They aren’t ideal for an ecosystem where anyone can create their own token and those tokens usually have low liquidity. Whereas, Liquidity pools thrive better in such circumstances.
Automated pricing enables passive market making
Instead of market makers having to constantly adjust their bids and asks on order books as asset prices move, Liquidity providers simply deposit their assets into the pool and the smart contract takes care of the pricing.
Anyone can become a liquidity provider
Anyone can invest in an existing liquidity pool or create a new exchange pair for any token, at any time. When an investor wants to supply liquidity into a pool, they deposit the equivalent value of both assets. For example, Supplying $1000 of liquidity into an ETH/LINK pool requires a deposit of $1000 worth of ETH and $1000 LINK, which is $2000 in total.
In return, the investor receives liquidity pool tokens which represent their proportional share of the pool and allows them to withdraw that share at any time. Liquidity pools require no listing fees, KYC, or other barriers characteristic of centralized exchanges.
Intermediary infrastructure is not required
Unlike order books that require intermediary infrastructure to host order books and match orders, Liquidity pools don’t. This avoids points of control and removes additional layers of complexity.
Lower gas fees
Due to the efficiencies of price calculations and fee distributions within the pool, gas costs are reduced. Decentralized exchanges like Uniswap have a forthright smart contract architecture that reduces gas costs.
With the above being said, it is also worth noting that decentralized exchanges such as Binance DEX work just fine with on-chain order books. Binance DEX is built on Binance Chain, and it’s specifically designed for fast and cheap trading.
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 that allows data and tokens to flow freely by taking down the walls between chains.
You could think of an order book exchange as peer-to-peer and Liquidity pool and AMM as peer-to-contract.
Liquidity pool exchanges: Uniswap and Bancor
Below, we will be discussing two of the most popular Liquidity pool exchanges briefly; you want to know why?
Uniswap is a decentralized ETH and ERC-20 token exchange that charges a 0.3% trading fee on all its pools. Direct token-token pools are not yet supported, so token-token trades occur in two separate steps: first a sell transaction of the sold token for ETH, followed by an ETH sell transaction to buy the second token.
Bancor supports liquidity pools (called Bancor Relays) between their native BNT token and Ethereum or EOS tokens, as well as between Bancor’s stable coin (USDB) and any Ethereum or EOS token. In this article, we focus on Bancor’s liquidity pools on Ethereum. Similar to Uniswap, investors are required to supply equivalent values of each token. Unlike Uniswap, Bancor’s trading fees vary between pools as they are set by the first user to add liquidity to a Bancor Relay. Current fees are in the range of 0.1–0.5%.
To conclude, If you’re providing liquidity to the pool, you are buying a percentage ownership of that pool, depending on what others contribute to the pool. When you decide to redeem your partial ownership you are compensated with the liquidity pool tokens and your compensation is measured by the percentage of the pool that is your contribution. In essence, by adding two tokens of equal value, you’ll get tokens back that represents your share in the pool. You may be able to deposit those tokens into another pool and earn a return.