原文作者:Boo Stark,MetaDEX 创始人、AnchorDAO LAB 研究员
原文标题:《Why We Design A New AMM For Novel Asset?》
原文来源:AnchorDAO 官方Medium
0x711

随着元宇宙的崛起,Play to Earn 是当下最流行的用户行为。数百亿美元的资金参与了工作室的游戏产出狂潮。对于用户来说,他们每天的收益产出是以 Token 的形式来实现。一笔 10 万美元的投入,如果按 30 天回本周期计算,则每天的交易量在 3,300 美元左右 [1]。这只是其中一个例子。元宇宙的普及将覆盖更多有小额交易需求的用户。在东南亚市场,有近 3 亿用户参与到数字货币交易,而他们每天的交易额不超过 1,000 美元。高频、小额的交易爆发使得 MetaDEX 看到了巨大的市场需求。链上小额交易每天的交易量远超 10 亿美元。
MetaDEX 架构的核心算法主要针对小额交易设计,其专用算法可以解决小额交易中价格滑点的问题。该算法的理论基础来源于 UniSwap AMM 机制的数学框架 [2],但这个框架可以追溯到 Clipper 创始人 Abe Othman2012 年的博士论文 [3]。今年,Clipper 还筹集了 2000 万美元,为小额交易提供最佳算法,但仅限于 ETH 和 BTC。
然而,对于大多数元宇宙用户来说,使用以太坊或 BTC 的交易成本过高。单次交易成本可能高达数百美元,限制了使用场景。
相比于 Clipper,MetaDEX 支持的 token 资产范围得到了扩展,可以支持像 GameFi、Meme 币、小市值币等新兴 Token。对于流动性,也无需维持一个庞大的 AMM 流动性池。例如,如果所有用户的交易额低于 100 美元,40 万美元的 AMM 池就可以满足 100 万美元的日交易额。
MetaDEX 的算法框架可以解决以下三个问题:
Reduced the liquidity mining cost set by the project to attract liquidity.
提高了项目方和做市商的资本利用率,同时高频交易还会带来更多的收入。
使用 MetaDEX 的聚合模组,可为小额交易提供可能的最佳价格。
当价格不是最佳价格时,MetaDEX 会依靠聚合交易来聚合其他 DEX 的流动性。
Clipper's use of the AMM algorithm caters well to small transactions. Constant Product Market Maker (CPMM) and Constant Sum Market Maker (CSMM) occur when two extremes (k = 1 and k = 0) occur.

When there are only two types of tokens (X and Y), constants can be simplified to a simpler form, where x0 and y0 are the number of tokens set by the initial liquidity provider. The figure below shows the performance of the liquidity pool with different values of K. X-axis and Y-axis represent X0 and y0 respectively.

It can be seen that the smaller the k value is, the lower the corresponding slide point near (1,1) is (that is, the curvature of the function image is smaller). As k goes from 0 to 1, the invariant function might cross the x and y axes. This means that the tokens in the liquidity pool are sold out. The price of this intersection is zero, which means that the price is better than CPMM price until the turning point. After passing the turning point, CPMM is better priced. As shown below:

The X-axis is standardized again. As we move from the initial point (1,1), the price of X Token decreases relative to Y. We can calculate exactly where the intersections are:

Advantage:By introducing the parameter K, Clipper achieved lower slippage (i.e., better prices) for small transactions. The chart below, from Clipper's white paper, illustrates this point further.

Disadvantage:当交易量超过某个临界值,价格相比于 CPMM 会变得非常差。
In order to ensure better prices, the algorithm has to be reanchored regularly (changing x0 and y0) to keep the liquidity pool reserves near (1,1). Clipper, however, uses a predictor as a solution, using it to introduce external market prices and match asset prices in its liquidity pool. [6] This solution creates the problem of the predictor.
预言机问题:
Clipper 仅支持 WBTC/ETH 交易对是因为预言机的价格限制。如果支持 GameFi 等新兴资产,预言机很容易遭到攻击。
The price of the predictor will also increase the risk exposure of the liquidity pool due to the existence of arbitrage, which is also a problem previously encountered by DODO PMM model [7].
为确保交易价格的更加平稳,以及可定制的价格更新,MetaDEX 小额交易 AMM 引入了动态常数函数来实现 AMM 函数的再锚定。此外,MetaDEX AMM 还引入了一个条件函数来决定 AMM 函数再锚定向量。
MetaDEX AMM algorithm achieves reanchoring through an internal price predictor that tracks market prices. In essence, this is equivalent to solving the following formula: x and y are known, and P is the price given by the predictor. And then finally, we solve for x0, and we get our new equilibrium.

这确保 MetaDEX 可以在接近市场价格的情况下,以较低滑点进行交易。[8]
We will publish mathematical papers explaining the details and numerical simulations of MetaDEX AMM and how to solve the price problem of the predictor for small internal liquidity pools.
[1]Bowie Lau and Kelly Choo.2021. Searching for Asia "s" hidden treasures "in NFTs and GameFi, URL:https://forkast.news/video-audio/asia-hidden-treasures-nft-gamefi/
[2]Hayden Adams. 2018. URL:https://hackmd.io/@477aQ9OrQTCbVR3fq1Qzxg/HJ9jLsfTz?
[3] Abraham Othman. 2012. Automated Market Making: Theory and Practice. Ph.D. Dissertation. Carnegie Mellon University
[4] Clipper,https://docs.clipper.exchange/
[5]Abraham Othman. 2021. New Invariants for Automated Market Making. URL:https://github.com/shipyard-software/market-making-whitepaper/blob/main/paper.pdf
[6] Clipper Oracle,https://docs.clipper.exchange/how-clipper-works
[7] DODO PMM,https://dodoex.github.io/docs/docs/pmm
[8] Leo LIU and Guangwu XIE. 2021. A Mathematical View of Automated Market Maker (AMM) Algorithms and Its Future. URL:https://medium.com/anchordao-lab/automated-market-maker-amm-algorithms-and-its-future-f2d5e6cc624a
The original link
Welcome to join the official BlockBeats community:
Telegram Subscription Group: https://t.me/theblockbeats
Telegram Discussion Group: https://t.me/BlockBeats_App
Official Twitter Account: https://twitter.com/BlockBeatsAsia