I have recently written about Impermanent Loss (“IL”) and how it is essentially the same thing as Loss Versus Rebalancing (“LVR”) and in the course of discussing it (thanks Alex) I realized that we defined IL badly. I will here redraw the arguments made in this post in a more thorough manner, and provide an improved definition of IL, or rather DL (for Divergence Loss), because under the new definition there is nothing impermanent with this loss. For more in-depth explanation of some of the techniques employed here — notably on the linkage between AMMs and option pricing — I recommend to read my paper on theammbook.org first, specifically chapter 4.The IL is currently defined as the opportunity loss against HODL, ie the difference of the 50/50 initial position simply held, and the value of the AMM position. If the define xi as the ratio between the price now and the price when the position was entered into, then IL isIL as function of normalized price xiIf prices return to the original point then xi=1 and therefore the loss becomes zero — hence the moniker “Impermanent”. People have pointed out that there is nothing impermanent about this loss if prices do not return to their initial value— as one hopes on a pool like WBTC/USDC where one expects for WBTC to moon — and therefore the term “Divergence Loss” or “DL” was coined. We will see below that properly defined “IL” is non-zero even if xi returns to be unity, therefore we will drop the IL moniker from this point onwards and refer exclusively to DL.To understand the issue with the current definition of DL, I first want to go back to the basics and consider a fixed income investment — say $100 when rates are at 5%. If I give those $100 away and I get $100 back in a year risk free (no upside, no downside), then I emphatically did not break even: at 5% interest I should have got back $105, so if I made a loss of $5. I will now show that the same thing applies for an CFMM liquidity position: it should make grow over time, and after a year if xi returns to 1 I should get back 1+r times my initial investment with the rate r>0 to be determined below. If I only get back my investment, my loss ratio is r.So how much should an investment into an AMM liquidity position earn? The method I use can be applied universally, but for simplicity I will restrict myself to a CFMM, ie k=x*y, and I will assume that the pool is ETH/USDC for ease of language. In this case it is well known that (assuming efficient markets throughout this paper)at any point of time, the value of the ETH position is exactly the same as that of the USDC position; this holds for every numeraire, but for simplicity I assume “dollar value”if the position was contributed at a normalized price ratio of xi=1, then at any point in time in the future, the value of the total position is proportional to sqrt(xi)The best framework for analyzing AMMs is that of a self-financing trading strategy. The latter is defined as a time varying multi-asset position (possibly long and short), where the value of the position only changes because of market moves. Importantly, no assets are to be added or removed, they can only be traded. In this case, trading must happen at exactly the current market price, therefore trading does not impact the value of the portfolio. Because of point (1) above, it is clear that an AMM LP position can be considered a continuously rebalanced strategy that ensures that at any point of time 50% of the portfolio value is in ETH and 50% in USDC.To show that this implies (2), it is easier to go backwards: we assume that we have a strategy whose value at any time is k(t) sqrt(S) where S is the spot exchange rate (and, for reference, xi=S(t)/S(0)). If we delta hedge this profile then the Cash Delta (see here, section 4) is CashDelta = S d/dS sqrt(S) and it is easy to see that also CashDelta = 0.5 sqrt(S). In other words: when delta hedging the square root profile, at any point in time 50% of the cash is invested in the risk asset, and therefore the other 50% in the numeraire. Therefore the 50/50 strategy is the replicating strategy for the square root profile. /QEDI have shown here (section 4.3) that the Black Scholes constituent operators are diagonal on power law functions, ie if we haveDefinition of a power law function in the price ratio xithen the constituent differential operators of the Black Scholes PDE becomes diagonalDiagonal action of Black Scholes constituent operators on power law functionsand therefore the Black Scholes PDE simplifies on this eigen basis to the following ordinary differential equation (ODE)Black Scholes ODE on the power law eigen basisNote that the term in parentheses is just a constant, so this ODE is of the well-known form f’ = kf, and we know that the solution to this ODE is simply f(t)=f(0) exp(kt).The square root profile is the power law function at alpha=0.5, so we can plug in 0.5 into the above equation to get the factor k which becomesk = sigma²/8 + 0.5(r-d)+rAssuming zero rates, and moving to the decay time scale tau = 1/k we findsolution to the Black Scholes ODEandtau value for square root profile with zero ratesNow we have all we need to define Divergence Loss properly. The key insight here is that an CFMM investment strategy — 50/50 in each asset — should yield a return of exp(t/tau) sqrt(xi). Instead it yields sqrt(xi). This is an outright loss, akin to the “getting back $100 after a year at 5% rates” scenario discussed above. Therefore the DL has two componentsthe difference between HODL and the CFMM value, andthe difference between the CFMM value and the fair value of the 50/50 self financing investment strategyCorrect definition for divergence loss, including the Gamma correction termIn summary, the Gamma / time correction term — corresponding to the Gamma income a 50/50 strategy should make — is an integral part of the calculation of the Divergence Loss. Including this term makes Divergence Loss strictly greater than zero for t>0, therefore the moniker Impermanent Loss is no longer adequate. When calculating DL in this way it is equivalent to the LVR measure, with the DL being the macroscopic measure, and the LVR being the equivalent infinitesimal measure.What we all got wrong about calculating Impermanent Loss was originally published in Bancor on Medium, where people are continuing the conversation by highlighting and responding to this story.

Read More

Leave a Reply