What’s an Automated Market Maker?
|— In cryptocurrency trading, there are a couple of different types of exchanges, namely centralized and decentralized.|
— Among the decentralized exchanges, there are two main operating systems – order books and automated market makers, otherwise known as an AMM.
— Instead of searching for trading partners among its users, AMMs bypass this and build up their own liquidity, via smart contracts, to satisfy trader demands.
— What’s an automated market maker? Here, we explain in full.
You’re likely to read about AMMs a lot if you’re learning the ins and outs of DeFi; but what on earth is an automated market maker anyway? Here, we explain in under five minutes.
Decentralized finance (DeFi) has given the world a new, exciting way to look at money and trading. As it evolves, DeFi brings with it new ideas, concepts, and solutions. New terms and topics are popping up constantly and some are worth understanding a little more about. An Automated Market Maker (AMM) is an important term that we’re seeing become more prevalent in cryptocurrency trading. But what is an AMM and why do you need to know about it? Let’s find out!
Automated Market Makers in 30 Words
An AMM is the underlying protocol that powers some types of decentralized exchange (DExs). Basically, an AMM system creates a marketplace digitally, by generating algorithmically controlled liquidity pools to facilitate trades for users.
Before we look at AMMs in more detail, let’s take a quick look at the traditional method of managing an exchange, known as an order book system, and how it functions.
What are Order Book Exchanges?
On traditional exchanges – and earlier iterations of crypto exchange – traders recorded their offers into a central log (order book) and then offers on that log were matched with each other, according to best fit.
So if Joe wants to buy 0.25 BTC for an amount of Ethereum, and Jane wants to sell 0.25 BTC for an equal amount of BTC, the exchange will match Joe and Jane seamlessly.
The order book, which is essentially an electronic list, identifies the buy and sell orders to match trades. One perk of an order book is that it is a record of ongoing trading activity and it allows traders to see the best and most accurate prices available for their trades, since users are constantly responding to changes in the market in order to get themselves the best deal.
The Limitation of Order Book Systems
But order books-based exchanges also have some drawbacks.
First, the liquidity of the system is determined by how many people want to trade at a given moment – and what asset they are trading. So, say I wanted to use my ETH to purchase one of the rarer tokens – for an order book system to be of use to me, there would need to be someone looking to sell that rare crypto for ETH. And even then, we’d still need to agree on price before the trade could take place.
Order books also leave room for market manipulation, precisely because the previous activity on the exchange is recorded and displayed. Traders look for clues from the order books to decide whether to buy or sell, which means big traders with the means to impact the market for their own gain can manipulate pricing through positive or negative false sentiment.
In contrast, AMMs work to enhance decentralization (yes, as the name implies) improve liquidity and reduce manipulation in the industry. They do this by replacing the order book system (or sometimes enhancing it) with liquidity pools.
We briefly defined what an AMM is (the underlying protocol to power a decentralized exchange) but here’s how they work and why they’re important to the world of crypto.
Automated Market Makers Explained
To allow trades, an AMM replaces the order book and matching systems with a liquidity pool that is managed and controlled by an algorithm. So how does that work?
Instead of using traders to provide liquidity to traders, AMMs have two distinct groups benefitting from their platform: people looking to trade, and people looking to provide liquidity in exchange for rewards.
The AMM needs liquidity to perform trades, and that liquidity is provided by users like you and me. So the exchange offers incentives to anyone willing to lock their coins and tokens into its liquiidty pool.
Say you have some spare tokens in your wallet and you intend to HODL: instead of leaving them inactive, you could contribute them to an AMM liquidity pool (this makes you a liquidity provider, or LP) for which you’ll be rewarded by the exchange. This scenario is similar to depositing money at the bank and collecting interest.
Trading With The Algorithm
Now what about the traders? With no order book, who are they trading with? The answer is: nobody. Exchanges are made directly with the protocol itself. The protocol sets the price of the trading pairs and executes all trades using smart contracts. So even if you want to buy some ETH and I want to sell it – and we are both using the same exchange – you and I will never trade with one another. Instead, we will both trade with the exchange and benefit from each other’s coins indirectly through the liquidity pool.
To unpack that a bit, order books make use of a trading system that’s peer-to-peer, whereas AMMs are peer (liquidity provider) to contract (the liquidity pool) to peer (the user who just actioned the exchange).
The benefit of this type of system is that, in theory, the exchange and its users will enjoy greater control. For the exchange, it will always have a ready-to-go reservoir of liquidity, and isn’t relying on trade matches supplied by its users.
For traders, they can trade with more speed and transparency, because the liquidity pool is always available with a fixed trading price.
In a sense, AMMs are sort of like a vending machine for tokens; they’re always on and they’ll always give you tokens – but you might not get them at the price you want.
An AMM is a market of its own
Because of the way it operates, an AMM basically functions as its own ecosystem.
Price dynamics for crypto coins are set by the algorithm, and that algorithm is tasked with maintaining the correct balance between “pairs” of coins. Because the central dynamic is maintaining that value balance, the pricing of coins within an AMM does not conform with the wider crypto ecosystem. This means that traders can use the different prices across AMMs and exchanges for arbitrage trading. (If one DEx has a coin at a lower price, a trader can buy it and then sell it for a higher price in another market or on another platform.)
The limitations of AMMs
While DExs solve some of the existing problems in the space, there are some issues that persist in the solution.
Mercenary Liquidity Means Volatility
It’s a dog eat dog world in DEX-land, with every user clamouring for the best deal on their much sought after liquidity! And why not? A central theme of DeFi is everyone getting a reward for what they contribute to the system.
One of the main limitations worth noting is the circular conundrum that AMMs face in order to survive. An AMM needs to have liquidity, otherwise it will suffer from low trading volume. Low trading volume means poor rewards for LPs which, ironically, means they will take their liquidity and go to another AMM where the rewards are better.
This hunt for rewards, and the instability it produces within the AMM ecosystem, is known as mercenary liquidity (DeFi 2 is all about solving this problem).
Pulling Coins Leads to Impermanent Loss
An LP might withdraw their funding from an AMM when its rebalancing (if other LPs have withdrawn recently), which might mean they get less than the market value for the coins (because of the difference in price the AMM might have compared to other exchanges in the market).
This loss is known as “impermanent” because the value will likely rebalance over time – but since it places a limitation on when LPs can withdraw their funds from the liquidity pool of an AMM, it’s something to be considered
The Contribution of AMMs to the Industry
As we covered earlier, an automated market maker is just another variety of decentralized exchange designed to resolve some of the issues faced by its predecessors. So in a basic sense, AMMs benefit all users of DeFi by expanding the array of options available, while remaining true to the objective of decentralization.
Yet AMMs come with their own issues and limitations that the constantly churning DeFi industry is now working hard to overcome – nice job, DeFi 2.0!
For now though, the automated market maker provides another way for regular people to trade their coins without sharing information with a central platform, while offering rewards to the users like you and me who keep the whole thing turning. So go forth and get to grips with DeFi’s latest step forward in decentralization – you have everything you need.
Knowledge is Power!
Trust yourself and keep on learning! If you’re learning the ins and outs of DeFi, wmart contracts are a non-negotiable part of that package. So dive in to our School of Block episode all about the building blocks of DeFi.