As a core component of the DeFi ecosystem, liquidity pools allow cryptocurrency trading without traditional order books. Order books list buy and sell orders to determine prices, whereas liquidity pools operate through smart contracts. These contracts hold token pairs, funded by liquidity providers (LPs).
Liquidity pools use automated market makers (AMMs) to set prices based on supply and demand rather than matching individual buyers and sellers.
To better understand how liquidity pools work, let’s take a closer look at the role of liquidity providers (LPs) and the AMM algorithm that powers price determination.
Liquidity providers (LPs)
Liquidity providers are users who deposit assets into a liquidity pool to increase its liquidity. In return, they receive a share of the transaction fees generated by trades within the pool.
For example, Uniswap charges a 0.3% fee per trade, which is proportionally distributed among LPs.
Typically, LPs must deposit equal values of two tokens into the pool to form a trading pair. This ensures that there is sufficient liquidity for both assets, allowing traders to swap tokens without relying on order books.
AMM algorithm
Automated market makers (AMMs) are algorithms that determine prices based on the ratio of tokens in a liquidity pool. One of the most common AMM models is the Constant Product Market Maker, which follows this formula:
x * y = k
Here, x and y represent the amounts of the two tokens in the pool, while k is a constant value.
When a user swaps Token A for Token B, the supply of Token A in the pool increases, while the supply of Token B decreases. The AMM automatically adjusts prices to maintain balance according to the formula.
This mechanism means that larger trades cause more significant price changes, as the pool adjusts to keep token ratios stable.
Uniswap, one of the most popular decentralised exchanges, relies on this AMM model to facilitate trading without central intermediaries. By combining LP-provided liquidity with algorithm-driven pricing, DEX users can swap tokens efficiently and transparently.
Types of liquidity pools
Liquidity pools come in different forms, depending on their function and the underlying protocol. Some focus on trading, while others support staking, lending, or risk-adjusted investments.
Here are the most common types of liquidity pools and their key features:
Trading pair pools – Contain two tokens that users can swap directly
Staking liquidity pools – Require users to lock up tokens to support the network and earn rewards
Lending pools – Allow users to deposit tokens for lending, earning interest in return
Single-asset pools – Accept only one token, rewarding users for providing liquidity
Tranche pools – Offer risk-based options, letting users choose between higher returns with higher risks or more stable earnings
These varied liquidity pool models give users flexibility in how they provide liquidity and earn rewards, shaping the DeFi landscape.