Confused by DeFi? We break down how AMMs and liquidity pools replaced the order book, creating a trading system that never sleeps. Learn how Uniswap actually works.
Table of Contents
I still remember the first time I used a Decentralized Exchange (DEX) back in 2017. It was called EtherDelta, and honestly, it was a nightmare. You had to manually find a specific person who wanted to sell exactly what you wanted to buy. It was slow, clunky, and if nobody was online, you were stuck. The liquidity was a ghost town.
Then, Uniswap launched, and suddenly, the lights turned on.
You didn’t have to wait for a buyer anymore. You could trade instantly, 24/7, for any amount. It felt like magic, but it wasn’t. It was math. Specifically, a breakthrough innovation called AMMs and liquidity pools.
If you are trading crypto in 2026, you are likely using these systems every single day, perhaps without even knowing it. Whether you are swapping on Uniswap, Raydium, or PancakeSwap, the engine is the same. But for most investors, it remains a black box.
Today, we are going to crack that box open. We’ll ditch the complex calculus and explain exactly how AMMs and liquidity pools function, why they revolutionized finance, and the hidden risks (like the dreaded impermanent loss) that every Liquidity Provider needs to know.
The Old Way: Order Books vs. The Robot
To appreciate the innovation, you have to look at Wall Street. The New York Stock Exchange and Coinbase use an Order Book model.
- Buyer: “I want to buy 1 Apple stock for $150.”
- Seller: “I want to sell 1 Apple stock for $151.”
- Market Maker: A middleman who steps in to bridge that $1 gap so the trade happens.
This works great for Apple or Bitcoin. But what about a small, new token with only 500 holders? There are no buyers. There are no sellers. The market freezes.
AMMs and liquidity pools solved this by removing the human element entirely.
AMM stands for Automated Market Maker. Instead of trading against a person, you trade against a smart contract (a robot). This robot is always willing to buy and always willing to sell, no matter what time it is or how volatile the market is.
What is a Liquidity Pool? (The Bucket of Money)
If the AMM is the robot, the Liquidity Pool is its wallet.
A liquidity pool is simply a smart contract pile of two assets. Let’s say we are creating a pool for Ethereum (ETH) and USDC.
To start the pool, I (the Liquidity Provider) deposit $100,000 worth of ETH and $100,000 worth of USDC.
Now, the robot has inventory.
- If you want to buy ETH, the robot gives you ETH from the pile and takes your USDC.
- If you want to sell ETH, the robot takes your ETH and gives you USDC from the pile.
You never had to find a counterparty. You just swapped assets with the bucket. This is the core magic of AMMs and liquidity pools. They democratize market making. In the old days, only Citadel or heavy-hitter banks could be market makers. Now, anyone with $50 can become a “bank” by depositing funds into a pool.
The Math: The Constant Product Formula
“But how does the robot know the price?”
This is where the famous Uniswap formula comes in:
$$x * y = k$$
- x = Amount of Token A (ETH)
- y = Amount of Token B (USDC)
- k = A constant number that must not change.
The AMM is programmed to keep “k” balanced.
If you buy ETH from the pool, you are removing ETH (x goes down). To keep “k” the same, the amount of USDC (y) must go up. This means the robot charges you more USDC for each subsequent ETH you buy.
This automatic price adjustment is why AMMs and liquidity pools are so efficient. As supply gets scarcer in the pool, the price goes up exponentially. It mimics supply and demand perfectly without a single human making a decision.

Who are the Liquidity Providers (LPs)?
AMMs and liquidity pools : So, why would anyone lock up their money in these pools?
Simple: Greed (or Yield).
When you trade on Uniswap, you pay a fee (usually 0.3%). That fee doesn’t go to Uniswap the company; it goes directly to the Liquidity Providers.
If you provide 1% of the liquidity in the pool, you earn 1% of all the trading fees.
In a high-volume bull market, being an LP can be incredibly lucrative. You are essentially owning a piece of the casino. However, providing liquidity to AMMs and liquidity pools isn’t passive income. It comes with a nasty risk known as Impermanent Loss.
The Silent Killer: Impermanent Loss
This is the concept that wrecks new investors.
Because AMMs and liquidity pools require you to deposit two assets (usually 50/50 value), you are exposed to the price movement of both.
If ETH goes up 500% while it’s sitting in the pool, the AMM will automatically sell your ETH as the price rises (to keep the 50/50 ratio balanced).
- The Result: When you withdraw your money, you will have more USDC and less ETH than if you had just held the ETH in your wallet.
- The Loss: You still made a profit, but you made less profit than simply HODLing. That difference is called Impermanent Loss.
It is “impermanent” only because if the price goes back to the original entry point, the loss disappears. But in crypto, prices rarely return to the exact same spot. Before you jump into AMMs and liquidity pools, you have to calculate if the trading fees you earn will outweigh this potential loss.
Slippage and Price Impact
For the trader (not the LP), the size of the liquidity pool matters.
Imagine trying to buy $1 million of ETH from a pool that only has $2 million total.
Because you are taking out such a huge chunk of the supply, the AMM formula will skyrocket the price during your trade. This is called Price Impact or Slippage.
- Deep Pools: High liquidity (billions of dollars). You can trade large amounts with almost zero slippage.
- Shallow Pools: Low liquidity (thousands of dollars). Even a small trade moves the price wildly.
This is why “Total Value Locked” (TVL) is such a crucial metric for AMMs and liquidity pools. High TVL means a stable, usable market. Low TVL means a volatile, risky market.
The Evolution: Uniswap V3 and Concentrated Liquidity
The technology didn’t stop at $x*y=k$.
Uniswap V3 introduced Concentrated Liquidity.
In V2 (the classic version), your money was spread across the entire price curve—from $0 to Infinity. That meant most of your capital wasn’t actually being used for trading (since ETH rarely trades at $0 or $1,000,000).
V3 allows LPs to say: “Only use my money to trade ETH when the price is between $2,000 and $3,000.”
- Pros: It makes AMMs and liquidity pools vastly more capital efficient. You earn way more fees with less money.
- Cons: It’s harder to manage. If the price goes out of your range (e.g., ETH hits $3,001), you stop earning fees entirely.
Why This Matters for 2026
We are seeing AMMs and liquidity pools eat the world.
It started with obscure crypto tokens. Now, we are seeing Real World Assets (RWAs) like stocks, bonds, and real estate being tokenized and traded in pools.
Banks are experimenting with FX (foreign exchange) AMMs because they run 24/7/365, unlike the traditional forex market which sleeps on weekends. The efficiency of the code is simply undeniable.
Understanding this plumbing gives you an edge. You stop seeing “DEXs” as chaotic casinos and start seeing them as structured mathematical marketplaces. You understand why fees fluctuate, why prices slip, and where the yield actually comes from.
Frequently Asked Questions (FAQ)
Is it safe to provide liquidity to AMMs and liquidity pools?
It carries risk. The two main risks are Smart Contract Risk (a hacker finds a bug in the code and drains the pool) and Impermanent Loss (the rebalancing of assets causes you to underperform holding). Always stick to battle-tested AMMs like Uniswap or Curve to minimize code risk.
What happens to my funds if no one trades in the pool?
If there is no trading volume, you earn zero fees. Your funds just sit there. However, you are still exposed to the price volatility of the assets inside the pool. Providing liquidity is only profitable if there is sufficient activity.
Can I withdraw my funds from a liquidity pool at any time?
Yes. Unlike traditional bank CDs, AMMs and liquidity pools are usually permissionless. You can deposit and withdraw instantly. However, you may pay a small “gas fee” (network transaction fee) to the blockchain to process the withdrawal.
What is the difference between an AMM and an Order Book DEX?
An Order Book DEX (like dYdX) matches buyers and sellers directly, similar to a traditional stock exchange. An AMM uses a smart contract (the robot) to hold the assets and set the price mathematically. AMMs and liquidity pools are generally better for assets with lower liquidity.
Do AMMs replace centralized exchanges like Binance?
For many users, yes. They offer self-custody (you keep your keys) and access to tokens that aren’t listed on centralized exchanges yet. However, centralized exchanges are still popular for their ease of use, fiat on-ramps (connecting bank accounts), and high-speed trading engines.
Conclusion: The Engine of DeFi
The invention of AMMs and liquidity pools is up there with the invention of double-entry bookkeeping. It fundamentally changed how value moves.
It turned “market making”—a profession reserved for the elite of Wall Street—into software that anyone can run. It made liquidity global, permissionless, and unstoppable.
So the next time you click “Swap” on your phone, take a second to appreciate the robot on the other side of the trade. It’s crunching the numbers, balancing the pool, and keeping the market alive, one block at a time.