Merchant panel YouTube
English
Get the app

What is a liquidity pool? A full guide to providing liquidity, LP rewards and impermanent loss

By John · Published:

A liquidity pool is a smart contract that holds two tokens so anyone can swap one for the other, with the price set by a formula instead of an order book. Liquidity providers deposit both tokens and earn a share of swap fees, but carry risks such as impermanent loss. This full guide covers pricing, rewards, the impermanent loss math and the main risks; it is educational, not investment advice.

What is a liquidity pool?

A liquidity pool is a smart contract that holds a pair of tokens, call them A and B, and lets anyone swap one for the other at any time. When you swap on a decentralized exchange, you usually trade against a pool like this, not against another person.

The tokens come from liquidity providers (LPs), ordinary users who deposit both tokens. A trader adds one token and takes the other out, and the contract works out the price from how much of each token it holds, so a price is always available without waiting for someone to take the other side.

Order book vs automated market maker (AMM)

An order book is a list of buy and sell orders at different prices, and the exchange matches each buyer with a seller. Liquidity there means how many orders sit close to the current price.

An automated market maker (AMM) replaces that list with a pool and a formula. You trade with the contract, the price adjusts after every trade, and each swap is a blockchain transaction.

Arbitrage traders keep AMM prices in line with other markets: if a pool sells a token cheaper than elsewhere, they buy from it until the gap closes.

How does a liquidity pool set the price? The x × y = k formula

The classic AMM design is the constant-product pool. If x is the amount of token A in the pool and y the amount of token B, the contract keeps x × y = k, where k stays the same during a trade, fees aside. The price of A is simply y ÷ x.

Take a hypothetical pool with 100 A and 10,000 B. Then k = 100 × 10,000 = 1,000,000, and 1 A costs 100 B. Buying A adds B and removes A, so A becomes scarcer and its price rises; each extra unit costs more than the one before.

Why does a bigger trade get a worse price?

A bigger trade gets a worse price because it pushes the pool's ratio further. That effect of your own trade is price impact; slippage is the gap between the quote and what you actually get, including market moves while your transaction waits. A minimum received amount sets the floor: below it, the swap does not go through.

Deep pools absorb large trades; small pools move sharply. In the same hypothetical pool, ignoring fees:

Slippage and slippage tolerance explained

  • Buying 1 A leaves 99 A and about 10,101 B: you pay about 101 B, roughly 1% above the starting price.
  • Buying 10 A leaves 90 A and about 11,111 B: you pay about 1,111 B, or 111 B per A.
  • Buying 50 A leaves 50 A and 20,000 B: you pay 10,000 B, an average of 200 B per A, and the pool price ends at 400 B per A.

What is providing liquidity, and where do LP rewards come from?

Providing liquidity means depositing both tokens of a pair into a pool so others can trade against them. In a classic pool you add equal values of each, and you receive LP tokens as a receipt for your share.

Every swap pays a small fee into the pool, shared in proportion to each provider's stake: own 2% of the pool and you get 2% of the fees. The total depends on trading volume, so a quoted yearly rate is an estimate, not a promise.

  • Incentive tokens: some pools add extra tokens, often the project's own, a practice called yield farming. Their value can fall fast when recipients sell.
  • Withdrawing: you return the LP tokens and take your share of both tokens in the pool's current ratio, which can differ from what you put in. Whoever holds the LP tokens controls that share.
  • Concentrated liquidity: some designs let providers pick a price range. Inside it they earn more fees; outside it they earn nothing and hold only one token, and impermanent loss is larger.

Impermanent loss explained, with an example

Impermanent loss is the shortfall a liquidity provider faces compared with simply holding the same two tokens, caused by their prices moving apart. When A gets more expensive elsewhere, arbitrage traders buy it from the pool, so the pool ends up holding less of the token that rose.

Hypothetical example, fees ignored: you supply the whole pool of 100 A and 10,000 B, worth 20,000 B at 100 B per A. A's price then rises to 400 B. Arbitrage moves the pool to 50 A and 20,000 B, since 50 × 20,000 still equals 1,000,000. Your share is now worth 50 × 400 + 20,000 = 40,000 B, while simply holding 100 A and 10,000 B would be worth 100 × 400 + 10,000 = 50,000 B: 20% less than holding, though still more than at the start.

For a classic 50/50 pool the general formula is IL = 2√r ÷ (1 + r) − 1, where r is how many times the price of one token changed against the other. A doubling gives about −5.7% and a 4× move −20%; a fall to half also gives −5.7%.

It is called impermanent because it disappears if prices return to where you entered; withdraw while they are apart and it becomes permanent. Swap fees may or may not offset it. A pool of two dollar stablecoins usually shows very little impermanent loss, yet it still carries depeg and contract risk.

What is a stablecoin? Types and depeg risk

Holding vs providing liquidity vs staking

Providing liquidity is often compared with staking, but the income and the risks come from different places. Staking locks a proof-of-stake network's coins to help secure it, while providing liquidity puts two tokens to work as trading inventory. The table is general; details depend on each network and pool.

Holding, providing liquidity and staking compared
OptionWhat you holdWhere income comes fromMain risk
Simply holdingThe coins themselves, in your own walletNo income; only price changesThe price of the coins falls
Providing liquidityLP tokens for a share of two tokens in a poolA share of swap fees, sometimes incentive tokensImpermanent loss, contract bugs, rug pulls
StakingCoins of a proof-of-stake network, locked or delegatedNetwork rewards for helping validate blocksPrice swings, lock-up periods, penalties, pool contract risk

What is staking, and how does it work?

What are the risks of liquidity pools?

Fees and impermanent loss are only part of the picture. These risks can cost far more:

Pump and dump vs rug pull

  • Smart-contract bugs: a flaw in the code can let an attacker drain the pool, irreversibly.
  • Rug pulls and fake pools: a token's creators open a pool, draw in buyers and providers, then pull the liquidity out. Fake pools also list copycat tokens with famous names.
  • Malicious approvals: on EVM chains, adding liquidity starts with approving a contract to spend your tokens; a fake site can request an unlimited approval and drain them later.
  • Low liquidity: in a small pool your own deposit or exit moves the price, and a thin token may be hard to sell.
  • Price swings: both tokens can fall together, and impermanent loss comes on top of market losses.
  • Unrealistic yields: a very high advertised return usually comes from printing incentive tokens or from a Ponzi-style scheme.

Does Waletifi offer liquidity pools?

No. Waletifi does not offer liquidity pools, liquidity providing, yield farming or LP tokens, and this guide is not a recommendation to provide liquidity anywhere.

Where enabled for your region, Waletifi offers Swap: conversion between coins and networks from your own wallet. Before you sign, the swap screen shows the minimum received and the fees, and your keys never leave your phone.

What is a crypto swap?

Questions and answers

What is a liquidity pool in simple terms?

It is a pot of two tokens in a smart contract that anyone can swap against at any time. The price comes from the ratio of the two tokens, not from matched orders.

Where do liquidity provider rewards come from?

Mainly from swap fees, shared in proportion to each provider's share of the pool; some pools add incentive tokens. The amount depends on trading volume and is never guaranteed.

What is impermanent loss in simple words?

It is how much less your pool share is worth than simply holding the same two tokens after their prices move apart. A 4× move leaves a classic pool 20% behind holding, fees aside.

Can you lose money providing liquidity?

Yes. Impermanent loss, falling prices, a contract bug, a malicious approval or a rug pull can all leave you with less than you deposited.

What are LP tokens?

LP tokens are the receipt a pool gives you for your deposit, recording your share of it. You return them to withdraw, so whoever holds them controls that share.

Does Waletifi have liquidity pools or yield farming?

No. Waletifi does not offer liquidity pools, liquidity providing, yield farming or LP tokens. It offers swaps between coins and networks where available.

See the numbers before you sign

Install Waletifi to swap between coins where available, with the minimum received and fees shown before you sign.

Get it on Google PlayComing soon Download on the App StoreComing soon Direct download (APK)Coming soon