Fundamentals: What is an automated market maker (AMM)?

A brief introduction to automated market makers.

Published on
April 19, 2023
Learn & Build
Fundamentals: What is an automated market maker (AMM)?

Automated market makers (AMMs) are a type of algorithm built on blockchain technology that automates the process of executing trades on decentralized exchanges. AMMs are an essential aspect of the growing decentralized finance ecosystem and are an innovation that reflects the core ideals of crypto. Because AMMs are built on blockchains and utilize smart contracts, trades can be conducted at any time, in a permissionless way, and for much lower fees than on a traditional exchange. When someone wants to buy or sell an asset on a decentralized exchange, they simply submit the trade to the smart contract and it’ll be automatically executed at whatever the current market price is.

How do AMMs work?

On a traditional exchange platform, buyers and sellers offer up different prices for an asset, and those orders are matched with each other based on that exchange's order book, a model called the central limit order book model.

AMMs are markedly different. Traditional exchanges rely on liquidity from their own reserves or from an individual market maker to execute orders. AMMs instead rely on liquidity that is sourced from other users and pooled together, a concept called a liquidity pool. In liquidity pools, liquidity providers  “lock” equal amounts of two or more tokens into a smart contract to be used as liquidity for trades from other users. AMMs have become the primary way to trade tokens across the DeFi ecosystem, and many use a formula called “constant product market maker” to keep the prices of tokens traded in liquidity pools constant.

Anyone can join a liquidity pool – all you need is a self-custody wallet and possession of any compatible tokens. Users are incentivized to lock their tokens in liquidity pools by getting paid out a share of the trading fees generated by that tool, proportional to how much they’ve contributed.

The most popular example of an AMM is Uniswap, a decentralized exchange built on Ethereum. Using Uniswap, users have more than 1,500 ERC-20 trading pairs to choose from and there is currently more than $3.45 billion locked in liquidity pools by users. Since its launch in 2018, Uniswap has cleared more than $1.2 trillion in trade volume across more than 125 million trades. Other AMMs include Curve and Balancer.

What are the advantages of AMMs?

Decentralized trading: Since AMMs are a blockchain based innovation, they enable decentralized and trustless trading that doesn’t require an intermediary. There’s no requirement to sign up, divulge sensitive information, or trust a third party with your funds when using AMMs. All you need is a self-custody wallet.

Access to more liquidity: AMMs allow traders easy access to a number of trading pairs that aren’t available on traditional exchanges, as well as liquidity pools that allow trading of multiple assets at a time, which allows for more complex trading strategies.

Lower fees: Centralized exchanges charge high fees to use their platforms because that is their primary revenue stream. AMMs, however, charge miniscule fees in comparison, which makes trading more efficient. Uniswap charges just a 0.3% fee per trade.

Automatic pricing: Since the prices of assets traded with AMMs is set algorithmically, this eliminates some of the pricing risks associated with centralized exchanges, like frontrunning asset releases.

More flexibility: Since AMMs are built on open source code, they can be implemented into a variety of different DeFi protocols, including lending and borrowing.

Tap into 100+ AMMs with Swap API

One integration with 0x unlocks thousands of tokens on the most popular blockchains and aggregated liquidity from 100+ AMMs and private market makers. Learn how you can leverage Swap API to access deep liquidity without the infrastructure overhead.