Liquidity Pool
A liquidity pool is a smart contract that holds a reserve of two or more cryptocurrency tokens, enabling decentralized trading without a traditional order book. Users who deposit tokens into the pool earn a share of the trading fees generated when others swap assets within the pool.
How It Works
When a trader wants to exchange one token for another, the smart contract calculates the price based on the constant product formula (x × y = k), where x and y are the quantities of the two tokens in the pool.
- Deposit: Liquidity providers add equal‑value amounts of each token to receive pool tokens representing their share.
- Trade: A swap alters the token balances; the contract adjusts the price to keep the product constant.
- Fee: A small percentage (often 0.3 %) of the trade amount is taken as a fee and added to the pool.
- Withdrawal: Providers can burn their pool tokens to retrieve their underlying assets plus accrued fees.
Why It Matters
Liquidity pools power decentralized exchanges (DEXs) by supplying the assets needed for instant, permissionless trades. They reduce reliance on centralized intermediaries and enable yield‑generating strategies for crypto holders.
For example, a user deposits 10 ETH and 20,000 USDC into an ETH/USDC pool. As traders swap ETH for USDC, the pool’s balances shift, and the provider earns a portion of the 0.3 % fee on each swap, turning idle tokens into a passive income stream while supporting market liquidity.