Oracle update on PRIME
* Priced at NAV, circuit breaking when deviates from DEX, from fixed range, from TWAP
* Over the past year, oracle infra has silently caught oracle provider failures, bad deviations, and saved multiple bad liquidations
* RWA pricing is 10x more complex than pricing bitcoin and is indistinguishable from risk management
Together with FBTC release we also released an oracle composition section. This comes after almost a year long oracle infra upgrade process.
In this particular case, FBTC price is priced as:
Exchange Rate x MostRecentOf BTC/USD.
(a multiplication chain of two items)
1) FBTC exchange rate (typically at 1) is how much BTCs per FBTC, capped at 1, but with circuit breaker below 0.99.
- Capping the exchange rate at 1 allows for protection against various infinite mint attacks
- Circuit breaker at 0.99 ensures the oracle stops updating and forces the market in reduce only mode (can repay, and deposit, cannot borrow more or withdraw if still debt). Hitting his circuit breaker means something seriously wrong is happening and needs investigation.
2) MostRecentOf (aka Resilient) BTC is the most recent BTC/USD of Pyth Pull, Chainlink, Pyth Lazer. This oracle returns the earliest of these 3 sources as long as they are within 8% of each other and neither is older than 2 hours. The deviation tolerance should be chosen as the typical 2 hour (or whatever window you choose) volatility where two of 3 can be stale but be allowed to heal, while the third is ticking along, but is not too far from stale values.
- MostRecentOf (aka Resilient) has silently saved several issues over the past year where one oracle or another failed but the others worked fine, and also paused when some oracles were dislocated from each other. Extremely happy with this, we've been testing it for months.
Some other notes:
* In general I think we will see more kind of circuit breakers across oracles in DeFi. There are edge cases where a lot of judgement has to be involved but the market should be allowed to go in reduce only mode.
* With more RWAs and complicated assets coming on chain, oracle infra becomes more and more important but also more complex. Long gone are the days when you can just simply slap a vanilla oracle over an asset and be done.
* Testing oracles is a slow process as the failure is typically infrastructure related, rather than volatility related and they happen infrequently.
* A few more oracle infra upgrades being shipped which we will update soon.