Detecting Depegs: Towards Safer Passive Liquidity Provision on Curve Finance

ArXiv ID: 2306.10612 “View on arXiv”

Authors: Unknown

Abstract

We consider a liquidity provider’s (LP’s) exposure to stablecoin and liquid staking derivative (LSD) depegs on Curve’s StableSwap pools. We construct a suite of metrics designed to detect potential asset depegs based on price and trading data. Using our metrics, we fine-tune a Bayesian Online Changepoint Detection (BOCD) algorithm to alert LPs of potential depegs before or as they occur. We train and test our changepoint detection algorithm against Curve LP token prices for 13 StableSwap pools throughout 2022 and 2023, focusing on relevant stablecoin and LSD depegs. We show that our model, trained on 2022 UST data, is able to detect the USDC depeg in March of 2023 at 9pm UTC on March 10th, approximately 5 hours before USDC dips below 99 cents, with few false alarms in the 17 months on which it is tested. Finally, we describe how this research may be used by Curve’s liquidity providers, and how it may be extended to dynamically de-risk Curve pools by modifying parameters in anticipation of potential depegs. This research underpins an API developed to alert Curve LPs, in real-time, when their positions might be at risk.

Keywords: Bayesian Online Changepoint Detection, Depeg Detection, Liquidity Provision, StableSwap Pools, Risk Management, Cryptocurrency (Stablecoins)

Complexity vs Empirical Score

  • Math Complexity: 4.0/10
  • Empirical Rigor: 7.5/10
  • Quadrant: Street Traders
  • Why: The paper applies established Bayesian Online Changepoint Detection (BOCD) algorithms rather than developing novel mathematics, focusing on practical implementation with backtested results on real Curve Finance data from 2022-2023, and mentions a deployed API.
  flowchart TD
    A["Research Goal: Detect<br>Stablecoin/LSD Depegs<br>for Curve LPs"] --> B["Methodology: Construct Metrics &<br>Bayesian Online Changepoint Detection BOCD"]
    B --> C{"Data Sources:<br>2022-2023 Curve StableSwap Pools<br>including UST & USDC depegs"}
    C --> D["Computational Process:<br>Train BOCD on 2022 UST Data"]
    D --> E["Validation:<br>Test on 2023 USDC depeg<br>and 17 other months"]
    E --> F["Key Findings:<br>Detected USDC depeg 5 hours early<br>with few false alarms"]
    F --> G["Outcome: Real-time<br>Alert API for LPs"]