Oracles
Friktion uses
Inertia
protocol 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.
Symbol | Oracle Provider | Pubkey |
---|---|---|
SOL | Pyth | H6ARHf6YXhGYeQfUzQNGk6rDNnLBQKrenN712K4AQJEG |
mSOL | Pyth | E4v1BBgoso9s64TQvmyownAVJbhbEPGyzA3qn4n46qj9 |
BTC | Pyth | GVXRSBjFk6e6J3NbVPXohDJetcTjaeeuykUpbQF8UoMU |
AVAX | Pyth | Ax9ujW5B9oqcv59N8m6f1BpTBq2rGeGaBcpKjC5UYsXU |
STSOL | Pyth | Bt1hEbY62aMriY1SyQqbeZbm8VmSbQVGBFzSzMuVNWzN |
STEP | Switchboard | 4bTCjzmtdRgK4ZvdaxX1Fx1Z3h6iApfM5qoaAhQBJAk j |
SBR | Pyth | 8Td9VML1nHxQK6M8VVyzsHo32D7VBk72jSpa9U861z2A |
FTT | Pyth | 8JPJJkmDScpcNmBRKGZuPuG2GYAveQgP3t5gFuMymwvF |
LUNA | Pyth | 5bmWuR1dgP4avtGYMNKLuxumZTVKGgoN2BCMXWDNL9nY |
scnSOL | Switchboard | DpzEKDSszosuzRUdRYzEcEbt6iZ4xhVEANQSRAYDYw8h |
SRM | Pyth | 3NBReDRTLKMQEKiLD5tGcx4kXbTf88b7f2xLS9UuGjym |
MNGO | Pyth | 79wm3jjcPr6RaNQ4DGvP5KxG1mNd3gEBsg6FsNVFezK4 |
RAY | Pyth | AnLf8tVYCM816gmBjiy8n53eXKKEDydT5piYjjQDPgTB |
ETH | Pyth | JBu1AL4obBcCMqKBBxhpWCNUt136ijcuMZLFvTP7iWdB |
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.
Last modified 3mo ago