Gauntlet Analysis: Market Risks of Listing LP Tokens as Collateral

There have recently been proposals in the forums by both Aave Companies and Llama on listing LP tokens as collateral on Aave. Below, we provide an analysis of the market risks to help the community make an informed decision on the revenue/risk tradeoffs.

LP shares are undoubtedly one of the most prevalent assets (net liquidity, number of asset holders) in cryptocurrency. In particular, Uniswap V2 and Balancer style LP shares have strong properties under large liquidations (c.f. “How Liveness Separates CFMMs and Order Books”). However, choosing collateral factors and loan-to-values for these assets can be complicated due to the nature of arbitrage against these assets.

Gauntlet is continuing to analyze the potential market risks of the specific proposals. In the meantime, we wanted to provide a more general analysis of enabling LP tokens as collateral in this post.

There are two main cases to consider:

  1. Borrowing asset A against asset A/B LP shares
  2. Borrowing asset C against asset A/B LP shares

We believe understanding this distinction is crucial to choosing LTVs.

Case 1:

TL;DR

Let’s assume a user borrows asset A against asset A/B LP shares. This use-case can present significantly more risk to the protocol than the alternative use-case of depositing A and B assets separately as collateral and then borrowing asset A.

Why?

  • Arbitrage loss (loss vs rebalancing) is a non-linear function. For example, if the price of B declines, then the value of the A/B LP share (the collateral) will be lower than the value of simply holding A and B (arbitrage loss + impermanent loss). But importantly, the function of arbitrage loss + impermanent loss with respect to the price decline of B is not linear (equation 12 in Gauntlet’s paper; with greater B price decline, the loss increases even more, and faster).
    • Of course, the impermanent loss depends on the price trajectory and the weights of the pool (50/50, 80/20, etc.). If, for example, A’s weight is 80%, and A/B LP shares are used to borrow A, then the risk can be lower than if A’s weight were 50% (all else being equal)
  • Liquidations of LP shares can significantly impact liquidity. When a liquidation occurs, there needs to be liquidity so that liquidators can sell the collateral asset back to the borrowed asset (at low slippage) such that the liquidation will be profitable to them. However, this is complicated with LP shares. LP shares represent liquidity itself - so when a liquidator is “selling the collateral,” they are withdrawing liquidity from the liquidity pool. Thus, when they are liquidating a position, they are directly hurting the liquidity of the asset they aim to liquidate (and thus increasing their cost of liquidation).
    • The impact of this is dependent on the size of the LP token position. Assuming that the proposed strategy from Aave Companies and/or Llama gains massive adoption, there would be large LP token positions on Aave. The larger the positions are, the more negative the liquidity impacts will be if liquidations occur.
  • Collateral factors on A/B LP tokens should be the minimum collateral factor of A and B AND discounted because of the expected impermanent loss.

Details

In our paper, A Note on Borrowing Constant Function Market Maker Shares, we prove two main things: an equivalence relationship between collateral factors of borrowing asset A against asset B as collateral and collateral factors for borrowing against an A/B LP share and an options replication result (which @eboado has mentioned). In equation (1), we show a relationship of the form for a generic Balancer share where cfCFMM is the collateral factor for borrowing against the CFMM, and cf is the collateral factor for borrowing against the underlying:

The left-hand side of this equation shows the CFMM collateral factor for borrowing A against A/B LP shares, whereas the right-hand side shows the normal collateral factor times a factor dependent on the weights of the LP share (wA,wB), the quantities of collateral asset qB, borrowed asset qA, and price pAB. This says that under a no arbitrage assumption, you can compute a dynamic LTV or collateral factor such that borrowing A against A/B is equal to borrowing A against B. One can show, as we do in equation (2), that equivalent borrowing against an LP share is lowered when qA > qB pAB(t) . This suggests that if one believes in an LTV or collateral factor cf for borrowing A against B, then we need to discount it sufficiently such that , where is a liquidation tolerance that can be tuned. In particular, we should think of the collateral factor for borrowing A against an A/B LP share as needing to have the following form:

where DiscountFactor(1) = 1 and DiscountFactor(0) = 0. Fitting this discount factor in practice depends on understanding how often the LP share is traded against (e.g., high accrued fees let us use a more aggressive discount factor) and how frequently arbitrage occurs. One thing to note is that the discount factor needs to account for liquidations that execute against the same LP share. Part of the issue is that if liquidations execute against the LP share, you can have the LP share value disagree with the Chainlink value and complex attacks such as the xSushi attack become possible (albeit with a lower profitability margin). Modeling the discount factor and its dynamic behavior is crucial, but a simple way to measure what it should be is to choose a very conservative cf first and gradually increase it based on monitoring the above features.

Case 2:

TL;DR

Let’s assume a user borrows asset C against asset A/B LP shares. This use case can present even more risk than Case 1.

Why?

  • First, it is important to recognize that when a liquidator is trying to lock in profit, they essentially pay back C (possibly by taking out a flash loan), withdraw A/B liquidity, sell A for C, sell B for C, and hope they end up with more profit in numéraire terms than how much debt ( C ) they paid back. Thus, the liquidity of both A for C and B for C is paramount. If slippage for one of those trades is very high, then the liquidation won’t be profitable (and if the position isn’t liquidated, can lead to protocol insolvency).
  • The tricky thing is, if A/B are correlated, then when the price of C crashes (relative to numéraire or either A or B), the borrowed asset (which is C) crashes faster than you might expect if it was a borrow against either A or B alone.
  • Why is this the case? It’s because cross-asset correlations cause asymmetric price impacts that lead to arbitrage opportunities, which end up generating higher costs to liquidators (thus disincentivizing liquidators to carry out liquidations)
    • Suppose that the liquidator sells A for C, and B for C. If Selling B for C causes significant price impact on B (because the liquidity is low), then now there exists an arbitrage opportunity (if we assume the relative price of A and B has remained constant up until this point). As a result, the arbitrage trade that follows causes the price of C to crash even more. This is problematic as the liquidator trades C back to their numéraire (their base asset, such as a stablecoin). As a result, the price of C crashing (from the arbitrage) results in additional cost to the liquidator. Coupled with other costs to the liquidator (gas costs, flash loan fee, etc.), this may render the liquidation unprofitable to the liquidator.

Details

We cover how to reason about this mathematically in Appendix A of the same paper. We construct a relationship between the collateral factors for borrowing C against A and C against B and that for borrowing C against A/B LP shares. You will note that the condition from case 1 (which was an equality) has been weakened to an inequality. Part of the reason for this is that even if we assume no-arbitrage, one has to account for the correlations between assets A, B, and C. It is possible for assets A and B to be correlated and assets B and C to be correlated, but assets A and C to be anticorrelated (c.f. Simpson’s Paradox, Cointegration). Why does this impact borrowing asset C against asset A/B LP shares?

If we think about asset A/B LP shares as a fixed-weight portfolio being rebalanced by arbitrageurs, we effectively need to consider the following “liquidation condition”:

Normal collateral factors can be set only depending on the mean and variance of the price process pAC. But for LP shares, you need to model the entire covariance structure of assets A, B, and C. Why? Even in no-arbitrage there is a correlation triangle between trading three assets.


Image pulled from a quant finance textbook

This triangle has edges equal to the volatility of each asset pair, whereas the cosine of the angle of each term represents the correlation between the different asset pairs. The law of cosines allows you to compute the correct change of numéraire to write everything only in terms of two assets plus the asset correlations. This excess correction lets you write the variance of one currency in terms of the other two, e.g.,. This last term — worsens LTV / collateral factor behavior. Why you might ask? It basically says if A/B are correlated, then when the price of C crashes (relative to numéraire or either A or B), the borrowed asset crashes faster than you might expect if it was a borrow against either A or B alone!

Now, this is all done in no-arbitrage — in reality, there are liquidity constraints, and you may have asset C/A synchronized with the oracle price faster than asset C/B. In such conditions, the asset should be liquidated even sooner than expected because we’re measuring the liquidation condition against delayed data. As such, again, we should start with lower collateral factors than either the C/A collateral factor or C/B collateral factor. One suggestion is cfC,A/B CFMM = 0.25 min cfC,A,cfC,B where cfC,A is the existing collateral factor for borrowing C against A (and similar for cfC,B).

Conclusion.

There is a lot of extra risk, even in no-arbitrage (perfect conditions), with borrowing against LP shares. Our analysis shows that the CFMM collateral factors should be lower than any of the associated collateral factors until we observe some stability and can compare how CFMM loans compare to raw underlying loans.

8 Likes

Very interesting writeup, Could you please clarify this part a bit more:

At the end of the day, afaik, the value of USDC/ETH LP token, does not depends at all at the arbitrage losses, but rather only at the price of USDC and ETH. If anything, there might be some extra profits due to swap fees.

For example, say at present ETH = 1k USDC, and the LP value is $1. And further it has 50:50 ratio between ETH and USDC. Then when ETH = $250, the amount of ETH will be doubled, the amount of USDC will be halved, and the LP value would be at least (4 * 250 + 500) / 2000 = $0.75. Afaik it can only be higher than that thanks to swap fees. But cannot be lower than that.

What is it that I am missing? Afaik there are no arbitrage losses, and the impermanent loss function is actually sub linear.

2 Likes

Thanks, @yaron and Risk DAO, for looking into this. Impermanent loss (loss vs. holding) and loss vs. rebalancing are undoubtedly crucial in setting risk parameters for LP tokens.

Loss vs. rebalancing (LVR) and loss vs. holding (IL) are two different frameworks to understand the AMM. The LVR framework assumes LPs are continuously rebalancing the portfolio, which better captures the profit extracted by arbitrageurs. Please refer to Tim Roughgarden’s talk at SBC '22 to better understand the LVR framework. For simplicity, we dive into loss vs. holding below, which is more intuitive to comprehend via example.

The math you outlined above is incorrect. One of the fundamental equations in DeFi is x*y=k. Under trades without removing/adding liquidity, k never changes (assuming no fees). With a 50/50 ETH/USDC pool, if ETH = 1k USDC, and the LP value is $1, then the pool has 1 ETH and 1000 USDC and:

  • x*y=k translates into 1 * 1000 = 1000
  • If LP value is $1, then this means that the user has 1/2000 ownership of the pool (as you implied in your formula above). We’d note that if it is a 50/50 portfolio and you own x%, then you own x% of each asset.
  • If ETH goes down to $250, then x (the quantity of ETH tokens in the pool) would be 2, and y (the quantity of USDC tokens in the pool) would be 500 after arbitrageurs rebalance the pool.
    • x*y=k translates into 2*500=1000. The weights remain equal (the pool is 50% ETH, 50% USDC). k has remained constant.
    • You doubled k in your math, but k should be constant under this scenario.
  • So now, the LP who had 1/2000 ownership of the pool has 1/2000 of 2 ETH and 1/2000 of 500 USDC, which translates into a total of $0.50. It would not be $0.75 that you stated above.
    • This represents a 50% loss from the LP’s original position (which was $1).
    • If the LP had instead HODLed the $1 in the form of 1/2000 ETH and 1000/2000 USDC, they would have instead had $0.625. Thus, the impermanent loss is (0.50-0.625)/0.625=-20%.
  • To conclude, impermanent loss function is not sublinear here. Of course, fees act as a counter to the loss.

Risk parameters for Aave should be tuned with a strong understanding of the impermanent loss function and loss vs. rebalancing of the LP tokens.

1 Like

I think you are right about the actual math. but still 50% decrease for a price drop of 75% is sub-linear.
My point was that arbitrage losses, impremenant loss and all other kind of losses are already embedded in the price of the LP token, which is highly predictable given the prices of the underlying assets (which are of course hard to predict). And the volatility of the LP token is highly predictable given the volatility of the underlying assets. In fact, afaik the volatility is ETH/USDC lp token vs USD is exactly half of ETH volatility.

Also for reference, MakerDAO give higher ltv for their ETH/DAI uniswap v2 lp token wrt ETH (with the same stability fee).
MakerDAO system is different as it has caps, and therefore some of the concerns you expressed in the writeup might be applicable to aave but not to maker. So my comment is only about potential further losses, and whether the loss is sub linear or not.

Obviously I didn’t try to do any rigorous analysis as of yet, but i am curious why one have to understand/analyze all these losses, rather than just analysing the LP token as a black box with 50:50 holdings (with xy=k, and x/y = price), and ignore the fees. All losses are embedded in this black box model to my understanding, and I am trying to see what is it I am missing.

(*) The liquidity considerations you mentioned are also valid, and could change the picture, but at this point I am trying to figure out the loss aspect.