Pricing Engine
Operational Guidelines for Price Volatility Management
This document outlines our operational guidelines for handling price volatility and wide confidence intervals when utilizing the reported price provided by Pyth as our primary pricing reference. These guidelines ensure accurate pricing and informed decision-making in various market conditions.
Volatility Considerations
We monitor market volatility by comparing the reported price to the exponential moving average (EMA) reported by Pyth's oracles. If the difference between these prices exceeds a predefined threshold, the High Volatility Flag is set for the asset. If it exceeds a greater threshold, then Close Only mode will be active, restricting all interactions except liquidations, closing positions, and removing liquidity.
Thresholds for "High Volatility Flag"
Our protocol currently supports the following assets with their respective volatility thresholds:
BTC
2.1%
4.2%
USDC
0.2%
0.5%
Handling High Volatility
During periods when the High Volatility Flag is active, we use confidence intervals reported by Pyth to establish an acceptable price range. The reported price serves as a baseline, and depending on the accounting being done, there will be a maximum price and minimum price computed by adding/subtracting the confidence interval from the reported price. The protocol in this mode will use the more conservative price when evaluating the state of user positions or liquidity pool shares.
Wide Confidence Intervals
In situations where Pyth's confidence interval is exceptionally wide, indicating potential variance in the reported price, the protocol enters Close Only mode. Prices reported by Pyth are considered invalid if the volatility flag is set and the value of the confidence interval exceeds 1% of the reported price.
Handling Stable Coins
For USDC, we assess the difference between the reported price and the benchmark of $1 to flag volatility. If the difference exceeds the threshold, the High Volatility Flag is set, and we compute the minimum price by discounting the confidence interval from the reported price, while the reported price is established as the maximum price. Instructions involving actions that convert nominal USD values to token amounts, like swaps and removing liquidity, are calculated based on the $1 benchmark.
Size-Based Spread
As traders increase their trade size, progressively wider spreads are applied to their entry and exit prices. The specific spread amounts correspond to the values detailed in the table below:
BTC
0%-0.04%
Volatility-Based Fee
During periods when the High Volatility Flag is active, our protocol adds a fixed fee to new position openings to protect liquidity providers and imitate an order book spread that occurs during volatile times. This fee is only added when opening a position or increasing size on an existing position when the High Volatility Flag is active.
BTC
8 bps
Conclusion
These guidelines outline our approach to managing price volatility and handling wide confidence intervals in our operations. By adhering to these guidelines, we ensure accurate pricing and well-informed decisions across diverse market conditions. We will continue to adapt our strategies to changing market dynamics, maintaining the reliability and effectiveness of our price management practices.
Last updated