Appendix: Math

Setup

Each day we have five relevant values:

  • Yesterday’s asset prices in dollars, p’

  • Today’s asset prices in dollars, p

  • Yesterday’s (human) quantity vector, q’ on a per LP token basis

  • Today’s (human) quantity vector, q on a per LP token basis

  • Our target wealths vector, v, which we take to be wealth fractions:

Observe that v should tend to be proportional to the actual wealth (q_i*p_i) on each asset i.

Calculating Daily Returns & Benchmarks

All of these benchmarks are designed so that 0 represents no change. Since the values are expected to be small, they may not need to have log taken for additive basis points.

Daily $ Returns

This measures how much the portfolio increased in $ terms since yesterday.

Daily Crypto Basis Returns

This value will be negative if we would prefer yesterday’s portfolio to today’s portfolio at today’s prices.

Rebalanced Portfolio Benchmark

This is our target benchmark for Clipper: our daily dollar gain should track it closely and ideally outperform.

Observe that a rebalanced portfolio can outperform a static (”held”) portfolio consisting of any (!) initial combination of the assets themselves. For instance, imagine the two-asset case consisting of a risky asset and a stablecoin. On day one, the risky asset doubles in price. On day two the risky asset returns to its original value. It can be verified that a 50-50 rebalanced portfolio will return 1.125x, vs. 1x for simply holding any combination of assets for the two days.

CPMM Loss Benchmark

In the CPMM, we have that:

Day-to-day, the portfolio of the CPMM changes to have wealth proportional to the new set of prices. By working out this constant log-sum, we get the following expression for how much “impermanent” loss a CPMM mechanism takes on:

This value is at most 0 when the prices are the same. Clipper’s crypto performance (loss or gain) should substantially outperform this benchmark.

Last updated

#221: Integrating with Clipper RFQ

Change request updated