AMM Slippage Calculator
How AMM Slippage Works
Enter your trade details to see how much price impact your swap will have on AMM platforms like Uniswap or Curve. The calculator demonstrates the constant product formula (x*y=k) and shows how pool liquidity affects slippage.
AMM Comparison
Uniswap V2 Constant Product
Slippage increases significantly as trade size grows. For a $10,000 swap, expect 1-2% slippage.
Best for: General token swaps, high volatility pairs
Curve V2 Stablecoin Focus
Slippage stays near zero until pools become imbalanced (0.04% for $10k swaps).
Best for: Stablecoin swaps (USDC-USDT), low volatility pairs
When you swap ETH for USDC on Uniswap, there’s no broker, no order book, no human making a decision. Instead, a simple mathematical formula decides the price - and it updates automatically every time someone trades. This is the power of AMM algorithms. They’re the invisible engines behind most decentralized exchanges today, turning pools of tokens into functioning markets without middlemen.
How AMMs Replace Order Books
Traditional stock or crypto exchanges rely on order books: buyers list prices they’re willing to pay, sellers list prices they want to receive. The exchange matches them. AMMs throw that out. Instead, they use liquidity pools - reserves of two or more tokens locked in a smart contract. When you trade, you’re not buying from another person. You’re buying from the pool itself. The algorithm adjusts the price based on how much of each token is in the pool.Think of it like a vending machine. If you put in a $10 bill for a $2 soda, the machine gives you the soda and keeps $8. But if the machine only has one soda left and ten people want to buy it, the price doesn’t stay at $2. The algorithm raises it - not because someone changed the price, but because the supply is running low. AMMs work the same way.
The Constant Product Formula: Uniswap’s Foundation
The most common AMM formula is the constant product market maker: x * y = k. Here, x and y are the amounts of two tokens in the pool - say, ETH and USDC. The product k is always the same, no matter how many trades happen. When you swap ETH for USDC, the algorithm calculates how much USDC to give you so that x * y still equals k after the trade.Let’s say a pool has 100 ETH and 200,000 USDC. That means k = 20,000,000. If you buy 10 ETH, the algorithm figures out how much USDC must be removed to keep k constant. The math gives you about 36,363 USDC. So your 10 ETH cost you 36,363 USDC - or roughly $3,636 per ETH. That’s the price for that trade. But now the pool has 110 ETH and 163,637 USDC. The price per ETH has gone up because ETH became scarcer in the pool.
This is why large trades on Uniswap V2 cost more: the algorithm forces you to pay a higher price as you drain the pool. A $50,000 ETH buy might cost you 2% more than the market price because the algorithm is protecting the pool’s balance. That’s called slippage.
Why Slippage Isn’t a Bug - It’s a Feature
Slippage sounds bad, but it’s how AMMs prevent liquidity from being wiped out. If a pool had no price adjustment, someone could buy all the ETH for pennies and leave the pool empty. The constant product formula makes big trades expensive, which discourages it. It also creates opportunities for arbitrage traders - people who buy low on one exchange and sell high on another. They help keep AMM prices in line with the rest of the market.But slippage isn’t the same across all AMMs. Curve Finance, for example, specializes in stablecoin swaps like USDC to USDT. These tokens are meant to stay at $1. So Curve uses a hybrid formula that keeps prices almost flat until the pool gets really out of balance. For a $10,000 swap between USDC and USDT, slippage can be as low as 0.04%. That’s 10 to 20 times better than Uniswap V2.
Concentrated Liquidity: Uniswap V3’s Big Leap
In 2021, Uniswap introduced V3 - a game-changer. Instead of spreading liquidity across all possible prices (like V2), liquidity providers can now choose a price range. Say you think ETH will trade between $3,000 and $4,000. You put all your ETH and USDC only in that range. The algorithm treats your pool like a mini Uniswap V2 - but only within your range.This makes your capital 1,000 to 4,000 times more efficient. You earn way more fees because your liquidity is active where most trading happens. But there’s a catch: if ETH drops below $3,000, your entire ETH position turns into USDC. If it spikes above $4,000, your USDC turns into ETH. You’re still exposed to price swings - and if you pick the wrong range, you could lose money faster than with V2.
Many liquidity providers use tools like Gamma.xyz to track their positions in real time. One user on the Bankless podcast reported their yield jumped from 12% to 45% after switching to V3 - but then lost everything when ETH crashed outside their range during the GBTC volatility in January 2023.
Other AMM Models and Their Trade-offs
Not all AMMs use x * y = k. Balancer lets you create pools with up to eight tokens and set custom weights - like 80% ETH and 20% DAI. That’s great for portfolio management, but slippage is higher than Uniswap for the same amount of liquidity.Curve’s V2, released in 2022, added dynamic fees. When volatility spikes, the protocol automatically increases trading fees from 0.04% to 0.4%. During the March 2023 banking crisis, this boosted revenue by 300%. It also uses EMA oracles to detect when stablecoins start drifting from $1 - a feature that helped it survive the UST depeg in May 2022, even though slippage briefly spiked to 1.8%.
Then there’s the constant sum model (x + y = k), used by early Bancor. It offers zero slippage - but only until the price moves. If ETH rises from $2,000 to $3,000, the pool can’t adjust. It becomes useless. That’s why no major DEX uses it anymore.
The Hidden Costs: Impermanent Loss and MEV
If you provide liquidity, you’re not just earning fees. You’re also exposed to impermanent loss. This happens when the price of one token in the pair changes compared to the other. Say you deposit 1 ETH and 2,000 USDC into a pool. If ETH doubles to $4,000, the algorithm rebalances your pool to keep x * y = k. You end up with less ETH than you started with - and the value of your share is lower than if you’d just held the tokens. Studies show 68% of liquidity providers lose over 15% during 30% price swings.There’s also MEV - Maximal Extractable Value. Arbitrage bots scan the mempool for large trades and front-run them, buying the token just before you and selling it right after. They pocket 0.15% to 0.35% of every big trade. That’s $1.2 billion a year taken from users, according to EigenPhi. Tools like Flashbots are trying to fix this, but it’s still a major pain point.
What’s Next for AMMs?
Uniswap V4, proposed in May 2023, introduces “hooks” - customizable code that lets developers build new pricing curves. One project, Ambient Finance, is testing a model that offers concentrated liquidity across the entire price range without fixed boundaries - achieving 97% capital efficiency.Another innovation is TWAMM (Time-Weighted AMM). Instead of executing a $1 million trade all at once, it splits it into hundreds of tiny trades over 30 minutes. This cuts slippage by 60-75%. The Ethereum Foundation is testing it now.
Curve V2’s dynamic fee system and SyncSwap’s adaptive curves are pushing slippage down to 0.015% on stablecoin pairs. These aren’t just upgrades - they’re redefining what’s possible in decentralized trading.
Are AMMs the Future?
AMMs now handle over $1.2 trillion in annual trading volume - 83% of all DEX activity. Uniswap alone processes over 1.2 million trades a day. Total value locked in AMM protocols hit $58.7 billion in September 2023. They’re not going away.But they’re evolving. The future isn’t one formula. It’s a mix: concentrated liquidity for volatility, curve-based pricing for stability, dynamic fees for resilience. Regulators are watching. The SEC sent Uniswap a Wells notice in February 2023, questioning if AMMs count as unregistered exchanges. Circle now uses Curve’s StableSwap for its cross-chain USDC transfers.
AMMs don’t need humans to set prices. They just need math, liquidity, and time. And as long as people want to trade crypto without intermediaries, they’ll keep getting smarter.
How do AMMs determine the price of a token?
AMMs use mathematical formulas called conservation functions to set prices based on the ratio of tokens in a liquidity pool. For example, Uniswap uses the formula x * y = k, where x and y are the amounts of two tokens. When a trade happens, the algorithm adjusts the quantities so that the product k stays constant. The price is derived from the new ratio - if you buy more of one token, its price rises because it becomes scarcer in the pool.
Why is slippage higher on Uniswap than on Curve?
Uniswap uses the constant product formula (x * y = k), which causes prices to rise sharply as you trade larger amounts. Curve uses a hybrid model designed for stablecoins that keeps prices nearly flat until the pool is heavily imbalanced. This lets Curve handle $10,000 swaps with only 0.04% slippage, while Uniswap might see 1-2% slippage for the same trade.
What is impermanent loss and how does it affect liquidity providers?
Impermanent loss occurs when the price of one token in a liquidity pool changes compared to the other. The AMM automatically rebalances your holdings to maintain the pool’s ratio, which can leave you with fewer tokens than if you’d held them outside the pool. For example, if ETH doubles in price, you’ll end up with less ETH than you deposited. This loss is called "impermanent" because it reverses if the price returns to its original level - but if you withdraw while the price is off, the loss becomes permanent.
Can AMMs be hacked or manipulated?
Yes. AMMs rely on smart contracts and price oracles. If the contract has a bug - like Harvest Finance did in 2020 - attackers can drain funds. If the oracle feeds false prices, the AMM can misprice assets. Front-running bots also exploit large trades by executing ahead of them. While the core AMM formulas are mathematically sound, their implementation and integration with other systems create vulnerabilities.
Why do some AMMs use multiple tokens in one pool?
Multi-token pools, like those on Balancer, let users create custom portfolios - for example, 50% ETH, 30% LINK, 20% DAI. This allows for more flexible exposure and hedging. The geometric mean formula (Π(r_i^w_i)) ensures the pool stays balanced based on assigned weights. However, these pools are harder to manage and often have higher slippage than two-token pools.
Are AMMs regulated by financial authorities?
Regulators are increasingly scrutinizing AMMs. The U.S. SEC sent a Wells notice to Uniswap Labs in February 2023, suggesting the protocol may function as an unregistered exchange. Because AMMs automatically match trades and set prices without human intervention, they blur the line between a decentralized protocol and a regulated financial platform. Whether they’ll be treated as exchanges, commodities, or something new is still being debated.
How do AMMs compare to centralized exchanges?
Centralized exchanges use order books and have market makers who provide liquidity. They’re faster and have lower slippage for large trades, but require trust in a company. AMMs are trustless and open-source, but suffer from higher slippage on big trades and exposure to impermanent loss. AMMs are better for small, frequent trades and privacy. Centralized exchanges are better for large orders and institutional use.
What’s the difference between Uniswap V2 and V3?
Uniswap V2 spreads liquidity across all possible prices, which is simple but inefficient. V3 lets liquidity providers choose specific price ranges where their capital is active. This boosts capital efficiency by up to 4,000x within those ranges, meaning higher fees. But if the price moves outside the range, the provider stops earning fees and becomes fully exposed to price changes - increasing impermanent loss risk.
Robert Bailey
November 10, 2025 AT 11:46AMMs are wild when you think about it - no middlemen, just math holding everything together. I remember when I first swapped ETH for USDC and got slapped with 3% slippage. Thought I got scammed. Turns out that’s just the system working.