Dapp Use Cases
Oracle Validation
Assert that an oracle is working as expected
Use Case
An oracle is a mechanism used to fetch data from an external source and use it to make decisions within a protocol. Make sure that an oracle is working as expected. Manipulation of oracles is a very common attack vector. An oracle can be manipulated to return a price that is not representative of the true price of an asset. Oracles are used in many DeFi protocols, including lending protocols, derivatives protocols, and more.
Explanation
This assertion makes sure that the oracle has been updated within the last 10 minutes and that the price doesn’t deviate more than 10% from the pre-state price. There are two triggers, one for the liveness of the oracle and one for the price.