How does the TWAMM proposed by the Uniswap founders and the Paradigm research team work?

Paradigm
2021-07-29 15:03:21
Collection
Aims to break large transactions into many smaller transactions and execute them over a period of time.

Source: Paradigm Official Website

Authors: Dave White, Dan Robinson, Hayden Adams

Compiled by: Hu Tao, Chain Catcher

AMM is one of the biggest innovations in the DeFi space, with DEX projects like Uniswap and Curve building AMM mechanisms with different characteristics based on this concept. Meanwhile, various parties in the industry are trying to establish more efficient AMM mechanisms.
Today, Paradigm research partners Dave White and Dan Robinson, along with Uniswap founder Hayden Adams, co-authored a paper proposing a new AMM model called "Time-Weighted Average Market Maker TWAMM" for executing large trades on Ethereum.
"Suppose Alice wants to buy $100 million worth of ETH on-chain; the best option is to manually split her order into several parts and execute them over a few hours," the paper states. "If she sends several large sub-orders, each order will still have a significant impact on the price and is vulnerable to predatory traders. On the other hand, if she sends many small sub-orders, she will have to bear all the work and risks of active trading and pay high costs to miners in the form of gas fees for each trade."
The goal of the TWAMM mechanism is to solve this problem. According to the paper, unlike the expensive trading costs of traditional AMM models during large Ethereum transactions, TWAMM splits a large trade into countless tiny orders based on a dedicated order-splitting logic and executes all these trades within a certain time frame through an embedded AMM. The primary goal of the embedded AMM's price is to smoothly execute its long-term orders over time to ensure they are executed at prices close to the current time-weighted price.
Specifically, TWAMM includes an embedded AMM, which is a standard constant product market maker for the two assets, facilitating trades between two specific asset pairs, such as ETH and USDC.
Traders can submit long-term orders to TWAMM to sell a fixed amount of assets over a fixed number of blocks. TWAMM breaks these long-term orders down into an infinite number of infinitesimal virtual sub-orders, which trade with the embedded AMM at a uniform rate over time. Individually processing the trades of these virtual sub-orders would cost infinite gas, but a closed-form mathematical formula allows the mechanism to calculate their cumulative impact only when needed.
Over time, the execution of long-term orders will push the price of the embedded AMM away from the prices of other markets. When this happens, arbitrageurs will trade based on the price of the embedded AMM, bringing it back into alignment, thus ensuring good execution of long-term orders.
For example, if long-term selling makes ETH on the embedded AMM cheaper than on a specific centralized exchange, arbitrageurs will buy ETH from the embedded AMM, causing its price to rise, and then sell it on the centralized exchange for profit.
According to the paper, if Alice, Bob, or Charlie are not in a hurry to execute their orders, TWAMM will become the best place for them to trade, as other market participants can infer that the adverse selection represented by their orders is less than in other cases, allowing them to provide execution with low price impact. "LPs on the embedded AMM of TWAMM may interact with a large number of uninformed users like them," the paper notes, "which helps LPs earn profits from fees."
The paper concludes by stating that the current conception of this model is still in its early stages and calls for more developers to participate in this project.

Related tags
ChainCatcher reminds readers to view blockchain rationally, enhance risk awareness, and be cautious of various virtual token issuances and speculations. All content on this site is solely market information or related party opinions, and does not constitute any form of investment advice. If you find sensitive information in the content, please click "Report", and we will handle it promptly.
ChainCatcher Building the Web3 world with innovators