A boat in a container shipyard

What is a Formula Market Maker (FMM)?

Clipper’s Polygon deployment is a new kind of market maker, a Formula Market Maker (FMM), which combines the best qualities of an AMM and a PMM.

Written by

Abe Othman

Published on

February 14, 2022

Not an AMM, not a PMM

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.

Is the mechanism on-chain or off-chain?

AMMs are generally exclusively on-chain mechanisms. PMMs are generally exclusively off-chain mechanisms.

Clipper’s FMM architecture is a hybrid mechanism that has both on- and off-chain components, but because it requires **off-chain integration, we believe it is fair to say that Clipper FMM is closer to a PMM in this regard.

Is there transparency in how prices are calculated?

AMMs have prices calculated through formulas that might be complex (e.g., Curve) but are always transparent, in the sense that they are a function of state variables and can be derived based on those variables.

PMMs are calculated using proprietary formulas, often involving arbitrage (either statistical or actual) with centralized exchanges. PMM prices are a black box, and even their operators are often unaware of precisely how prices are set.

Clipper’s FMM on both the Mainnet and Polygon use the same formula from the invariant function family developed in our whitepaper on market-making:

https://github.com/shipyard-software/market-making-whitepaper

That whitepaper itself derives from my earlier research on positive homogeneous market makers:

https://dl.acm.org/doi/10.1145/2509413.2509414

As you can see in the whitepaper, our market-making formula takes in both current market prices and asset exposure in the pool, and uses a single parameter “k” (between 0 and 1) to balance between the aims of maximizing current value according to the price oracles (strict risk neutrality is recovered at one extreme, when k=0) and risk aversion that traders are more informed than the market maker. (The Uniswap-style CPMM formula that only takes into account asset exposure is recovered at the other extreme, when k=1.) However, because the off-chain price oracles in an FMM are updated much more quickly than on-chain price oracles in an AMM, Clipper’s FMM on Polygon can be tilted much closer to risk neutrality (smaller values of k) since these oracle prices are more likely to reflect current asset prices. Whereas Clipper’s AMM on Mainnet sets k=0.5, Clipper’s FMM on Polygon is currently set to the much smaller k=0.1. This has the effect of making the Clipper FMM on Polygon price closer to its external oracle asset prices - and much more capital efficient.

Is pricing discriminatory?

AMMs have non-discriminatory pricing, offering the same rates to all potential traders.

PMMs have discriminatory pricing that changes based on the identity of the requestor. For instance, a PMM may offer different quotes to platforms like Paraswap and 1INCH if one of them were to charge a fee.

Clipper’s FMM has open, non-discriminatory pricing, offering the same rates to all traders whether they come from our website, an aggregator, or a trading bot. As a result, Clipper FMM is closer to an AMM in this regard.

Who are the Liquidity Providers (LPs)?

The LPs in AMMs are community participants and liquidity is crowdsourced by folks depositing their assets. Sometimes, as in Mainnet Clipper, LPs may come with caps or restrictions. However, asset deposit and withdrawal in AMMs is done in a non-custodial manner where LPs interact directly with a smart contract on the blockchain, rather that sending their assets to a person, firm, or bank account.

In contrast, a PMM is an opaque pool operated by a trading firm or hedge fund. The LP base of PMMs is typically the trading firms’ own capital or capital raised from institutions specifically for trade. (One key distinction is that we believe that LP in a PMM may qualify as a security under US law since it relies on the performance of the trading firm operating the mechanism. Consequently, retail traders should never expect to be able to LP in such mechanisms.) Even the most open PMM system, Hashflow, asks potential LPs to commit at least $250k for many months and to go through a human-mediated process for contribution.

Clipper’s FMMs are open to anyone who joins Clipper’s Discord, and come with a per-wallet participation cap to ensure that whales do not crowd out smallholders, and are totally non-custodial. In form and spirit, Clipper FMM is closer to an AMM in this regard.

Is the DEX easily composable?

AMMs are typically highly composable, allowing for the easy chaining of the input and output from multiple DEXs.

PMMs typically do large, one-shot transactions that are not designed to be composable. Since PMMs have firm quotes, there is no slippage and so transaction chaining can easily lead to reverts.

Clipper’s FMM system is designed to be easily composable. Clipper’s FMM has significant flexibility around slippages in the input and output amounts, meaning that it can be chained in multi-hop transactions without reverts. Regarding composability, Clipper FMM is closer to an AMM.

FMMs are the Future

We believe that FMMs represent the future of market making in DeFi. Because they price transactions in a transparent and formulaic manner, like an automated market maker, they are not opaque or secret and do not rely on any specific performance of or custody by a third party like a PMM. But because they use faster price updates than an AMM, they can eliminate much of the loss from arbitrageurs.

The performance of the Clipper FMM on Polygon is encouraging, and over the next few weeks the community will see Clipper contract rollouts on many new chains, all using this FMM logic.

Written by

Abe Othman

Published on

February 14, 2022

March 29, 2024

What are stablecoins used for?, Clipper expands to Base, the latest AdmiralDAO proposals, and more.

February 28, 2024

A positive omen for DeFi derivatives, Clipper's new facelift, the latest AdmiralDAO proposals, and more.

Keep up with DeFi by subscribing to Shipyard’s industry newsletter

We’ll send you the latest news about DEXs, stats on our products, interesting articles, and CEO Mark Lurie’s thoughts on it all.

Thank you! Your submission has been received!
Oops! Something went wrong. :-( Please try again.