<p>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.</p>

<h2>How It Works</h2>
<p>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.</p>
<ul>
<li><strong>Deposit:</strong> Liquidity providers add equal‑value amounts of each token to receive pool tokens representing their share.</li>
<li><strong>Trade:</strong> A swap alters the token balances; the contract adjusts the price to keep the product constant.</li>
<li><strong>Fee:</strong> A small percentage (often 0.3 %) of the trade amount is taken as a fee and added to the pool.</li>
<li><strong>Withdrawal:</strong> Providers can burn their pool tokens to retrieve their underlying assets plus accrued fees.</li>
</ul>

<h2>Why It Matters</h2>
<p>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.</p>
<p>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.</p>