Formula & Parameters

To determine when an asset is off-peg and initiate the swap, the protocol uses the following formula:

DepegStatus=((MarketPricePegPrice)PegPrice)Depeg Status = (\frac{|(Market Price - Peg Price)|}{Peg Price})

Where:

  • Market Price is the current price of the stablecoin or ETH-pegged asset on the open market.

  • Peg Price is the intended stable price of the asset (e.g., $1 for USD-pegged stablecoins or a 1:1 ETH peg).

If the Depeg Status exceeds a predefined threshold (for instance, 2%), the asset is considered off-peg. The threshold can be customized based on the asset class and volatility expectations.

Example:

  • For a USD-pegged stablecoin: Peg Price = $1.00. If the market price drops to $0.97, then:

DepegStatus=((0.971.00)1.00=3Depeg Status = (\frac{|(0.97 - 1.00)|}{1.00} = 3%)

In this case, the Depeg Status exceeds the 2% threshold, triggering the swap mechanism to move funds out of this stablecoin pool into a safer option.

Last updated