Breaking the Curve: The Impact of Stablecoin Depegging on Liquidity and Liquidations

Yaron Velner
Risk DAO
Published in
3 min readMar 22, 2023

Stable coin liquidity heavily relies on the properties of Curve Finance’s stable swap formula. We ran our simulation model for liquidations of stable assets, and visualised how the curve inventory size, and the re-pegging velocity affects the ability to liquidate.

We consider an abstract setup, where a generic (imaginary) stable coin, namely USDX, is traded vs USDC on Curve, and a generic lending market lets users borrow USDX against an ETH collateral. Further, the system always prices USDX at $1. This framework is applicable, e.g., to LUSD, MIM, and to some extent also DAI. The simulation could also handle floating oracle price (i.e., not always $1), but in this case, further assumptions on how quickly the oracle is being updated are needed.

During a liquidation process, USDX is supplied in return to ETH collateral, and then the liquidator immediately sells the ETH back to USDX. The ETH to USDX sale is typically done by first selling ETH to USDC, say on Uniswap, and then selling USDC to USDX on a Curve.

We assume a liquidation bonus of 10%, and thus, the liquidator can execute the liquidation if and only if she can sell on Uniswap and Curve with an aggregated slippage of 10% (technically, the price of the last wei should not be lower by more than 10% from the oracle price).

Simulation run

In a run, we plot:

  1. Price trajectory (in red)
  2. Liquidation sequence (blue)
  3. Open liquidations (yellow)
  4. The price in Curve (green)
  5. The Curve USDX balance (purple)
  6. The total liquidity that is available for ETH to USDX liquidations (black)

In a liquidation, the liquidator has to buy USDX, and therefore it immediately increases the price on Curve. However, when USDX is traded above $1, it is unclear how long it will take to re-peg. In the absence of any physical constraints (e.g., DAI’s PSM), we observed that it could historically take days and even weeks (e.g., LUSD).

We assume an exponential decay model, where the Curve imbalance is slowly decaying with a half life period of X days, i.e., after X days, it will be halved (assuming no further liquidations).

In the above simulation, the first few simulations decreased the USDX balance in Curve, but did not have a big impact on the price. Hence, the available liquidity for liquidations was still dominated by the USDC/ETH liquidity. However, additional liquidations occurred before the Curve balance retained to normal ratio. And the later liquidations choked the Curve pool, and effectively drained the available liquidity.

In the simulation depicted below, we double the half life parameter, namely, the price recovery time is slower

Now we see that the price does not re-peg until the end of the simulation, and as a result, some of the liquidations remain open until the end of the simulation.

Finally, we ran the simulation with double the amount of Curve balance.

In this scenario, all the liquidations are handled in a timely manner, and the price of USDX never exceeds 1.05.

About Risk DAO

Risk DAO is a service DAO focused on providing a new, open-source risk assessment framework, associated audits, and dashboards to stress test, monitor, and manage risk in DeFi lending and borrowing protocols as well as L1 and L2 networks.

You can follow us on Twitter here. You can join our Discord here.

--

--