open-dollar / od-contracts

Open Dollar stablecoin contracts
https://OpenDollar.com
Other
55 stars 8 forks source link

Research - Oracle Fallback #318

Closed 0xdavinchee closed 7 months ago

0xdavinchee commented 10 months ago

Original Problem: A single oracle creates no redundancy, e.g. Chainlink downtime/misreport issue Goal: Research existing options of oracles that are used in the industry and also consider other options/strategies that can be thought of to prevent risk from this issue.

0xdavinchee commented 10 months ago

Original message sent to @pi0neerpat:

gm - circling back to the oracle research. Given my current context, I want to make sure I understand the issue and what the ideal output of this spike/investigation is. Current status quo: OpenDollar uses a single chainlink oracle to determine the price of different assets, how much OpenDollar can be redeemed, and whether positions can be liquidated. The issue with this is there is a single point of failure where if the oracle gives incorrect pricing information, this would impact the expected behavior of the protocol and it would no longer function "properly". This is ultimately an issue because the protocol's security is now tied to the cost of manipulating the oracle. More specifically, if the cost to manipulate the oracle the protocol uses is less than the amount gained from the protocol not functioning properly, then this is a severe issue.

Ideal output: given the status quo, the ideal output from this issue is designing an oracle system which is more robust. We should look at what the leading lending protocols are doing, specifically the oracle solutions they may be using, but also the way they are utilizing the price information from the different protocols.

If I understand correctly, the research and investigation of these other oracle solutions is to understand what is out there, and to see if any of them are a good fit to be integrated into OpenDollar and to be further implemented in a solution which allows multiple oracles to be used.

0xdavinchee commented 10 months ago
Screenshot 2023-12-22 at 19 57 47
pi0neerpat commented 9 months ago

In discussion with RedStone they mentioned an example of their system being used in DeltaPrime.

https://github.com/redstone-finance/redstone-oracles-monorepo/blob/main/packages/evm-connector/contracts/data-services/AvalancheDataServiceConsumerBase.sol

One idea could be to create a circuit breaker to invalidate the oracle read if the difference in price between the primary feed (Chainlink) and a secondary feed (eg RedStone) reaches a certain threshold

daopunk commented 9 months ago

Chainlink also suggest using a circuit breaker in their docs: https://chain.link/education-hub/market-manipulation-vs-oracle-exploits

daopunk commented 9 months ago

Wait for feedback from auditors

pi0neerpat commented 7 months ago

No longer pursuing