Go Back
Learn

What Is an Automated Market Maker (AMM) & How Does it Work?

Learn what automated market makers (AMMs) are, how they work and how you can use them to seamlessly trade tokens without the need for an intermediary.
What Is an Automated Market Maker (AMM) & How Does it Work?

Automated market makers play an integral role in DeFi because they enable seamless, intermediate-free token trading for anyone with a crypto wallet and an internet connection.  

In this guide, we’ll take you through what AMMs are, how they work, what different types you can expect to run into and how you can use Magic Eden to swap tokens across different chains.

TL;DR

  • Automated Market Makers (AMMs) are decentralized trading protocols that let you trade tokens without the need for a centralized intermediary (like a crypto exchange) by using liquidity pools, instead of matching buyers and sellers via order books.
  • AMMs operate using smart contracts and pricing algorithms to determine token prices based on the ratio of the tokens in the trading pool.
  • Liquidity providers, entities that provide assets to liquidity pools, earn fees from trades.

What Is an Automated Market Maker (AMM)?

An automated market maker (AMM) is a decentralized trading mechanism that relies on liquidity pools to facilitate trades, instead of having to match buyers with sellers via an order book. 

In an AMM, participants provide liquidity by depositing crypto in a pool. Buyers who want to buy a token will draw from this pool, and sellers will sell into it. Liquidity providers, entities that provide the assets in the pool, get a percentage of the trading fee in return. 

As a seller, you don’t have to wait for a buyer to match your order like you would in a traditional order book-based exchange, while avoiding a centralized intermediary holding onto your funds.

How Does an Automated Market Maker Work?

While we’ve outlined the very basic way in which AMMs work, there are three key factors that they rely on to function properly: liquidity pools, pricing algorithms and smart contracts.

Liquidity Pools 

Liquidity pools are the most obvious part of the process: they usually consist of a collection of tradeable tokens that are used to facilitate trades. In return for contributing assets to the pool you receive a portion of trading fees. The trading fees you earn is proportional to the amount of funds you lock into the pool.An important characteristic of liquidity pools is that they are decentralized. Traditional order books rely on a centralized intermediary, opening a new surface for attacks or malicious behavior.

In contrast, liquidity pools are made up of many participants and none of them have access to any tokens besides their own.

Pricing Algorithm 

The pricing algorithm adjusts the prices of tokens for trades made using AMMs based on the ratio of the token in a pool. It’s a mathematical formula that can be tweaked depending on the needs of the AMM.

Typically, price is determined by supply and demand principles. When a buyer purchases token a with token b in the pool, the amount of token a decreases while the amount of token b increases. The price adjusts, pushing the value of token a up while decreasing the price of token b.

if one token from the pool is sold and the other stays the same, then the price of the one with less supply will increase. The more there is of one token, the lower its price will be. The pricing algorithm serves to keep the amount of tokens balanced and proportional.

Smart Contracts

Smart contracts are the basis on which AMMs run: they determine the tokens that a pool will accept, the amount of each token that needs to be locked in, and streamline the pricing algorithm.

The automation part contributes to decentralization and security. Instead of giving one centralized entity the power to decide which smart contracts will run and how they will work, they are written, audited and then automated to serve the AMM.

What Are the Different Types of AMM Models?

While all AMMs work the same way in broad strokes, there are some differences among models that might determine how much you’ll need to pay or how much you’ll receive when using one of these.

  • Constant Product Market Maker (CPMM): A CPMM relies on the model described above: when the amount of token X increases, its price on that pool decreases; on the other hand, the price of token Y increases when there is comparatively less Y than X. The mathematical formula would be x*y=k, where k is a constant.

  • Constant Sum Market Maker (CSMM): A CSMM actually relies on the sum of tokens X and Y to always stay the same, so when the amount of token X increases, the amount of token Y must decrease to keep the same sum. This mathematical formula is x+y=k, and k is again a constant.

  • Constant Mean Market Maker (CMMM): A CMMM will have more than two tokens and it relies on the geometric mean of each token. This means its mathematical formula (for a pool with three assets) would be (x*y*z)^(⅓)=k.

How Do AMMs Differ From Traditional Exchanges?

There are some key differences between AMMs and traditional exchanges that necessitated the existence of AMMs in the first place.

Benefits and Drawbacks of Using AMMs 

AMMs have their share of pros and cons. Here, we’ll walk you through both.

Pros

  • Yield potential: Liquidity providers generate yield by locking their tokens into AMM liquidity pools.
  • Decentralized: No intermediary means there is no single point of failure.
  • Privacy: By using AMMs, you can improve your privacy.

Cons

  • Impermanent loss: Liquidity providers may be affected by the price of tokens in the pool significantly changing, especially in volatile markets.
  • Price slippage: A large trade may shift the price of tokens within a pool, changing the price noticeably, which can especially affect you in lower liquidity pools.

How to Start Trading Tokens with Magic Eden Swap, Step-by-Step

Magic Eden Swaps let you trade tokens quickly, easily and with low fees. Underneath the hood, it maintains a decentralized, non-custodial approach by taking advantage of Automatic Market Makers.

Here’s you can leverage AMMs to cross-chain trade tokens: 

1. Connect your wallet

To start trading, connect your Magic Eden Wallet or another wallet to the marketplace by clicking the Login button in the top right corner of your screen. 

Confirm that you want to connect by following the steps prompted by the wallet.

2. Go to the swap feature

Then, find Swaps. A direct link is located in the top left, right next to the search bar. Here, you’ll be shown the basic swap screen, and under the arrows, you can find a list of different chains you can swap from and to, plus tokens on those chains. 

Magic Eden makes it possible to swap cross-chain, so you’re not stuck with tokens on a single chain.

3. Find your crypto token

Click on the name of any token to bring up a list of alternatives. Make sure you’re choosing the correct chain – some tokens are available on more than one chain.

4. Fill in your swap details

Once you’re happy with your choice, enter the amount you want to swap. 

You can either enter the amount of tokens or their US dollar value just underneath it. The appropriate amount in the target token will autofill, showing you how much you’re getting in return.

5. Swap your tokens

Give it another look to make sure everything is in order, then click on Swap Now. 

You’ll be shown the amount you’re getting, plus the fee you’re paying. It will take a few minutes, but once the new tokens show up in your wallet, the swapping process is complete.

Access Magic Eden to Trade Tokens Across Chains

If you’re looking for a place where you can trade tokens across different chains and explore NFTs, Magic Eden’s got your back.

Connect your wallet to Magic Eden to start swapping tokens across different chains.

FAQs

What is an example of an automated market maker?

There are many different examples of automated market makers, but some of the best-known ones include Uniswap, Curve and Balancer. However, many platforms nowadays include a wide variety of AMMs. For example, Magic Eden is also taking advantage of AMMs.

What are the benefits of AMM?

AMMs are more decentralized, decreasing the risk of a single point of failure and can generate yield for liquidity providers. They’re a great way of evading centralized exchanges and improving your privacy. They’re also becoming increasingly easy to use, even for complete beginners.

What role do AMMs play in the future of decentralized finance?

AMMs are a key element in the future of decentralized finance as they help decrease reliance on centralized parties when matching buyers and sellers directly. As AMMs evolve and become more user-friendly, they attract even more capital, helping the whole DeFi ecosystem grow. In turn, this helps improve your trading experience on AMMs with higher liquidity, better prices and potentially lower fees.

What is the source of yield within an automated market maker (AMM)?

For most AMMs, the source of yield comes from the transaction fees paid by the traders using the pools. Liquidity providers will get a fee percentage that correlates with the amount they’ve locked into the pool. Some AMMs also offer LP tokens to liquidity providers than can be deposited in yield farms to earn additional rewards. 

The information provided on this website is provided for general educational purposes only and is in no way financial or investment advice. Certain information may have also been provided to us or prepared by third parties; these materials are provided for convenience and are not an endorsement by Magic Eden. Magic Eden is not liable for any errors, changes or amendments to such information, including any actions taken in reliance on such information.

See more

Top 10 NFT Use Cases Beyond Crypto Art

Top 10 NFT Use Cases Beyond Crypto Art

Discover ten exciting NFT use cases beyond digital art–including gaming, real estate, music and loyalty programs–that are reshaping industries with blockchain.
No items found.
May 29, 2025
NFT Gaming: A Complete Guide to NFTs in P2E Games

NFT Gaming: A Complete Guide to NFTs in P2E Games

Learn how NFT gaming and Play-to-Earn (P2E) work, what makes top NFT games like Illuvium and Axie Infinity stand out and how to get started with Magic Eden.
No items found.
May 27, 2025
What Are the Most Expensive NFTs Ever?

What Are the Most Expensive NFTs Ever?

Explore the top ten most expensive NFTs ever sold–from Beeple to CryptoPunks–and discover how NFT-powered digital art reshaped value, ownership and culture.
No items found.
May 27, 2025