Content table
- Definition of market makers
- Definition of automated market maker
- Concept of automated market maker and liquidity pool
- A practical example of how liquidity pools and automated market maker work
- Advantages and disadvantages of automated market maker
Definition of Market Maker
Market makers are liquidity providers that enable the buying and selling of cryptocurrencies, tokens, stocks, and other assets. They play a crucial role in facilitating trades by providing liquidity. However, a large financial institution or individual can fulfill this role.
Definition of Automated Market Maker (AMM)
An automated market maker (AMM) is a protocol or algorithmic transactional robot that operates on decentralized exchanges. It allows traders to automatically buy and sell crypto coins or tokens without a third party.
Concept of Liquidity Pool and AMM
In centralized exchanges, order books connect traders, where buy and sell columns contain orders or limits set by both parties. However, in decentralized exchanges (DEXs), traders often prefer to trade without third-party intermediaries. This includes KYC (know your customer) requirements or certain regulations. Hence, the reason for decentralized exchange (DEX). But for DEX to work and traders to execute a trade on any pair, there must be liquidity. A liquidity pool is a crowd-sourced pool of cryptocurrencies or tokens held in a smart contract. It facilitates the trading of a specific pair on a DEX. Liquidity providers supply the cryptocurrencies to the pool in pairs, such as wrapped BTC (wBTC) and USDT. For example, if a liquidity provider deposits $2000 worth of wBTC, they must also deposit $2000 worth of USDT.
The liquidity providers (LPs) are always incentivized by earning fees and in some cases earn coins or tokens. Liquidity providers are incentivized by earning fees or receiving additional coins or tokens. The fees collected from the trades are proportionally distributed among the liquidity providers.
To gain a better understanding, AMM platforms include Uniswap, PancakeSwap, Curve, Balancer,1inch, etc. These platforms utilize Constant Function Market Makers (CFMMs). Uniswap for example, employs a Constant Product Market Maker (CPMM) model based on the function X * Y = K. Here, X represents the amount of token A, and Y represents the amount of token B. Meanwhile, K represents the constant product of the two tokens, which must remain constant.
A Practical Example of How Automated Market Maker and Liquidity Pool Works
Let’s consider the wBTC/USDT pair on the Uniswap AMM DEX. Assume that 1 wBTC is valued at $60,000. The liquidity pool contains 3 units of wBTC (X), totaling $180,000. Consequently, there will be 180,000 units of USDT (Y), as 1 unit of USDT is equivalent to $1. The constant (K) in this case is the product of 3 units of wBTC multiplied by 180,000 units of USDT, resulting in 540,000 units.
Note: K was calculated in units, not dollars.
Now, let’s say Trader A deposited $20,000 worth of wBTC and $20,000 worth of USDT into the pool, which accounts for approximately 11.1% of the total liquidity pool.
Suppose Trader B wants to exchange $5000 worth of wBTC for USDT on Uniswap. The Automated Market Maker will utilize the X * Y = K formula to calculate and maintain the pool.
Note: In this case, $5000 worth of wBTC will be added to the pool, while the corresponding amount of USDT will be withdrawn. To determine how much USDT Trader B will receive, let’s calculate the amount to be withdrawn.
If 3 units of wBTC are valued at $180,000, then $5000 will be equivalent to 0.083 wBTC. By inserting this value into the formula, we can calculate the amount of USDT to be withdrawn:
(3 + 0.083) * (180,000 – Y) = 540,000.
Calculation Summary
It should be noted that right from the outset, the deduction of $5000 from the liquidity pool was anticipated, as Mr. B intended to exchange $5000 worth of wBTC. However, removing this amount along with the transaction fee would result in a deficit within the liquidity pool. Hence, the value of Y was calculated to determine the appropriate allocation to the liquidity providers. Employing basic mathematical calculations, the outcome amounted to $4,845.9. Consequently, Mr. B would receive $4,845.93 instead of the initial $5000, indicating that the transaction fee of $154.07 would be automatically distributed among the liquidity providers. As for Mr. A, who deposited $20,000 worth of wBTC and $20,000 worth of USDT, his 11.1% share would amount to $17.10.
Advantages of Automated Market Maker
One notable advantage of automated market makers is that they operate on non-custodial wallets, ensuring that both traders and liquidity providers retain full ownership of their assets. Furthermore, these systems uphold the principle of decentralization, empowering participants within the ecosystem. Additionally, traders benefit from the convenience of regular trading without the need to actively seek out willing counterparties or meticulously match their desired price.
Disadvantages of Automated Market Marker
It’s worth mentioning that while decentralized exchanges (DEXs) have experienced substantial growth in terms of trading volume, the absence of an order book can lead to increased slippage when dealing with large orders. Moreover, users are subject to relatively high fees, encompassing a fixed trading fee and gas fees. During periods of network congestion, prominent blockchain networks like Ethereum may impose significant charges, reaching hundreds of dollars for a single transaction.
Personal Note From MEXC Team
Check out our MEXC trading page and find out what we have to offer! There are also a ton of interesting articles to get you up to speed with the crypto world. Lastly, join our MEXC Creators project and share your opinion about everything crypto! Happy trading!
Join MEXC and Start Trading Today!