Automated market makers sound more complicated than they actually are — CoinMarketCap breaks down what AMMs are and how they work.
Market Making: What Is It?
Before we dive into the technicalities associated with AMMs, it is crucial to understand the concert of market making in the financial landscape.
As its name implies, market making connotes the process involved in defining the prices of assets and simultaneously providing liquidity to the market. In other words, a market maker does create liquidity for a financial asset. It must find a way of meeting the selling and buying requests of traders, which in turn plays into the pricing of the said asset.
The order matching system, on the other hand, matches and settles sell and buy orders. At every given time, the most recent price at which Bitcoin was bought will automatically feature as the market price of the digital asset.
In some cases where there are not enough counterparties to trade with, the market is said to be illiquid or prone to slippage. Slippage occurs when the processing of large order volumes drives the prices of an asset up or down.
To mitigate this occurrence, some crypto exchanges employ the services of professional traders — in the form of brokers, banks and other institutional investors — to continuously provide liquidity. These liquidity providers ensure that there are always counterparties to trade with by providing bid-ask orders that would match the orders of traders. The process involved in providing liquidity is what we call market making, and those entities that deliver liquidity are market makers.
Now that you understand what market making is, it is easier to grasp the workings of an automated market maker.
What Then Is an Automated Market Maker?
From the explanation above, it is clear that crypto market makers work around the clock to reduce price volatility by providing the appropriate level of liquidity. What if there was a way to democratize this process such that the average individual could function as a market maker? This is where automated market makers enter the fray.
How Do AMMs Work?
To explain this further, let's take Uniswap as a case study. The protocol uses the popular x*y=k equation where X denotes the value of Asset A and Y represents that of Asset B. K is a constant value. Hence, regardless of changes in the value of assets A or B, their product must always be equal to a constant.
Note that the equation highlighted as an example is just one of the existing formulas used to balance AMMs. Balancer uses a more complex formula that allows its protocol to bundle up to eight tokens in a single pool.
While there are a variety of approaches to AMMs as exemplified by Uniswap and Balancer, the fact remains that they require liquidity to function properly and negate slippages. As such, these protocols incentivize liquidity providers by offering them a share of the commission generated by liquidity pools and governance tokens. In other words, you get to receive transaction fees when you provide capital for running liquidity pools.
Once you stake your fund, you will receive liquidity provider tokens that denote your share of the liquidity deposited in a pool. These tokens also make you eligible to receive transaction fees as passive income. You may deposit these tokens on other protocols that accept them for more yield farming opportunities. To withdraw your liquidity from the pool, you would have to turn in your LP tokens.
Another thing that you should know about AMMs is that they are ideal for arbitrageurs. For those that are unfamiliar with this term, arbitrageurs profit off inefficiencies in financial markets. They buy assets at a lower price on one exchange and sell them instantly on another platform offering slightly higher rates. Whenever there are disparities between the prices of pooled tokens and the exchange rate of external markets, arbitrageurs can sell or buy such tokens until the market inefficiency is eliminated.
However, this loss is called impermanent for a reason. As long as you do not withdraw deposited tokens at a time that the pool is experiencing a shift in price ratio, it is still possible to mitigate this loss. The loss disappears when the prices of the tokens revert to the original value at which they were deposited. Those who withdraw funds before the prices revert suffer permanent losses. Nonetheless, it is possible for the income received via transaction fees to cover such losses.
Over the last couple of years, AMMs have proven to be innovative systems for enabling decentralized exchanges. In this time, we have witnessed the emergence of a slew of DEXs that are driving the ongoing DeFi hype. While this does not mean that the approach is flawless, the advancements recorded in the last 12 months are indicative of the several possibilities that AMMs provide. It remains to be seen where we go from here.