What is an Automated Market Maker (AMM) and how does it work?

Joseph Kim
AlgoBlocks
Published in
3 min readAug 2, 2022

--

Decentralized exchanges have grown massively since 2019, thanks in large part to a core technology called automated market makers (AMMs). This tool has made trading digital assets easier and in an automatic, trustless (sans third parties) way.

In a nutshell, an AMM allows trading crypto and other digital assets without relying on external data.

This article explores what AMMs are and how they work.

What is an automated market maker?

AMMs seek to decentralize and automate market making, which helps to make crypto and the DeFi ecosystem more sustainable. The origins of AMMs can be traced back to Ethereum founder Vitalik Buterin’s blog post about on-chain market makers. But it was only pioneered in the production by Uniswap in 2018.

Today, AMMs are the underlying protocol that powers all decentralized exchanges, allowing users to exchange cryptocurrencies directly and without an intermediary. In simple terms, AMMs are autonomous trading mechanisms that replace traditional market-making techniques that rely on the interaction between buyers and sellers.

How does it work?

Vitalik Buterin proposed a simple mathematical formula, which Uniswap popularized as x * y = k where k is a constant. The formula would become the secret ingredient to creating a constant balance of assets in a liquidity pool.

For example, when trading two volatile assets (BTC and ETH), every time ETH is bought, its price goes up as there will be less ETH in the pool, while the price of BTC goes down as there are now more BTC in the pool. The formula ensures that no matter how volatile the price of the assets being traded is, the pool will always return to a state of balance.

The only time the liquidity pool expands in size is when new liquidity providers join in. Today, AMMs are the primary way to trade assets in the DeFi space. Several innovative AMMs have been developed by different projects like Balancer and Curve, in addition to Uniswap.

Liquidy pool use cases, requirements, and rewards

Liquidity pools are pooled funds locked within a smart contract and form an essential part of the DeFi ecosystem. These reserves of digital assets can be used for exchanges, loans, and other applications. Unlike in traditional finance where liquidity is provided by a central organization such as a stock exchange or bank, anyone can be a liquidity provider in DeFi.

All you need is a stable internet connection and any type of ERC-20 token to supply tokens to an AMM’s liquidity pool. In exchange, liquidity providers could earn a fee for supplying tokens to the pool, paid for by traders who interact with the coin reserve. Additionally, liquidity providers can also earn yield through yield farming. These pools help to facilitate decentralized trading, with the price quoted by AMMs, and minimize the risk of washout.

Iterations of the AMM

There are several variations of the AMM used by different DeFi platforms. Uniswap’s pioneering technology has matured over the years and is now the most popular AMM model on Ethereum. The model allows users to create a liquidity pool with any pair of ERC-20 tokens with a 50/50 ratio.

Balancer is another AMM platform similar to Uniswap but stretches its limits by allowing users to create dynamic liquidity pools. The pools can be injected with up to eight different assets in any ratio, allowing for more flexible trading options.

Curve, on the other hand, is a more complex model wherein liquidity pools include similar assets such as stablecoins. This allows for more efficient trading at the lowest rates, and at the same time solves the problem of limited liquidity.

Automated market makers (AMMs) and their many variations prove to be essential instruments in the continuously evolving DeFi space. They have also made decentralized market making possible, which is the ethos of crypto.

About AlgoBlocks

📹 Demo Video | 🌎 Website | 📎 Whitepaper
📌 Twitter | 🎮 Discord | ✍🏻 Medium |💼 LinkedIn
👥 Telegram Group | 🗣 Telegram Channel

--

--

Joseph Kim
AlgoBlocks

Ex-CEO & Founder of a Draper-backed DeFi smart wallet with 120K users. Sharing insights on crypto, DeFi, and blockchain innovation. Open to new opportunities