Automated market makers present a novel aspect to trading digital assets that were previously non-existent. This novel approach has enabled decentralized exchanges such as Uniswap, Saddle Finance, and Balancer to achieve token swaps in a non-custodial manner and without compromising decentralization.
While order book-based decentralized exchanges (DEX) of previous generations of DeFi (decentralized finance) struggled with providing sufficient and reliable levels of liquidity to users, AMM-based DEXs are changing the narrative in a big way. In one case, the trading volume on Uniswap even managed to surpass that of centralized and established platforms such as Coinbase.
Simply put, AMM protocols operate as the engine underneath the hood of nearly every DEX in the DeFi landscape at the moment. Granted, there are different types of AMM protocols deployed across a variety of DeFi applications. However, the most common AMM protocol remains to be the swapping protocol that powers DEXs such as Uniswap, SushiSwap, and every other DEX in between.
Here is a primer on AMM protocols and how they are deployed on decentralized exchanges.
What is an AMM Protocol?
To begin with, an AMM (automated market-making) protocol is simply a software algorithm that can be programmed into a smart contract to provide a formula for that smart contract to make markets automatically.
In the world of finance, a market only exists if two parties are involved thus making up the buyer and the seller. As expected, each of these two parties is guided by selfish incentives where the buyer is looking to purchase at the lowest price possible, and the seller is looking to sell the digital asset at the highest price possible.
However, the trade can only take place once the two parties agree on a price in the middle. Once the parties agree on a price, the trade is fulfilled, and a price for the asset is set.
However, what happens when there is a buyer but no seller to match or when there is a seller with no buyers? Well, this is where market makers come in. Essentially, a market maker’s job is to make sure that both sides of the trade are always fulfilled by providing liquidity on both sides.
Liquidity simply refers to the ease with which an asset can be exchanged for other assets. The market maker’s job is to offer high levels of liquidity; therefore, the buyer and the seller can be sure of fulfilling their trades even when there is no person on the other side of the trade.
How AMM Protocols Operate on DEXs
Given that an exchange platform’s main job is to offer its users reliable access to liquidity, decentralized exchanges have for a long time struggled to find a decentralized method of offering liquidity. For the most part, DEXs have relied on order books that try to mimic the format used on centralized exchanges but with some DeFi tools.
AMM-based DEXs on the other hand take the concept of decentralization to a whole new level. Using an AMM technology programmed into a smart contract that controls a liquidity pool, DEXs are now able to facilitate the exchange of one token with the other on a fully decentralized framework.
The AMM protocol in the smart contract is programmed to monitor the supply of tokens in the liquidity pool and balance out the equation to determine the price of assets in the pool based on demand and supply.
The Constant Product AMM for instance is designed to maintain an equal ratio of both tokens in the liquidity pool. This means that the price of one token is bound to rise as demand goes up, and it will fall as demand decreases.