Uniswap inventor Hayden Adams and two others developers from crypto investing firm Paradigm, Dave White and Dan Robinson, are working on a new automated market maker (AMM) model to help decentralized exchanges (DEXes) on Ethereum execute large orders efficiently.
Paradigm developer Dave White introduced the new AMM algorithm in a Twitter thread on Wednesday, July 28th. According to White, the name given to this new AMM model is “Time-Weighted Average Market Maker or TWAMM” that will help DEXes to execute large orders more efficiently.
I've been working on a new type of automated market maker with @danrobinson and @haydenzadams.— Dave White (@_Dave__White_) July 28, 2021
The Time-Weighted Average Market Maker, or TWAMM (pronounced "tee-wham"), helps traders on Ethereum efficiently execute large orders.https://t.co/nvCPDJIrlY pic.twitter.com/XgdW5Jixd7
According to White’s thread and a paper published on Paradigm website, the main idea behind TWAMM is to split large orders into “infinitely many infinitely small pieces and executing them against an embedded constant-product AMM smoothly over time.” This is similar to technique called Time-Weighted Average Price (TWAP) used in traditional finance.
Currently, most of the popular decentralized exchanges like Uniswap or SushiSwap use automated market makers (AMMs) model, where liquidity providers create pools of funds that DEX users can trade with. According to the paper, these traditional AMM DEXes are inefficient and expensive for large trades.
The Time-Weighted Average Market Maker (TWAMM) model proposed by these three developers proposes to use a blockchain equivalent on TWAP, a technique used by traditional finance brokers to execute large orders. TWAP calculates the average price of an asset over a specified time but TWAMM will calculate the price of a crypto asset for a fixed number of blocks.
According to the paper:
“The TWAMM breaks these long-term orders into infinitely many infinitely small virtual sub-orders, which trade against the embedded AMM at an even rate over time.”
One key problem here are gas fees as processing transactions for each of these small individually would result in infinite gas fees, which are already much higher on Ethereum. However, according to Dave White, this proposal manages to execute the trades in a way that is efficient for transaction fees, “thanks to some lucky match.”
The TWAMM enables the on-chain equivalent of the TWAP order.— Dave White (@_Dave__White_) July 28, 2021
It breaks long-term orders into infinitely many infinitely small pieces and executes them smoothly against its embedded AMM over time.
And, thanks to some lucky math, it does it all gas-efficiently. pic.twitter.com/RSwnX1VzJC
The paper reads:
“Processing transactions for each of these virtual sub-orders individually would cost infinite gas, but a closed-form mathematical formula allows us to calculate their cumulative effect only when needed.”
Dave White noted that the work was still in early stages. This paper presents the sketch design of TWAMM and this was just the beginning of their work.
If you found this article interesting, here you can find more DeFi News