PR implements a pessimistic oracle based on Pragma's data as described in #503 with a fallback to Switchboard if Pragma fails.
In detail, the Pragma oracle reads spot and TWAP prices, compares them and returns the lower one. However, if spot Pragma price does not pass our validity checks, the oracle module returns an Err. In that case, Seer uses the fallback Switchboard oracle. It should always 🤞 return a price, because it is not calculated onchain (since that's how Switchboard works).
PR implements a pessimistic oracle based on Pragma's data as described in #503 with a fallback to Switchboard if Pragma fails.
In detail, the Pragma oracle reads spot and TWAP prices, compares them and returns the lower one. However, if spot Pragma price does not pass our validity checks, the oracle module returns an
Err
. In that case, Seer uses the fallback Switchboard oracle. It should always 🤞 return a price, because it is not calculated onchain (since that's how Switchboard works).Supersedes #523. Better than #569. Resolves #378.