Pricing Engine
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.
1. 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, Close Only mode activates — restricting all interactions except liquidations, closing positions, and removing liquidity.
High Volatility Flag — threshold ranges by asset class:
Crypto majors (BTC, ETH, SOL, ZEC, BNB)
~2%
Metals (Gold, Silver)
0.66%
Forex (EUR, GBP, AUD, USDJPY, USDCNH)
0.33%
Crude Oil
2.2%
Natural Gas
0.6%
Solana DeFi & Meme assets
~5%
Tokenized Equities (xStocks)
11.7%
Exact thresholds are tuned per asset based on individual risk profile, and may change as the protocol gathers more market data. The current flag status for any market is visible in the trade UI.
2. 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 confidence interval exceeds 1% of the reported price. To ensure continued functionality and consistent on-chain pricing during these periods, Flash uses a proprietary backup oracle system.
Volatility-Based Fee
During High Volatility Flag periods, a fixed fee is added to new position opens and size increases. This protects LPs and replicates the wider spreads that orderbook venues experience during volatile conditions.
Applied only on opening a position or increasing size on an existing position
Not applied on closes, liquidations, or stable conditions
Specific bps vary by asset risk profile
Live volatility fees are surfaced in the trade UI when the High Volatility Flag is active on the market you're opening into.
Wide Confidence Intervals with Moderate Volatility
If the volatility flag is not set but the Pyth confidence interval is wide (>1% of reported price), the protocol continues using Pyth's reported price. The wide confidence interval alone does not necessitate corrective action.
3. Price Impact Fee
Price Impact is an adjustment based on the deviation between entry price and the actual price reported by Pyth's pro feeds at the instant a position is opened. It accounts for potential latency in landing oracle update transactions and the discrete nature of sampling frequency used in recording published prices — preventing misuse of implicit latency by malicious actors and safeguarding the pool from offering stale prices.
More details here.
4. Handling Stable Coins
For stable coins, we assess the difference between the reported price and the $1 benchmark 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 conversions from nominal USD values to token amounts (swaps, removing liquidity) are calculated based on the $1 benchmark.
5. Size-Based Spread
As trade size scales from $1 toward $1,000,000, progressively wider spreads are applied to entry and exit prices. This compensates the pool for absorbing larger directional exposure and discourages outsized single-trade impact on pool health.
Spread scales continuously with trade size
Higher-liquidity markets see tighter spread ranges than thinner ones
Spread is reflected directly in the quoted entry/exit price before order confirmation
Live size-based spread for any trade is visible in the trade UI as part of the quoted price before you submit the order.
Conclusion
These guidelines outline our approach to managing price volatility and handling wide confidence intervals across diverse market conditions. The framework is intentionally parameter-driven — specific thresholds, fees, and spreads are tuned per asset and adjusted as the protocol gathers more market data. The trade UI is the authoritative source for current values applied to any open or pending position.
Last updated
Was this helpful?

