Clipper
Search…
How Clipper Works
Clipper was built by master craftsmen and works because of disciplined design tradeoffs.

Clipper's Design Principle

Clipper was designed to give traders the best prices anywhere (including fees, slippage and gas) for their small trades (under $10,000) on the pairs they trade the most.

How Clipper Achieves Best Prices

Price in automated market makers is composed of three parts: Fees, Slippage and Gas.
For those new to AMM design, Fees are typically charged on every trade. They are measured in "bps" (basis points - one basis point is one percent of one percent aka 0.01%), and primarily go to cover the cost of capital from liquidity providers. Slippage is the amount by which the price worsens as the trade size increases. Finally, Gas is the computational cost charged by the blockchain.
The core insight behind Clipper's design is that, counterintuitively, more liquidity can be bad for retail traders. In general, Most AMMs want as much liquidity as possible because it means less slippage. But after a certain point, more liquidity doesn't have any material benefit for small trades; it only continues to reduce slippage on large trades. Put another way, the slippage on a $1,000 trade is virtually the same with a $100m pool and a $1b pool. Even worse, more liquidity can be counterproductive! That's because the more liquidity in an AMM, the more the AMM needs to charge traders in fees to attract such large amounts of liquidity. This ends up better for large traders, but will make for worse prices for smaller trades. Consequently, on most AMMs retail traders are subsidizing whales!
To counter the harmful effects of liquidity overprovisioning on retail traders, Clipper has a smaller, capped liquidity pool and lower fees. A smaller pool means that there is more slippage on Clipper, but the decrease in fees more than offsets the increased slippage for small trades. On the other hand, on large trades the slippage outweighs the decrease in fees. That makes Clipper a terrible place to make large trades! But that's ok, Clipper is for the self-made trader. Let the whales and hedge funds go elsewhere.
Here is how Clipper minimizes prices, part by part:
  1. 1.
    Clipper minimizes Fees by capping the size of the pool. Because there is less capital in the pool, these small fees ($) are still enough to provide a sufficient yield (%) to attract the necessary liquidity.
  2. 2.
    Clipper Minimizes Slippage with (a) a new invariant that slips less than a Constant Product Market Maker and (b) a consolidated liquidity pool for any number of N assets, which is far more capital efficient than fragmenting liquidity across traditional two-asset pools. This design means Clipper has remarkably low slippage relative to its pool size.
  3. 3.
    Clipper Minimizes Gas by using a novel closed-form invariant that is a simple equation and thus computationally inexpensive to calculate. Through dedicated optimization, trading with Clipper should take about 100k gas, on par with the CPMM.
The result is that, mathematically, on trades that are small relative to the pool size, lower fees outweigh higher slippage so the price decreases relative to the CPMM. Conversely, on trades that are large relative to the pool size, the higher slippage will outweigh lower fees so the total price will tend to be less competitive than the CPMM.
There is no “magic” here, but rather an intentionality in design that provides better pricing for small trades at the expense of worse pricing for larger trades. Clipper's builders made this trade-off because Clipper is built specifically for small trades.

How Clipper Mitigates Impermanent Loss

In AMMs, liquidity providers (LPs") contribute their capital in exchange for a pro rata share of trading fees. This generates positive yield. However, LPs also suffer from Impermanent Loss, which happens when the price of their tokens change compared to when they were deposited in the pool. This generates negative yield.
This isn't just a problem for LPs; It also matters to traders. This is because the more LPs lose to impermanent loss, the higher fees traders will need to pay to offset those losses and attract sufficient liquidity to the pool. Thus, it is important that Clipper's design also minimizes impermanent loss.
Clipper accomplishes this by considering external market prices through an oracle in addition to the ratio of assets in its pool. That means that, when the markets move, Clipper updates its prices without needing arbitrage flow to equilibrate the pool size.
In addition, Clipper is very sensitive to arbitrage flow, primarily because the pool size is small. For every unit traded in the same direction, slippage increases a little bit. Soon after about $10k in one direction, the exponentially growing slippage starts to outweigh the arbitrage opportunity! In other words, when market prices move a lot quickly, prices on Clipper quickly get so bad that trades will flow elsewhere. That minimizes impermanent loss, though it doesn't remove it altogether. Despite occasional claims to the contrary, it is impossible to design a market maker that eliminates impermanent loss.
Note that it’s not technically large trades that incur large slippage, but rather any trades after the ratio of assets in the pool materially diverges from what would be expected based on the last oracle update. That means if there are 10, $1k trades in the same direction, the next $1k trade would become unprofitable (cumulatively $11k of trades in the same direction). In mathematical terms, prices are linked to the partial derivatives (i.e. gradient) of a certain multivariate scalar function. In other words, slippage is path-independent and trade-shredding has no benefit. Put another way, when the market moves quickly away from Clipper's last Oracle update, directionally similar flow causes Clipper's prices to get so bad that Clipper effectively steps out of the market until the Oracle has time to update.
Clipper uses Oracles to determine its profits, and uses slippage to deter material arbitrage flow to give the Oracle sufficient time to update.

The Math

We have included a whitepaper describing the theoretical development of Clipper's market maker and orienting it in a continuum between the CPMM and a fixed-price market maker. You can read it [here].
Last modified 5mo ago