High-level description of Automated Market Maker (AMM) - State of adoption in Decentralized Exchanges (DEX) (P.3)
High-level description of Automated Market Maker (AMM)
Automated market making is not a new notion, with Hakansson, Beja, and Kale (1985) first simulating demand smoothing with a "programmed specialized" market maker.
Even in weakly traded markets, they found automatic demand smoothing to be cost-effective, despite its limited scope. The seminal studies on logarithmic market scoring rules (LMSR) by Robin Hanson (Hanson (2003) and Hanson (2007)) explore an early AMM model within traditional markets. They argue that automation provides significant cost and modularity benefits. His logarithmic model, on the other hand, was unable to maintain efficient price discovery in markets with low and high liquidity.
Othman, Pennock, Reeves, and Sandholm (2013) solve this problem by developing a "liquidity sensitive" AMM that makes money in volatile markets. Gerig and Michayluk (2010) found that automated liquidity provision establishes more efficient prices, enhances informativeness, but raises trader transaction costs.
AMM's basic terms
As referred, Automated Market Maker is the main feature of Decentralized Exchanges. Trades that happen directly between user wallets on an exchange like Binance DEX are referred to as peer-to-peer (P2P) transactions, but trades that happen between users and contracts on an AMM-based exchange are referred to as peer-to-contract (P2C) transactions (Binance.com). Components of AMM include actors and assets to interact with smart contracts, as well as mechanism and economics.
Actors
Liquidity Providers (LP): A liquidity pool can be established using a smart contract and an initial quantity of crypto assets provided by the first LP. Other LPs can then raise the pool's reserve by adding more of the assets in the pool. In turn, they are given pool shares commensurate with their liquidity contribution as a percentage of the total pool (Alex, 2020). LPs profit from transaction fees levied by exchange customers. While there may be a withdrawal penalty in some cases, LPs can freely withdraw funds from the pool (F.Martinelli & N. Mushegian, 2019) by relinquishing a matching number of pool shares (Alex, 2020).
Exchange users (Traders): A trader places an exchange order with the liquidity pool by stating the input and output asset as well as the quantity. The exchange rates are calculated automatically by the smart contract (Jiahua Xu, 2022) and different between pairs of tokens but not always in sync perfectly which opens up opportunities for arbitrageurs (Ye Wang, 2022) who take advantage of price inefficiency to find a profitable method (Naratorn B, Warodom W, nd). Uniswap V2 lost 138 millions USD in revenue over eleven months due to arbitrageurs (Ye Wang, 2022).
Protocol foundation: A team of founders, developers are responsible for building an user-friendly protocol where LPs and traders interact with smart contracts.
Assets
Risk assets: Characterized by illiquidity (Jiahua Xu, 2022), are the major type of assets for which AMM-based DEX are created. If the centralized exchange has initial exchange offering (IEO), the AMM-based DEX has a capital raising activity known as a "initial DEX offering (IDO)" that is especially ideal for illiquid assets. A risk asset must be whitelisted and compliant with the protocol's technical requirements to be eligible for an IDO (for example, ERC-20 (ethereum.org) for most AMMs on Ethereum).
Base assets: A trading pair must always include a risk asset and a selected base asset, according to some regulations (Jiahua Xu, 2022). BTC and ETH are used as base assets in the majority of situations, but accepted base currencies differ for each exchange (gemini.com, 2022) using native tokens or stablecoin pegged by USD. Aave uses a risk assessment methodology to analyze risk for each asset, consequently, ETH, its wrapped token WETH and stablecoin USDC are the lowest risk assets and volatility (Aave.com, 2021), that's why they are the most popular choice of base assets. Risk and profit of different liquidity pools affect liquidity provider behaviors to redistribute their investment (Lioba, Ye & Roger, 2021). In the next chapter, I will look at liquidity providers' movements in order to better understand their motivations.
Liquidity shares: Indicate ownership in a pool's asset portfolio and are given to Liquidity Providers. In Uniswap, for example, liquidity providers can mint liquidity by investing both ETH and tokens. By burning the potion of liquidity, liquidity providers can withdraw their ETH and token deposited (Y Zhang et al, 2018).
Governance tokens: Tokens that provide users ownership rights on the decision of AMM -e.g., adding or removing trading pairs as well as changing the exchange's fee and vote structure (Christos.A et al, 2021). User engagement and market capitalization of a DEX may be affected by the airdrop of the governance token or the award of liquidity mining.
Fundamental AMM mechanism and economics
This study is based on a broad body of market microstructure research. From game-theoretic perspective, Massimo, James and Alberto (2022) provided a theory of Automated Market Maker in DeFi which is an abstracts operational model of user's interaction with AMM. The original aspect of this model considers the key economic mechanism is swap rate function to determine exchange rate between tokens. Jiahua’s team (2022) states that AMM involves both swap rate and liquidity provision/withdrawal.
The theory of AMM by Massimo et al (2022) requires that as long as the starting reserves of an AMM must be strictly greater than zero, funds cannot be frozen, users can redeem any quantity of tokens deposited in an AMM. Agostino (2021) investigates that “liquidity freezer” is more likely to happen for tokens with low expected returns. If the token exchange rate is excessively volatile, liquidity providers incur a substantial opportunity cost for holding those tokens in their portfolios. It reduces LP's incentives.
Business model of the AMM-based DEXes
AMM-based DEXs differ from traditional order-book exchanges in that they allow traders to match market bids and/or asks. Again, smart contracts operate as middlemen and are referred to as Liquidity Pools in this scenario. Investors or, in this case, Liquidity Providers (LPs) can deposit a pair of equal-value tokens, such as ETH/DAI, into these Liquidity Pools (Fig. 8). In exchange, they will receive LP tokens as evidence of deposit and will be paid a percentage of the fee paid to the Buyer when they switch. The protocol's price function - commonly calculated by the constant rate formula - is used to assign a price to each token. The Buyer who wishes to trade - or "swap" - DAI for ETH will deposit DAI, plus interest, in the Liquidity Pool, and get ETH. This is called Automated Market Marker mechanism (Teng & Jiahua, 2022)
Fig. 8. The business model of Decentralized Exchanges (Teng&Jiahua, 2022)
From left to right, Liquidity Providers put a couple of assets in the Liquidity Pool, in this example DAI/ETH. They are given LP tokens in exchange as proof of their deposit. A smart contract sits in the center, handling locked assets, new deposits, swaps, and gas fees. A fee will be charged to the buyer who wishes to convert his DAI for ETH. This charge will be split pro-rata across all LPs, with a portion going to the DEX Treasury.
The orders of buyers in smart contracts are written by miners, it is “a first-past-the-post race”, and the gas fee is obtained by the winner. As a result, a higher gas cost is likely to attract more miners, reducing the order processing time (Michael B & Marius Z, 2020).
Types of AMMs for Decentralized Exchanges
Fig. 9. Types of Automated Market Maker within the broader taxonomy of DEX
Johannes et al classify AMM into Constant Function Market Maker (CFMM) and Token Swap Market Maker (TSMM). The term CFMM refers to a function variation that requires the content of two or more liquidity pools in a trading pair to approximate a constant k. Constant Product Market Maker (CPMM) has received the most attention in the DeFi community and is the most popular model of AMM used by the two leading DEXes - Uniswap and Sushiwap. Constant Product is a special case of Constant Mean (CMMM) (Vijay Mohan, 2022). Jiahua (2022) states that Constant Sum (CSMM) is another representative form of CFMM because it has no price slippage but it is unfit for DEX use cases due to arbitrage problems (Vijay Mohan, 2022). Curve Finance integrates exchange function of both CPMM (CMMM) and CSMM (Curve Finance, 2021), Bancor dynamically adjusts weights (DAMM) in response to changes in the external market price (Eyal H et al, 2017) instead of using directly CMMM like Balancer (Martinelli and Mushegian, 2019). Besides, concentrated liquidity (CLMM) is defined by Uniswap V3 to improve the current issues of CPMM (Uniswap.org). Both the basic AMM mechanism CPMM and the innovation model CLMM will deep-dive in the next section.
Comments
Post a Comment