You open a DEX, connect your wallet, and swap ETH for USDC in seconds. No account. No middleman. No waiting.
But who took the other side of that trade?
Nobody. A smart contract did. That's the AMM doing its job quietly in the background.
An AMM replaces human traders with a math formula. It holds two tokens in a pool. It prices them based on their quantities, not on what buyers and sellers are offering.
This one idea changed DeFi forever.
Before you understand AMMs, you need to understand liquidity pools.
A liquidity pool is a smart contract that holds two tokens. For example, ETH and USDC are locked together on-chain. Anyone can deposit into it. Anyone can trade against it.
The people who deposit are called liquidity providers, or LPs. They earn a cut of every trade that happens in their pool. No permission needed, just a wallet and some tokens.
The Formula That Runs Everything: x × y = k
Here's the core idea behind most AMMs.
It's three characters: x × y = k
x = is the amount of Token A in the pool
y = is the amount of Token B in the pool
k = a fixed constant that never changes
Every trade must keep that product the same. Buy some Token A, and Token A gets scarcer. That makes it more expensive. Sell Token A back, and the price drops.
The pool prices itself. No human decides anything.
Say a pool holds 1,000 ETH and 2,000,000 USDC. Multiply those together and k = 2,000,000,000. ETH's implied price is 2,000 USDC.
Now you buy 10 ETH.
The pool drops to 990 ETH. Now,to keep k constant, it needs 2,020,202 USDC. You paid roughly 20,202 USDC for those 10 ETH. That's an average price of 2,020 USDC per ETH, not 2,000.
You paid more than the listed price. That difference has a name.
Price impact is how much your trade moves the price inside the pool.
Small trades in big pools barely move anything. Large trades in small pools can shift the price dramatically. The math forces it — that's just how x × y = k works.
This is why you'll see warnings like "3.2% price impact" on DEX interfaces. It means you're getting 3.2% less than the mid-market price. That's the cost of trading in a thin pool.
Slippage isn't the same as price impact. They feel similar but they're not.
Slippage happens because your transaction sits in a queue called the mempool before it confirms. Other trades can execute first. By the time your swap goes through, the pool's ratio has already shifted.
You set a slippage tolerance, say 0.5% to protect yourself. If the price moves more than 0.5% before your trade confirms, the transaction reverts. You get your tokens back. You only lose the gas fee.
How LPs Actually Earn Money
Every swap in a pool charges a small fee. Uniswap V2 charges around 0.3% on every trade. That fee goes straight to the LPs, split by their share of the pool.
So if a pool does $10,000,000 in daily volume at 0.3%, it distributes $30,000 in fees per day. Provide 1% of that pool's liquidity and you earn $300 daily.
Bigger pools, more volume, bigger earnings. Simple math.
Here's where most beginners get hurt.
When you deposit into a pool, the AMM rebalances constantly as prices move. If ETH doubles in price, arbitrage bots buy ETH from your pool until it matches the market rate. Your pool now holds less ETH than when you deposited.
If you'd just held your ETH outside the pool, you'd have made more money.
That gap is called impermanent loss. It's the difference between holding and providing liquidity.
It's called "impermanent" because the loss is not permanent, if prices return to where they started, the loss disappears. But prices rarely snap back perfectly. Many LPs take a real hit.
Traditional AMMs spread liquidity across every possible price from zero to infinity. Most of that capital sits idle. Nobody's trading ETH at $50 or $500,000.
This is a waste.
Virtual liquidity is a concept that describes how you can make a small amount of real capital behave like a much larger pool. You do this by concentrating it within a specific price range. It's the idea that powers Uniswap V3.
Uniswap V3 launched in May 2021 and introduced concentrated liquidity.
Instead of spreading your capital everywhere, you pick a range. Say ETH/USDC between 1,800 and 2,200. Your capital only works inside that range. Within it, you earn fees as if you're providing far more liquidity than you actually deposited.
The capital efficiency gains can be 10x to 100x compared to old-style AMMs. You earn more fees per dollar.
The catch: if ETH's price drops to 1,700, you're outside your range. Your position stops earning. You now hold 100% of one token and zero fees until the price comes back.
Active LPs need to monitor and adjust their ranges regularly.
If you're swapping USDC for USDT, both are worth $1. You don't need a curve that assumes the price could go to $10,000. That model wastes liquidity and creates unnecessary slippage.
Curve Finance solved this with the stable swap curve. It's a hybrid formula that:
Stays nearly flat when both assets trade close to their peg
Applies tighter slippage on small trades between similar-value assets
Falls back to a curve-like shape if one asset loses its peg dramatically
A CLMM (Concentrated Liquidity Market Maker) is the architecture built on Uniswap V3's ideas.
Protocols like Orca on Solana and Raydium also use this model. The pool divides into discrete price ticks. Each tick is a specific price level. LPs deposit between two ticks, and the pool activates only the liquidity sitting in the current tick when a trade executes.
CLMMs earn LPs more fees. They also carry higher impermanent loss risk for anyone who picks a bad range.
They're more powerful and more demanding. Know that before you use one.
Centralized exchanges like Binance use order books.
Buyers post bids. Sellers post asks. A matching engine pairs them.
Price discovery comes from thousands of participants in real time.
Order books have real advantages:
Large trades execute with low slippage in liquid markets
You can place limit orders and stop-losses
Professional market makers manage risk actively
Without AMMs, there's no DeFi as we know it.
AMMs let any new token launch instantly. A project creates a liquidity pool, deposits tokens, and trading begins. No exchange listing. No gatekeepers. No fees to a centralized entity.
They also serve as building blocks for other protocols:
Lending platforms pull prices from AMM pools
Yield optimizers shift capital between pools automatically
Derivatives protocols use AMM logic to build synthetic markets
Don't put money into an AMM pool without knowing these risks.
Smart contract bugs. AMMs are code. Code can have exploits. Even audited protocols have been drained. Only deposit what you can afford to lose entirely.
Oracle manipulation. Some protocols use AMM prices as price feeds. Flash loan attacks have exploited this. Dozens of protocols have lost millions this way.
Token collapse. If one token in your pool crashes to near zero, you end up holding almost all of it. Your impermanent loss becomes very permanent.
Gas fees. On Ethereum mainnet, providing liquidity in a small pool can cost more in gas than you earn in fees. Run the numbers first.
Regulatory uncertainty. DeFi is still viewed as a new concept and governments are still figuring out how to regulate them.
AMMs look simple at first, but they carry more depth than most people expect. You are not just swapping tokens. You are interacting with a system driven by math that runs all the time. That system does not adjust for your mistakes or emotions. This is why understanding how pools, pricing, and risks work matters more than speed. Start small, observe how trades affect price, and learn how liquidity behaves in real time.
Disclaimer
This blog is for educational purposes only and should not be taken as financial advice. Crypto ecosystems are highly volatile, and prices can change quickly without warning.
Always do your own research before investing any money.
Sankalp Narwariya is a dedicated crypto content writer with one year of experience in the digital asset industry. He specializes in creating clear, engaging, and informative content that simplifies complex blockchain concepts for a wide audience. His work covers a range of topics, including cryptocurrency news, market trends, token analysis, and emerging Web3 projects. Sankalp focuses on delivering accurate and well-researched information, helping readers stay updated in the fast-moving crypto space. He has a keen interest in decentralized finance, NFTs, and innovative blockchain solutions, and consistently tracks industry developments to produce timely content. With a strong understanding of SEO practices, he ensures his articles are both reader-friendly and optimized for search visibility.