How Clipper Works

Clipper’s design is contrary to that of most DEXs in several ways, the most significant being that it utilizes a unique market maker mechanism called the Formula Market Maker (FMM) rather than the Constant Product Market Maker (CPMM) used by most DEXs.

FMM Architecture

Clipper’s FMM is a hybrid mechanism that has both on-chain and off-chain components. It uses a more sophisticated pricing formula than the constant function used by CPMMs. The formula is part of the invariant function family that was developed in the original whitepaper on market making. Unlike CPMMs, whose pricing formulas only consider token ratios in pools, the FMM pricing function utilizes both token ratios and external, real-time market prices from centralized and decentralized oracles. Clipper’s FMM performs pricing computations off-chain then verifies and validates them on-chain to prevent malicious quotes and determine if there have been any significant price changes between the time pricing data was pulled off-chain and applied to an on-chain swap. Clipper’s sophisticated pricing formulas and real-time price oracles are highly efficient; keeping the hard work of solving formulas off-chain and verifying them on-chain avoids high gas costs while keeping the entire system trustless and transparent.

While the above describes how the FMM operates on the Polygon, Optimism, and Arbitrum versions of Clipper, on Ethereum it performs the comparative price computations and validations off-chain against the on-chain data. This further reduced Clipper’s gas usage on Ethereum, resulting in even lower gas costs for both traders and LPs—both relative to the previous iteration and other leading DEXs.

How Clipper Avoids Impermanent Loss

There’s a major misconception that impermanent loss (IL) is an unavoidable feature of DEX liquidity pools. The misconception came about because most DEXs today utilize a CPMM and CPMMs are inherently prone to IL due to how they balance liquidity pool assets. Tokens on CPMM-based DEXs are priced by a constant function (x*y = k) and IL is caused by arbitrageurs exploiting discrepancies between the prices set by the CPMM and external market prices. While arbitrage activity keeps CPMM prices in line with the rest of the market, the profit arbitrageurs extract is siphoned from LP holdings.

💡 Despite its name, impermanent loss is a real risk that can have lasting and detrimental effects on LP returns. LPs realize this loss if upon withdrawing their stake from the pool, the value of the assets they retrieve is lower (at current market prices) than if they had simply held them.

Impermanent loss can be avoided by using a more sophisticated market maker with better pricing information. Clipper’s FMM uses both the token ratios in pools and decentralized price oracles to balance assets, instead of a constant function. The price oracles make it so that when external market prices change, Clipper’s prices update without the need for arbitrage trades. The absence of impermanent loss contributes to superior LP yields!

Note: This doesn’t mean that Clipper LPs are always profitable; all yield-generating opportunities come with a degree of risk. Clipper tracks the rebalancing portfolio you may have learned about in Modern Portfolio Theory. This portfolio provides optimal risk-adjusted beta exposure while generating free alpha from volatility along the way. It’s the approach that won a Nobel Prize in 1990.

Last updated

#221: Integrating with Clipper RFQ

Change request updated