The purpose of this post is to start a discussion around creating a standard for integrating a new kind of DEX called a Formula Market Makers (FMMs) with 0x.
Status Quo
While the majority of DEXes today are AMMs (ex: Uniswap, Curve, Balancer), there are other types including order books (ex: dYdX) and PMMs. There is also a newer type called a Formula Market Maker (FMM), which will be the focus of this discussion.
Differences from Existing Solutions
- On Chain/Off Chain
AMMs are on-chain mechanisms while PMMs are off-chain mechanisms. FMMs are a hybrid mechanism consisting of both on and off chain components.
- Calculation of Prices
Many PMMs are run by trading firms that arbitrage DEX transactions with centralized exchanges, give quotes that are misleading or not firm, or stop running during periods of market volatility or outside of business hours. In contrast, FMMs operate according to a formula that makes them always on, always present, and fully part of the DEX ecosystem. The use of a publicly available formula is one of the distinguishing features of an FMM.
- Liquidity Providers
Part of the reason why AMMs have become so popular is because providing liquidity is permissionless and funds are kept in a non custodial smart contract. On the contrary, providing liquidity to PMMs and Order Books is closed off and typically sourced from institutional capital. FMMs use a similar model to AMMs, making liquidity provision easy and accessible for all.
Ease of Integration
FMMs are designed to be composable like AMMs.
Can take in variable input and send variable output - does not need to necessarily rely on an exact transaction. Easily composable because they can send output to arbitrary addresses, similar to the PLP API specified by 0x.
Example of an FMM
The earliest example of an FMM is Clipper, a DEX for small trades.
In our recent post on the yield earned by Clipper LPs on Polygon we suggested that, despite massive disruptions in crypto prices since Clipper was launched on Polygon, Clipper Pool LPs have made extremely competitive returns of more than 30% annualized on a crypto basis, bracketing out the effects of market prices.
During the same time period, a roughly comparable Uniswap pool was down about 12% annualized because of impermanent loss tied to crypto price fluctuations.
We believe Clipper’s Polygon deployment has been able to avoid significant loss because it is a new kind of market maker, a Formula Market Maker (FMM), which combines the best qualities of an AMM and a PMM. We can think about the distinction between an AMM and a PMM along several dimensions. Clipper’s FMM is sometimes closer to a PMM, and but generally hews closer to an AMM.
FMMs are the Future
We believe FMMs will grow in popularity within DeFi and we’d like to see 0x create a standard integration to make adding them easier. FMMs combine the best qualities of AMMs and PMMs together while abstracting the shortfalls away. In short, here’s what FMMs offer:
- Non discriminatory pricing like AMMs (offers same rates to all traders)
- Ease of LPing
- Update prices faster than AMMs to reduce loss from arbitrageurs (benefits both LPs and Traders)
- Composable
Full Writeup on FMMs: What is a Formula Market Maker (FMM)?
Proposal
- 0x Team works with Shipyard Software team to spec out the architecture and engineering estimate for supporting FMMs.
- Based on the estimate, the 0x Foundation makes a grant to whomever is leading the development (ex: 0x Labs or Shipyard Software).