Automated Market Makers
Automated Market Makers (AMMs) form an important part of the decentralised finance (DeFi) system. AMMs allow users to trade cryptocurrencies through liquidity pools – pots of tokens deposited by liquidity providers (LPs). By doing this, they remove the need to connect buyers and sellers via an order book – reducing slippage, allowing trades to take place 24/7, and removing the need for centralised financial institutions.
This article explains how automated market makers work with a detailed example, before running through their respective benefits and drawbacks. We also list the best automated market maker platforms in 2021.
Automated Market Makers Explained
While definitions may vary, automated market makers essentially allow the automated trading of cryptocurrencies by using an algorithm to determine trade prices. With a traditional market maker of buyers and sellers, for example Binance, trades happen directly between parties using an order book. In contrast, the automated market maker model relies on smart contracts.
On decentralised exchanges where you can trade Ethereum, liquidity can be low due to a scarcity of buyers and sellers. Automated market makers provide liquidity in the DeFi system by using liquidity pools – essentially pots of cryptocurrency supplied by liquidity providers (LPs). LPs earn fees or commission from trades that happen within their pool, allowing almost anyone to become a market maker.
Therefore, unlike traditional trades that require a counterparty, AMMs interact through a smart contract. This means digital assets can be traded 24/7 with the exchange price determined by the AMM protocol’s software.
Example of an Automated Market Maker Trade
A typical automated market maker trade is the exchange of a specific cryptocurrency pair via an AMM platform such as Uniswap, Kyber Network, or PancakeSwap.
The price of this trade will be determined by the AMM algorithm and code. For instance, Uniswap uses the x*y=k equation to determine the price of a trade. Here, X denotes the value of coin A, and Y denotes the value of coin B, with K representing a constant value. Therefore, despite fluctuations in the values of coins A or B, their trade price will be determined by the automated balancing effect of the formula’s constant value.
Let’s take an example of an automated market maker trade:
- A trader is looking to exchange 1 Dogecoin (DOGE) for Cardano (ADA).
- The AMM protocol examines the ratio (or constant value) between DOGE and ADA in the liquidity pool and calculates an exchange price.
- The trader evaluates the price, either completes or rejects the exchange, paying a small fee if the trade is completed.
It is also important to consider slippage – the difference in the order price and the actual exchange price. As the exchange price algorithm is calculated on the token ratio in the liquidity pool, changes to the ratio will result in slippage. For example, the ratio of deposited tokens will shift once a LP deposits them in a liquidity pool, resulting in a loss of value. This is known as impermanent loss, but more on that later.
Pros of Automated Market Makers
- Brings liquidity to decentralised exchanges – Automated market makers help mitigate the primary challenge of decentralised exchanges – liquidity. Liquidity pools allow for the automated and permissionless completion of a cryptocurrency exchange 24/7 without the need for another trader.
- Democratisation – Unlike centralised exchanges, AMMs do not require Know Your Customer (KYC) checks or require users to set up an account. Similarly, to become a liquidity provider only requires the possession of ERC-20 tokens on Ethereum, so pretty much anyone can take part.
- Yield farming – Some liquidity pools pay deposit rewards – sometimes as a fee or in tokens. Users are therefore able to move their tokens between multiple pools in search of higher yields. However, this approach comes with the risk of impermanent loss and is capital intensive.
Cons of Automated Market Makers
- Hacks and vulnerabilities – Certain AMM exchanges have previously been affected by hacks, such as Uniswap and Balancer, where liquidity deposits were stolen. These risks are inherent in smart contracts on decentralised blockchain networks.
- Need for arbitrage traders – Those who exploit price differences in identical assets across multiple markets and are a necessary part of automated market maker protocols. As token imbalances appear across liquidity pools – due to price volatility or large changes in token ratios – arbitrage traders are required to restore liquidity pool ratios.
- Impermanent loss – Automated market makers regulate asset price by algorithmic formula so there can be a divergence between the value of tokens within a liquidity pool and outside a liquidity pool. This is known as an impermanent loss. Whilst trading fee commissions and token rewards look to offset this risk, LPs can still be faced with a loss of token asset value.
Comparing Automated Market Maker Platforms
There are many different automated market maker protocols and options available across the DeFi ecosystem. For both traders and LPs, it is important to understand the make-up of each AMM’s liquidity pool. Uniswap, for instance, works on a fixed ratio between two pairs of tokens. Balancer, on the other hand, has multi-token pools (up to eight) with custom pool ratios more suited to volatile or imbalanced asset prices.
For traders, protocol trade fees must be considered. Flat fees are often charged to every pool trade, usually around 0.3%, often increasing if multiple pool trades are involved. Depending on the size and complexity of your trade, it is worth checking these with each AMM protocol.
For LPs, the trade fee often translates to their protocol yield. In Uniswap, that fee goes directly to pool contributors, whereas in Balancer, a dynamic trade fee is determined by the pool owner and proportionally distributed to pool LPs. Some AMMs will also reward LPs with tokens such as Bitcoin.
Some platforms have included LP requirements. Kyber Network requires significant capital contribution and Curve’s liquidity pools are only open to stablecoins so it’s important to check these if you’re looking to contribute liquidity.
Final Word On Automated Market Makers
AMMs are clearly an important part of the DeFi space. They provide the instant and automated liquidity that is often lacking in smart contract blockchains and help to reduce slippage. They offer an attractive proposition for traders and LPs alike. However, the reliance on arbitrage traders and the risk of impermanent loss that comes with AMMs means caution is advised before investing capital in these platforms. Fortunately, a virtual simulator or paper trading account can prove an effective way to test a provider’s services before putting money on the line.
How Does An Automated Market Maker Work?
An automated market maker leverages a smart contract that uses an algorithm to determine the trade price in a cryptocurrency exchange. However, instead of a trade between a buyer and a seller, AMMs trade tokens from within a liquidity pool.
What Is A Liquidity Pool?
A liquidity pool is a pot of cryptocurrency tokens deposited by liquidity providers (LPs). LPs are able to earn rewards (protocol yields) for supplying tokens in the form of trade fees or other cryptocurrency tokens.
How Do Automated Market Makers Differ From Traditional Market Makers?
Traditional market makers provide liquidity when matching a buyer and a seller of an asset – they essentially act as the middleman. Automated market makers provide liquidity via liquidity pools, meaning assets can be traded 24/7 with the trade price set via an algorithm.
How Do You Use An Automated Market Maker?
Both traders and liquidity providers can visit an automated market maker protocol site, connect a DeFi-enabled wallet, and simply trade the token or asset they wish to buy or sell. AMMs do not require KYC checks or a user account. Liquidity providers follow a similar method, simply selecting the amount they wish to contribute to the liquidity pool.
How Do Automated Market Makers Determine Trade Price?
AMMs use a mathematical formula, or algorithm, to determine trade price. Liquidity pool token ratios are sometimes used as the basis of these algorithms, causing price fluctuations following trade executions and making AMMs reliant on arbitrage traders.
What Is The Best Automated Market Maker Platform?
The best automated market maker platform is dependent on each user’s needs and portfolio, either as a trader or LP. Users should examine pool ratios, trade fees and protocol yield ahead of selecting a platform. With that said, Uniswap, Curve and Balancer are some of the largest and most dominant AMM platform options.