Book a free call

How Much Does It Cost to Use an AMM?

Using an AMM costs more than the swap fee: pool fees, gas, slippage and price impact all add up. Here is what each part costs and how to estimate the total first.

Hertiv engineering teamReviewed by a senior engineer
8 min read
How Much Does It Cost to Use an AMM?
On this page

Short answer

An AMM charges a pool fee on every swap, usually between 0.05% and 1% of the trade, plus the network gas fee for the transaction. On top of that you pay slippage and price impact when your trade moves the pool price, so the true cost of a $5,000 swap is often $15 to $50 rather than just the fee shown.

What does using an AMM cost?

An automated market maker (AMM) is a smart contract that prices trades from the tokens held in a liquidity pool instead of matching buyers with sellers. When you swap on an AMM, you trade against that pool, and the price you get comes from a formula based on how much of each token the pool holds.

The cost of a swap has four parts, and only the first one is shown as a fee. The pool takes a percentage of the trade. The network charges gas to run the transaction. Your trade can move the price while it executes, which is slippage and price impact. And if you supply liquidity instead of swapping, you face impermanent loss.

Cost part Who charges it Typical size When you pay it
Pool fee Liquidity providers 0.05% to 1% of the trade Every swap
Network gas Network validators A few cents to tens of dollars Every transaction
Slippage and price impact The market, via the pool Near zero to several percent Large trades, thin pools
Impermanent loss Price moves against providers Varies with price change Only for liquidity providers

Most people only look at the pool fee, so they are surprised when the amount they receive is lower than expected. The rest of this article prices each part in turn, so you can estimate the full cost before you confirm a swap.

What is the pool fee, and who sets it?

The pool fee is a percentage of the trade that goes to the people who supplied the tokens in the pool. On the best-known AMMs it is usually 0.05%, 0.3% or 1%, and the pool creator picks the tier when the pool is set up. Stable pairs use the lowest tier, because their prices barely move, while volatile pairs use higher tiers to pay providers for the extra risk.

A 0.3% fee on a $5,000 swap is $15, which goes to the liquidity providers in proportion to their share of the pool. That fee is taken from the trade itself, so you receive tokens worth $15 less than the quoted price, before any other cost. Some AMMs let governance change the fee or take a cut of it for the protocol, but the fee you pay as a trader stays within the same range.

The pool fee is the most predictable part of the cost, because it is a fixed percentage you can read before you trade. If two pools hold the same pair, the one with the lower fee is cheaper on this part, but it may be thinner, which can make slippage worse. Compare the total, not the fee alone.

What does gas add to the cost?

Gas is the fee the network charges to run your transaction, and it has nothing to do with the pool. A swap is a smart contract call, so it costs more gas than a simple transfer, and the price of gas rises and falls with how busy the network is. On a quiet network the gas for a swap can be under a dollar, while on a busy mainnet it can reach tens of dollars.

Gas matters most for small trades. A $10 gas fee on a $100 swap is 10% of the trade, which makes the swap a bad deal whatever the pool fee is. The same $10 on a $50,000 swap is a rounding error. This is why small swaps are usually done on low-fee networks, where gas is a fraction of a cent, rather than on the mainnet.

You can cut gas costs by trading when the network is quiet, by using a low-fee chain, or by grouping trades instead of making many small ones. Some wallets show an estimated gas cost before you confirm, and that estimate is worth checking, because a failed transaction still costs gas. If your trade fails, you pay the gas and receive nothing.

What are slippage and price impact?

Slippage is the gap between the price you were quoted and the price you actually get, and price impact is the part of that gap caused by your own trade moving the pool. An AMM prices trades from the ratio of tokens in the pool, so a large buy removes tokens and pushes the price up as the trade executes.

The bigger your trade is relative to the pool, the more the price moves against you.

A $1,000 trade in a pool holding $10 million of tokens moves the price by a tiny fraction, so slippage is close to zero. The same $1,000 in a pool holding $20,000 of tokens can move the price by several percent. Thin pools are the main reason a trade costs far more than the fee suggests, and new or small tokens usually sit in thin pools.

Most trading screens let you set a slippage tolerance, which is the largest price move you will accept before the trade is cancelled. A tight tolerance protects you from a bad price but can make the trade fail when the market is moving fast. A loose tolerance lets the trade through but can leave you with far fewer tokens than expected. Check the minimum you will receive, not just the quoted price.

What is impermanent loss, and who pays it?

Impermanent loss is the cost paid by liquidity providers, not by swappers. When you put two tokens into a pool, the AMM rebalances your share as prices move, selling the token that rises and buying the one that falls. If you had simply held both tokens, you would often end up with more value than the pool gives back, and that gap is the impermanent loss.

The loss grows with how far the price moves. A small price change costs a provider very little, while a token that doubles or halves can leave a provider noticeably worse off than holding. The pool fees the provider earns are meant to cover this gap, and in busy pools they often do, but in quiet pools the fees may not be enough.

Impermanent loss is called impermanent because it disappears if the price returns to where it started before the provider withdraws. In practice prices rarely return exactly, so providers should treat it as a real cost. If you only swap and never provide liquidity, this cost does not apply to you at all.

How do you estimate the total cost before you swap?

You can estimate the full cost of a swap in five steps before you confirm anything. The trading screen shows most of the numbers, so the work is reading them together instead of looking at the fee alone.

  1. Read the pool fee. Note the fee tier of the pool, such as 0.05%, 0.3% or 1%, and multiply it by your trade size.
  2. Check the gas estimate. Your wallet shows the gas cost for the transaction. Add it to the fee, and check whether the trade is still worth it at your size.
  3. Look at the minimum received. The screen shows the least you will get after slippage. Compare it with the quoted amount to see the price impact.
  4. Check the pool depth. A pool with far more value than your trade will move the price very little. A thin pool will move it a lot.
  5. Compare routes. Aggregators split a trade across pools and chains. If one route is much cheaper, use it, but check its gas cost too.

If the total cost is more than a few percent of the trade, the swap is probably too expensive for its size. Either trade a larger amount, wait for quieter gas, or use a deeper pool. For background on how AMMs price trades, see what is an AMM.

For the wider costs of using DeFi, see how much DeFi costs to use.

Example (hypothetical): one $5,000 swap, priced in full

Example (hypothetical): a trader wants to swap $5,000 of one stablecoin for another token in a pool with a 0.3% fee. The quoted price looks good, so the trader checks the full cost before confirming.

The pool fee is 0.3% of $5,000, which is $15. The wallet estimates gas at $2 on the network being used. The screen shows a minimum received that is $20 below the quoted amount, which is the slippage and price impact on this trade. The total cost is $15 plus $2 plus $20, which is $37, or about 0.74% of the trade.

The same trade in a thinner pool would look different. If the minimum received were $120 below the quote, the total would be $137, or about 2.7% of the trade, and the trader would be better off splitting the trade or finding a deeper pool. The fee alone never tells the whole story.

What are the common mistakes?

The most common AMM cost mistakes are ignoring gas on small trades, trading in thin pools, and setting a slippage tolerance without reading it. Each one turns a cheap-looking swap into an expensive one.

  • Swapping small amounts on a busy network. Gas can exceed the value of the trade, so small swaps belong on low-fee networks.
  • Ignoring the minimum received. The quoted price is not what you get. The minimum received is the number that matters.
  • Trading in a thin pool. A small pool moves the price a lot, so a trade that looks cheap can cost several percent.
  • Providing liquidity without counting impermanent loss. Fees do not always cover the loss, especially in quiet pools.
  • Forgetting failed transactions cost gas. A trade that fails still charges gas, so check the estimate first.

If you are building the product rather than trading on it, a partner for DEX development can design the pool and fee structure.

DeFi development covers the wider protocol around it.

Key takeaways

  • Pool fees are usually 0.05% to 1%, but they are only one part of the cost
  • Gas matters most for small trades, and it is charged even if the trade fails
  • Slippage grows when your trade is large relative to the pool
  • Impermanent loss is a provider cost, not a swapper cost
  • The minimum received, not the quoted price, is the number to check

Frequently asked questions

What is the cheapest AMM fee tier?

The lowest tier is usually 0.05%, used for stable pairs whose prices barely move. Volatile pairs use 0.3% or 1% to pay providers for the extra risk. The tier is set when the pool is created, so check it before you trade.

How much gas does an AMM swap cost?

It depends on the network and how busy it is. On low-fee networks it can be a fraction of a cent, while on a busy mainnet it can reach tens of dollars. Your wallet shows an estimate before you confirm.

Why did I receive fewer tokens than quoted?

Your trade moved the pool price while it executed, which is price impact, and the market may have moved at the same time, which is slippage. The minimum received figure on the trading screen shows the worst case you accepted.

Does impermanent loss affect swappers?

No. Impermanent loss only affects liquidity providers, who hold a share of the pool while prices move. If you only swap tokens and never supply liquidity, you never face it.

Can I avoid slippage completely?

No, but you can reduce it. Trade in deep pools, keep your trade small relative to the pool, and set a tight slippage tolerance so the trade cancels instead of executing at a bad price.

Is it cheaper to swap on a low-fee chain?

Usually yes for small and medium trades, because gas is the largest cost at that size. For very large trades the pool depth matters more than gas, so compare the total cost on each route.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: blockchain systems in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Building a DEX or a DeFi product and need the fee design right? Talk to Hertiv.

A senior engineer replies within one business day. Or see our DeFi Development service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to [email protected].

Prefer email? Write to [email protected]
Estimate costBook a call