Formula & Parameters
Last updated
Last updated
To determine when an asset is off-peg and initiate the swap, the protocol uses the following formula:
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:
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.