Notice: Undefined index: Features in /data/phemex/wp/wp-content/themes/knowall/header.php on line 1412
combobox arrow
Phemex Blog
Phemex Crypto Blog: Learn the latest news, updates, and industry insights on bitcoin futures, bitcoin trading, crypto derivatives exchange, and related blockchain technology.

What is a Liquidity Pool: Achieving Efficient Asset Trading

Liquidity pools offer liquidity to a pool of tokens locked in smart contracts. They are widely used in decentralized exchanges (DEXs) to increase the market’s liquidity, resulting in lower transaction costs for traders, and thus more efficient asset trading. In addition, liquidity pools are a very important aspect of many crypto concepts, such as automated market makers (AMMs), on-chain insurance, and borrow-lend protocols.

liquidity pool

How Do Liquidity Pools Work?

Each liquidity pool typically contains a pair of tokens. To create a new pool, liquidity providers must contribute a specified quantity of each of the two tokens according to a predetermined ratio. Trading pairs that are usually found on DEXs exist as liquidity pools in an AMM-style decentralized exchange. For example, traders who want to trade Dai (DAI) for Ether (ETH) would look for a DAI/ETH liquidity pool.

Most liquidity pools use an AMM algorithm with a preset mathematical equation to ensure that the asset ratio in liquidity pools remains balanced. The preset mathematical equation used is x*y=k, in which:

  • x refers to the quantity of the first token in the pool.
  • y refers to the quantity of the second token.
  • k is the predetermined constant.

This algorithm eliminates pricing discrepancies in the pooled assets by ensuring that the multiplication of the token quantity will always equal the same number, k.

automated market maker equation
The automated market maker equation (Source: Coindesk)

Each token swap in a pool leads to a price adjustment from the deterministic pricing algorithm of the automated market maker (AMM) model. For example, if someone buys ETH from a DAI/ETH pool and pays in DAI, the remaining ETH’s price will increase from the reduced ETH supply. To fulfill the balancing effect of x*y=k, the DAI’s price decreases because the supply of DAI has increased.

Under the algorithm, bigger trades should be completed in pools with a bigger pool size so that the price does not move too much and constant liquidity is provided. Unfortunately, pools that are not adequately funded are susceptible to slippages. Since larger liquidity pools provide a better trading experience and less slippage, some protocols reward liquidity providers with extra tokens for supplying liquidity, also known as liquidity mining. This reward serves to encourage more people to provide liquidity to particular pools.

How Do Liquidity Pools Make Money?

Unlike centralized exchanges, anyone can deposit assets and obtain rewards for providing liquidity to the AMM-style DEX. To become a liquidity provider, one only needs to deposit a certain predetermined ratio of the paired tokens. Liquidity providers can earn income and the governance token of the particular protocol (if available). The governance token allows holders to have voting rights related to network governance and the development of the AMM protocol. Liquidity providers are also motivated by some protocols, as the protocols offer financial gains derived from trader’s transaction fees.

During pool creation, a liquidity provider must first determine the initial price of assets of the pool. The liquidity provider must then provide liquidity for the token pairs in the pool. If the liquidity provider fails to do so, an arbitrage opportunity is created, leading to a loss of capital.

After providing liquidity, the liquidity provider typically receives tokens (called LP tokens) in proportion to the provided liquidity. When the liquidity provider decides to withdraw their liquidity and yields from a particular pool, they must get rid of their LP tokens by burning them.

In addition, the liquidity provider’s earnings are affected by the following aspects:

  • Trading volume: Typically, a liquidity provider’s income comes from transaction fees deducted from traders’ expenses. The transaction volume and fee rates affect the transaction fees. Therefore, a larger transaction volume would mean more fees for liquidity providers.
  • Governance tokens: The governance tokens are distributed by the protocol as a reward for liquidity providers. The distribution of governance tokens is based on the liquidity provider’s share of the liquidity pool, meaning that the number of governance tokens in hand will affect their returns.
  • Liquidity pool market value: Every liquidity pool’s market value fluctuates due to changes in liquidity pool composition and the crypto asset’s This results in impermanent losses, but liquidity providers are affected only when they withdraw funds from the liquidity pool.

What Is the Difference Between Liquidity Providers and Market Makers?

Liquidity providers and market makers offer the same service — liquidity. High liquidity would provide enough volume to fill orders quickly, which equals a flourishing market. Dark pools, previously set up for institutional investors, are now letting smaller-sized trades into their pool to create more liquidity. However, liquidity providers and market makers have some distinct differences, which are as follows:

  • Third-party involvement: Market makers include third-party and cross-exchange entities to provide liquidity, while liquidity providers provide liquidity to a market without a third party by utilizing liquidity pools.
  • Profit source: Some market makers ask for a certain profit level from exchanges they provide liquidity for. If profits fall under the agreed rates, the exchange would pay for the difference. Other market makers source their profits from the bid-ask spread, buying the token low and selling it high. In contrast, liquidity providers are rewarded when they provide the pool with liquidity. They also receive LP tokens based on the liquidity provided and are rewarded with the fees that traders pay to utilize the exchange, thereby generating a good return.
  • Impact on asset pricing: Market makers use an order book system that operates on the bid-ask spread. Though a market maker can generate money through an increasing spread, the exchange volume may shrink. The volume shrinkage occurs because a high spread will extend the bid and ask price difference, making assets more expensive than their intrinsic price. This makes trading unattractive for frequent traders and small investors since they lose money from highly-priced assets. With liquidity providers, liquidity pools operate on the AMM model with deterministic pricing. Therefore, pricing is affected by pool size and trade size.
  • Market competitiveness: Market making is a more passive way of providing liquidity. Time is also a consideration, where other market makers can capitalize on increasing spread to generate more money. Besides competition and reduced volume, the asset price also often fluctuates, which decreases trade opportunities for market makers, leading to fewer profits. With liquidity pools, pricing is taken care of by the smart contract, and liquidity providers only have to deposit their funds without competition.

Liquidity Pool vs Order Book

Commonly used in centralized exchanges, the order book model is employed to pair buyers and sellers. Buyers and sellers need to be present for the order book to execute the transactions. However, if transaction volume is lacking, meaning that the particular token is illiquid, price swings will occur. Such high price volatility will make the particular token unattractive for buyers.

If utilized in DEXs, the order book model would also make transactions expensive, because every interaction would require a gas fee from the smart contract. Hence, liquidity pools became the backbone of many DEXs and substituted the traditional order book model often used by centralized exchanges.

trade crypto with 0 fees

What Advantages Do Liquidity Pools Offer?

Liquidity pools can automatically adjust the value of cryptocurrencies based on a platform’s exchange rate through smart contracts. Users can simply borrow assets from a pre-funded liquidity pool generated from exchange rates working in a cyclical process facilitated by the supply of the paired tokens. As a result, transactions are smoother, as the sellers and buyers do not determine prices. Transactions are also less volatile due to effective price calculations and fee allocations. As mentioned previously, these transaction fees can also be very profitable for liquidity providers.

Moreover, users can use the LP tokens for other DeFi services. For example, tokens can be deposited on another compatible platform and lent to other users. As a result, users can obtain additional yield by compounding multiple interest rates through liquidity mining.

What Risks Do Liquidity Pools Involve?

Because trading activity can change the price and asset quantity, the asset ratio upon withdrawal will likely differ from what was initially deposited. The first liquidity provider usually supplies two assets of equivalent worth in USD into the pool. Hence, the losses would be compared to the original holding ratio. This loss is also referred to as impermanent loss. Impermanent loss occurs when the price ratio of pooled assets fluctuates. The higher the shift in price, the higher the loss incurred. Impermanent losses commonly affect pools that have volatile assets. For this reason, liquidity mining cannot always provide a stable income for liquidity providers. Nonetheless, users can use the previous earnings from transaction fees and LP token staking to cover the losses.

Other risks include the standard decentralized finance (DeFi) risks, like smart contract bugs, systemic risks, and admin key misuse, which increases vulnerability to hackers. There are also liquidity pool hacks and possible slippage from larger orders.

The pricing algorithm is also not perfect in some cases. Some teams have created special protocols to counter this. Besides the basic AMM model, some protocols implement slightly different algorithms, where lower fees and slippage are offered for assets exchange with similar prices within a liquidity pool. This has been possible for stablecoins or different flavors of the same coin, such as sETH and wETH. Other protocols even allow as many as eight tokens in a single liquidity pool.

trade crypto contracts with up to 100x leverage

Conclusion

Liquidity is crucial, as it largely determines the price shifts of assets. A limited number of open orders would mean that a market has low liquidity, which results in price swings that make asset prices unpredictable and unattractive. Liquidity pools address the low liquidity problem through AMM-based DEXs. Moreover, DEXs reward users who invest in liquidity pools, ultimately boosting customer engagement.

The order book and liquidity pools are two types of DEXs in the DeFi space at the moment. With liquidity pools, buyers do not have to be connected to a seller, because liquidity is kept constant through a preset algorithm. Despite the benefits, market movement can work against liquidity providers, because the asset ratio will be different than when it was originally invested, potentially causing losses. Nevertheless, liquidity pools are easy to use as users only need to stake the paired token to receive returns.


For any inquiries contact us at support@phemex.zendesk.com .
Follow our official Twitter account to stay updated on the latest news.
Join our community on Telegram to interact with us and other Phemex traders.
Phemex, Trade Simple