카테고리 | |
태그 | |
검증 | |
이벤트 | |
조회수 | 348 |
Fraxswap is the first constant product automated market maker with an embedded time-weighted average market maker (TWAMM) designed by Frax Finance. Fraxswap is mainly used for conducting large trades over long periods of time trustlessly.
In June 2022, the Frax Finance team announced the launch of Fraxswap.[1]
Fraxswap is fully permissionless and its core automated market maker is based on Uniswap V2. Fraxswap’s automated market maker aims to help traders execute large orders efficiently. It assists the Frax protocol in increasing the stability of the pegs for the FRAX & FPI stablecoins as well as returning protocol excess profits to FXS holders through TWAMM purchases.
The motivation for Fraxswap was to create a unique AMM with specialized features for algorithmic stablecoin monetary policy, forward guidance, and large sustained market orders to stabilize the price of one asset by contracting its supply or acquiring specific collateral over a prolonged period.
Diagram of order flow on a Fraxswap pair with a TWAMM order active
Fraxswap’s core automated market maker is Uniswap V2 and based on the full range xy=k constant product design[2]. Fraxswap adhered to many of the design decisions of Uniswap V2 as it extended the codebase to support TWAMMs.
Fraxswap is the first live TWAMM implementation. The embedded TWAMM adheres to Paradigm’s original whitepaper specifications. The features mentioned in the whitepaper are used to optimize the execution of long-term orders which include the following:
The long-term orders are executed first before the automated, interaction and once per block. Fraxswap implemented an approximation formula of Paradigm’s original formula and allows for a simplified, more gas-efficient TWAMM. The TWAMM whitepaper describes the fundamental mechanics:
"Each TWAMM instance facilitates trading between a particular pair of assets, such as ETH and [FRAX]. The TWAMM contains an embedded AMM, a standard constant-product market maker for [...] two assets. Anyone may trade with this embedded AMM at any time, just as if it were a normal AMM. Traders can submit long-term orders to the TWAMM, which are orders to sell a fixed amount of one of the assets over a fixed number of blocks — say, an order to sell 100 ETH over the next 2,000 blocks. 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. 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. The execution of long-term orders will push the embedded AMM's price away from prices on other markets over time. When this happens, arbitrageurs will trade against the embedded AMM's price to bring it back in line, ensuring good execution for long-term orders. For example, if long-term sells have made ETH cheaper on the embedded AMM than it is on a particular centralized exchange, arbitrageurs will buy ETH from the embedded AMM, bringing its price back up, and sell it on the centralized exchange for a profit."
The interactive comparison of Paradigm’s TWAMM formula and Fraxswap’s TWAMM formula can be found on desmos. [3]
The Frax Protocol uses the Fraxswap’s design for its critical system function through TWAMM orders.
The core team’s motivation for building Fraxswap was to create a unique AMM with specialized features for algorithmic stablecoin monetary policy, forward guidance, and large sustained market orders to stabilize the price of one asset by contracting its supply or acquiring specific collateral over a prolonged period.
Frax Protocol uses Fraxswap for the following:
Fraxswap is a fully permissionless automated market maker that offer other protocols the option to create LP pairs in any token and use Fraxswap for the same (or other novel) use cases.
Fraxswap offers use cases for other protocols, stablecoin issuers and DAOs such as:
The core team teased the launch of Fraxswap V2 a few months after the launch of Fraxswap. Fraxswap v2 plans to support concentrated liquidity & correlated asset liquidity in a unique & novel way to allow TWAMM functionality across such pairs.
In August 2022, Frax Finance launched Fraxswap V2 which offers new dynamic fee pool creation with the option for governance changes regarding fee tiers. Additionally, Fraxswap V2 offers improved gas optimization for swaps and TWAMMs.
편집자
편집 날짜
May 5, 2023