Inertiaprotocol for its European Cash-settled options.
These options use a 1 hour TWAP from of the underlying price as the fixing price for settlement from Pyth and Switchboard Oracles.
Friktion uses the following criteria to determine valid oracle prices for its TWAP:
- Price != null
- Price > 0
- Confidence/Price < 0.25 to ensure the confidence is tight enough
- Number of valid updates in TWAP period > 60 to ensure freshness.
In case of oracle issues where the number of TWAP updates is less than 60 in the period, then Friktion will use an off-chain calculation for the settlement price. It will take a historical backfill of the settlement period taken from the oracle provider.
If the historical backfill has clearly erroneous data after applying the above filtering, the fixing price will be an off-chain calculation of the 60 minute TWAP taken from exchange capture using the ccxt library.
More information on the Pyth client can be found here:
It is highly unlikely an entity would be able to front-run the oracles used in Friktion. This is because they use centralized exchange liquidity as input, and volt capacities are carefully managed to prevent total deposits from exceeding volume observed across all liquidity platforms. Additionally, the Friktion team is always adapting our auction process to avoid predictability and specifically prevent exposure to these sorts of attacks. Read more about our mitigation efforts here.
Additionally, it is impossible for an adversary to apply flashloans as an attack against Friktion. Volt #1 and #2 are not based on any decentralized oracles or markets that could be included in a flash loans transaction. With the delayed epoch mechanism for processing pending deposits/withdrawals, sudden fluctuations in the price of the deposit token on-chain (or even in the oracle based on CEXes) wouldn't change program state in any fashion. Regarding Volt #3 & #4, the oracles used to mark the value of the margin positions are entirely based on centralized exchange prices (SOL & BTC from Pyth), so a flash loan would be ineffectual.