Summary
You can think of an automated market maker (AMM) as a robot that can Assets are quoted. Automated market makers such as Uniswap use simple formulas, while Curve, Balancer and other automated market makers use more complex formulas.
Using AMM, you can not only conduct trustless transactions, but also become a doer by injecting liquidity into the liquidity pool. Market merchant. Therefore, almost everyone can become a market maker on the trading platform and enjoy the benefits created by popularity.
AMM has a simple principle and is easy to use, so it has successfully occupied a place in the DeFi field. This decentralized approach to markets is the essence of the vision for the future of digital currencies.
In Ethereum and other smart contract platforms (such as Binance Smart Chain), decentralized finance (DeFi) is increasingly favored by users. Liquidity mining has become a popular method of issuing tokens, tokenized Bitcoin in Ethereum continues to develop, and the volume of flash loans is also surging.
At the same time, automated market maker protocols such as Uniswap often experience highly competitive trading volumes and high liquidity. The number of users keeps increasing.
However, how do these trading platforms work? Why is it so quick and easy to build a market for the latest food token? Can AMMs really compete with traditional order book trading platforms? Let's find out.
An automated market maker is a decentralized exchange (DEX) protocol that prices assets through mathematical formulas. Asset pricing is done through pricing algorithms, eliminating the use of order books commonly used in traditional trading platforms.
Pricing formulas vary between protocols. For example, the formula used by Uniswap isx * y= k, wherexrepresents the amount of a token in the liquidity pool,y then represents the amount of another token. In this formula,kis a fixed constant, indicating that the total amount of liquidity in the pool must remain constant. Other AMMs use other formulas based on specific target use cases. Regardless of the formula, however, pricing is done algorithmically. If you're still confused, don't worry, we'll explain it in detail below.
The traditional market maker mechanism is usually suitable for companies with large resources and adopting composite strategies. With this mechanism, you can get high-quality transaction prices and enjoy low bid-ask spreads on order book trading platforms such as Binance. Automated Market Makers (AMM) decentralize this process and everyone can create markets in the blockchain. So, how exactly do they do it? Read on to learn more.
The working principle of an automated market maker (AMM) is similar to that of a traditional order book trading platform. Both set up trading pairs (such as , ETH/DAI). However, the former does not require trading with a specific counterparty (another trader). In the AMM mechanism, traders interact with smart contracts to "create" markets for themselves.
In decentralized exchanges such as Binance Decentralized Exchange (DEX), transactions occur directly in the user’s wallet carried out in between. If you sell BNB on Binance DEX for BUSD, then the other customer in your transaction is buying BNB with BUSD. We call this peer-to-peer (P2P) trading.
If AMM is used, it can be regarded as Peer-to-Peer Contract (P2C). In this mechanism, users trade directly with the contract without having to cooperate with counterparties in the traditional sense. AMM does not use an order book, so there are no order types. The actual buying and selling price of the asset is determined by a formula. It is worth noting that future AMM designs may gradually break through this limitation.
Although there is no counterparty, someone still needs to create the trading market in AMM, right? indeed so. Liquidity in smart contracts still must be provided by liquidity providers (LP).
Liquidity providers (LP) inject funds into the liquidity pool. You can think of a liquidity pool as a large pool of funds that traders can trade with. In return for providing liquidity to the protocol, liquidity providers earn fees from the trades conducted by the trading pool. Taking Uniswap as an example, liquidity providers need to deposit two tokens of equal value into the liquidity pool, for example, deposit 50% ETH and 50% DAI into the ETH/DAI pool.
So, can everyone become a market maker? Indeed! Adding funds to the liquidity pool is simple and rewards are determined by the protocol. For example, Uniswap v2 charges traders a 0.3% fee and distributes it directly to liquidity providers. Other platforms or forks will also adopt various preferential measures to attract more liquidity providers.
Why is it important to attract liquidity? Based on the operating mechanism of AMM, the greater the liquidity of the capital pool, the smaller the sliding spread generated by large orders. This will in turn attract higher trading volumes to the platform, among many other advantages.
The issue of sliding spreads varies depending on the design of the AMM, but it should never be ignored. Don’t forget, pricing is determined by algorithms. Simply put, pricing is determined by the change in the ratio of tokens in the liquidity pool after the transaction is completed. If the change is large, a large sliding spread will occur.
Further, let’s say you want to buy all the ETH in the ETH/DAI pool on Uniswap. May I? the answer is negative! Every time you buy an additional ether, you pay an exponentially higher premium, and even if you do pay, you can't buy all the ether in the pool. Why is this? The answer lies in the formulax * y = k. This formula has no meaning if either x or y becomes 0, that is, there is no ETH or DAI in the pool.
However, the content about AMM and liquidity pools is not all introduced here. When providing liquidity to AMMs, you should also be aware of impermanent losses.
Impermanent losses occur when the price ratio of the deposited token changes compared to when it was deposited into the pool. The greater the change, the greater the loss of impermanence. Therefore, AMMs work best for pairs of tokens of similar value, such as stablecoins or wrapped tokens. If the price ratio between token pairs remains within a relatively small range, impermanent losses are negligible.
On the contrary, if the ratio changes significantly, it is recommended that liquidity providers hold tokens instead of depositing them into the pool funds. Even in Uniswap capital pools like ETH/DAI, which are prone to impermanent losses, users can still profit from accumulated transaction fees.
Having said that, it is not appropriate to use "impermanent loss" to summarize this phenomenon. "Impermanence" assumes that losses will be reduced if the asset returns to its original deposit price. However, if funds are withdrawn at a different price rate than when deposited, impermanent losses will transform into permanent losses. In some cases, although transaction fees can reduce losses, we still need to consider the risk of impermanent losses.
Be careful when depositing funds into AMM, and fully understand the meaning of impermanent loss and its negative effects. If you want to learn more about impermanent loss, read Pintail’s article.
➟ Want to start a digital currency journey? Welcome to buy Bitcoin on Binance!
Automated market makers are an important part of the DeFi field and basically allow anyone to create markets seamlessly and efficiently. Although there are certain limitations compared to order book trading, the overall innovation that AMM brings to the digital currency world is priceless.
AMM is still in its infancy. At present, the AMMs we know and apply (such as Uniswap, Curve, PancakeSwap, etc.) are ingenious in design, but their functions are very limited. We firmly believe that the future design of AMM will incorporate more innovative technologies, allowing all DeFi users to enjoy lower fees, a more harmonious trading environment, and higher liquidity.
Do you have any other questions about DeFi and automated market makers? Please visit our Q&A platform Ask Academy, where members of the Binance community will patiently answer your questions.