Impermanent Loss Calculator
Calculate your potential impermanent loss when providing liquidity to an AMM pool. Enter initial values and simulate price changes to see how your position compares to simply holding the tokens.
Enter values above to see your impermanent loss calculation
x * y = k
The constant product formula used by AMMs like Uniswap to maintain liquidity pool balance
The constant product formula used by AMMs like Uniswap to maintain liquidity pool balance
Imagine trading crypto without needing someone else to buy or sell at the same time you do. No order books. No middlemen. Just you, your wallet, and a smart contract that automatically sets prices. That’s what automated market makers (AMMs) do in DeFi.
How AMMs Work Without Order Books
Traditional exchanges like Coinbase or Binance rely on order books - lists of buy and sell orders matched by price and time. But on blockchains, that’s messy and expensive. Every order needs to be stored and updated on-chain, which costs a lot in gas fees. The Bank for International Settlements pointed out in 2021 that managing on-chain order books would be too costly for decentralized systems. AMMs solve this by replacing order books with liquidity pools. These are smart contracts that hold pairs of tokens - like ETH and USDC - and let users trade directly against them. Instead of waiting for another person to take the other side of your trade, you trade with the pool itself. This is called peer-to-contract (P2C), not peer-to-peer. The most famous formula behind this isx * y = k, used by Uniswap since 2018. Here, x and y are the amounts of two tokens in the pool, and k is a fixed constant. When you swap ETH for USDC, the pool adjusts the ratio so that k stays the same. The more ETH you buy, the more expensive each next ETH becomes. This keeps liquidity flowing and prevents the pool from running out.
Who Provides the Liquidity?
Liquidity isn’t magic - it comes from real people. These are called liquidity providers (LPs). You deposit equal value in two tokens - say, $1,000 in ETH and $1,000 in USDC - into a pool. In return, you get LP tokens that represent your share of the pool. These LP tokens let you:- Withdraw your original deposit plus any trading fees earned
- Vote on fee changes in some protocols
- Bid for temporary fee discounts on chains like the XRP Ledger
Impermanent Loss: The Hidden Risk
If you’ve ever heard someone say “I put ETH and USDC in a pool and lost money,” they’re talking about impermanent loss. This happens when the price of one token in the pair moves sharply compared to the other. Let’s say you deposit 1 ETH and 2,000 USDC when ETH is $2,000. If ETH rises to $4,000, the pool rebalances to keep the productx * y = k constant. You end up with less ETH and more USDC than if you’d just held the tokens. The loss is “impermanent” because if ETH drops back to $2,000, you break even. But if you withdraw while the price is off, the loss becomes real.
Research by Ethereum analyst Dan Robinson in 2019 showed impermanent loss can hit 5-20% during high volatility. That’s why many LPs stick to stablecoin pairs like USDC/USDT - where prices don’t swing much - or use advanced AMMs like Uniswap v3 that let you lock liquidity into narrow price ranges.
From Uniswap v2 to Uniswap v4: How AMMs Evolved
The first AMMs were simple. Uniswap v2 (2020) used the constant product formula for all pairs. But it wasted capital. If you put $10,000 into ETH/USDC, your liquidity was spread across every possible price - even ones no one traded at. Uniswap v3 (2021) changed that. It introduced concentrated liquidity. Now, LPs can choose a price range - say, $1,800 to $2,200 for ETH - and put all their capital there. This makes capital 10x to 4,000x more efficient, according to Uniswap’s own whitepaper. If the price stays in your range, you earn more fees. If it moves out, your liquidity stops earning until it comes back. Then came Curve, optimized for stablecoins. It uses a different formula that keeps prices extremely stable - slippage as low as 0.0001% for swaps between USDC, DAI, and USDT. That’s why big DeFi protocols like Aave and Compound use Curve to move stablecoins without losing value. In June 2024, Uniswap launched v4. It lets developers build custom trading logic using “hooks” - like dynamic fees, time-based pricing, or even integrating with other protocols. This turns AMMs from fixed systems into flexible platforms.Where Are AMMs Used? And Who Runs Them?
Most AMMs still run on Ethereum. As of Q3 2023, over 90% of AMM volume was on Ethereum, according to DeFi Llama. But others have followed:- PancakeSwap on Binance Smart Chain - popular in Asia for low fees
- Raydium on Solana - fast and cheap, great for new tokens
- XRP Ledger - added AMM support in December 2022 with its Amendment 11
- Uniswap: 32.1%
- Curve Finance: 18.7%
- Balancer: 5.2%
- Others: 44%
How to Use an AMM (Step by Step)
If you want to trade or provide liquidity:- Get a wallet - MetaMask is the most common (30 million monthly users as of Q2 2023). Trust Wallet or Coinbase Wallet also work.
- Buy ETH (or the native token of the chain you’re using) to pay for gas.
- Go to a DEX - Uniswap, Curve, or PancakeSwap.
- Connect your wallet - click “Connect Wallet” and approve the connection.
- For trading: Pick the token you want to swap, enter the amount, set slippage tolerance (0.5% for stablecoins, 1-3% for volatile tokens), and confirm.
- For providing liquidity: Select a token pair, deposit equal value, review the pool details, and confirm. You’ll get LP tokens in your wallet.
Regulation and Controversy
AMMs aren’t legal gray areas - they’re legal firestorms. In 2023, the U.S. SEC sued Uniswap Labs, claiming certain tokens listed on the platform are unregistered securities. The case (No. 1:23-cv-04660) is ongoing. Meanwhile, the EU’s MiCA regulation, effective January 2024, classifies AMMs as “crypto asset service providers.” That means they’ll need licenses to operate in Europe. Even economists are divided. Nobel laureate Paul Krugman called AMMs “financial engineering that creates more risk than value for retail participants” in a 2023 New York Times column. Others, like Andre Cronje of Yearn.finance, called them “the most important innovation in DeFi since smart contracts.” Vitalik Buterin believes AMMs will stay essential - but only if they get faster, cheaper, and more efficient. The Bank for International Settlements predicts that by 2026, 45-60% of all DeFi trading will happen through AMMs, down from 78% in 2023. Why? Because hybrid models - mixing AMMs with order books - are starting to emerge.Are AMMs Right for You?
If you’re a trader: AMMs give you 24/7 access to thousands of tokens without KYC. But large trades mean high slippage. A 1 ETH swap on Uniswap v2 might cost you 0.8% in price impact - that’s $16 if ETH is $2,000. On centralized exchanges, that’s nearly zero. If you’re a liquidity provider: You can earn passive income. But you’re exposed to impermanent loss, smart contract bugs, and volatile markets. Start with stablecoin pools. Avoid putting all your money into a new, low-liquidity token pair. If you’re curious: Try swapping $10 worth of ETH for USDC on Uniswap. See how the price moves. Watch the gas fee. That’s the real education. AMMs didn’t just make DeFi possible - they made it normal. You don’t need a broker. You don’t need permission. You just need a wallet and a basic understanding of how prices are set by math, not people.That’s the power of automated market makers.
Tisha Berg
AMMs are wild when you think about it - no middleman, just math holding the whole thing together. I started with $20 in ETH/USDC just to see how it felt, and honestly? It’s like watching a magic trick you can understand.
Really cool for people who don’t trust banks.
Isha Kaur
It’s fascinating how AMMs have reshaped the entire architecture of decentralized finance because they eliminate the need for traditional order matching systems which are inherently inefficient on-chain due to the high computational and storage costs associated with maintaining and updating individual buy and sell orders across a global, permissionless network, and instead, by using liquidity pools governed by mathematical formulas like x*y=k, they create a continuous and automated pricing mechanism that allows for seamless token swaps without requiring counterparty matching, which not only reduces gas overhead but also democratizes access to liquidity for even small participants who might not have the capital to place meaningful limit orders on centralized exchanges, and this shift has enabled a whole new class of financial interactions that were previously impossible in traditional markets where liquidity is siloed and gated by institutional barriers.
Glenn Jones
AMMs are just a glorified Ponzi scheme wrapped in smart contract jargon. Uniswap v4? More like Uniswap v4-oh-no-I-just-lose-my-ETH-again. And don’t even get me started on impermanent loss - it’s just ‘loss’ with a cute name so you feel less dumb for dumping your life savings into a pool where the price moves 10% and you’re left with 30% less than if you’d just HODL’d.
Also, Curve? More like ‘Curve’ as in ‘I’m gonna curveball my portfolio into oblivion.’
And who the hell lets a 22-year-old dev deploy a ‘hook’ that lets anyone change fee structures on the fly? This isn’t finance, it’s a Minecraft server with ETH.
Tara Marshall
AMMs work because they replace order books with liquidity pools using constant product formulas. Fees go to liquidity providers. Impermanent loss is real but manageable with stablecoins or concentrated liquidity. Uniswap v3 improved capital efficiency dramatically. Gas fees vary by network congestion. Always check Etherscan before transacting.
Joe West
Biggest tip for newbies: start with stablecoin pairs like USDC/USDT. You’ll avoid the emotional rollercoaster of impermanent loss while still earning decent fees. And don’t try to be a liquidity provider on some new token with $50k TVL - that’s not yield farming, that’s gambling with your crypto.
Also, MetaMask gas estimates are often wrong. Always check DeFi Saver or Zerion for better fee forecasts.
Richard T
It’s interesting how AMMs shift the power dynamic from market makers to the community. Instead of hedge funds controlling bid-ask spreads, regular people provide liquidity and earn fees. But that also means you’re exposed to risks you might not understand - like smart contract bugs or governance attacks. The real innovation isn’t the math, it’s the permissionless participation. Anyone with a wallet can be part of the market structure. That’s revolutionary.
jonathan dunlow
Let me tell you something - if you’re not using Uniswap v3 right now, you’re leaving money on the table. Concentrated liquidity is a game changer. I put my ETH/USDC pool between $1900 and $2100 and made more in two weeks than I did in three months on v2. Sure, if ETH shoots to $2500, I get pulled out - but guess what? I set alerts, I monitor, I adjust. It’s not passive income, it’s active participation - and that’s what makes DeFi powerful. You’re not just holding, you’re building. And if you’re scared of impermanent loss? Start small. Try $50. See how it feels. Then scale. This isn’t Wall Street - it’s your wallet, your rules.
Mariam Almatrook
One must question the fundamental ethical underpinnings of this so-called ‘financial innovation.’ The democratization of liquidity provision is a seductive myth - in reality, it is a mechanism by which retail participants are incentivized to act as de facto liquidity buffers for high-frequency traders and arbitrage bots, while bearing the brunt of volatility and impermanent loss. The entire architecture is predicated on asymmetrical risk exposure, cloaked in the language of decentralization and empowerment. One cannot help but feel that this is less a revolution and more a sophisticated form of financial extraction dressed in blockchain aesthetics. The Bank for International Settlements’ projection of declining AMM dominance is not merely a technical observation - it is a moral reckoning.
Chris Mitchell
AMMs aren’t magic. They’re math. And math doesn’t care if you’re rich or poor. It just does what it’s told. The real question isn’t how they work - it’s whether you trust math more than people.
rita linda
Let me be clear - this whole AMM thing is just Americans outsourcing risk to the global poor while calling it ‘decentralization.’ You think people in India or Nigeria are earning 15% APY? No. They’re the ones getting front-run, getting rug-pulled, getting stuck with worthless LP tokens while VCs cash out. This isn’t financial inclusion. It’s digital colonialism with a gas fee.
Frank Cronin
Oh wow. Another blogpost masquerading as an educational piece. Let me guess - you also think ‘yield farming’ is a real job and that ‘impermanent loss’ is just a temporary inconvenience like bad weather. Please. If you’re not losing sleep over smart contract vulnerabilities, you’re not paying attention. And don’t even get me started on the SEC lawsuit - they’re not going to sue Uniswap because they care about investors. They’re going to sue because they can’t control it. And you? You’re just the collateral damage in their power play. Congrats on being a useful idiot with a MetaMask.
Nicole Parker
I remember when I first tried swapping tokens and thought the price change was a glitch. Took me weeks to realize it was just the pool adjusting. I felt so dumb. But then I started reading, asking questions, and now I’ve got a small pool in DAI/USDC. It’s not glamorous. I don’t make millions. But I understand it. And that’s more than most people I know who just ‘stack sats’ without knowing why. DeFi isn’t about getting rich quick - it’s about learning how money moves. And honestly? That’s the most valuable thing I’ve ever gained from crypto.
Cristal Consulting
Try it with $10. Just $10. Swap ETH for USDC. Watch the gas. Feel the slippage. That’s your real lesson. No theory. Just experience.
Then come back and tell me if you still think it’s magic.