Conversation

3) Oracles in crypto are essential and interesting and messy and imperfect. Why is that? Well, some things don't exist on-chain. Like presidency, or BTC on ETH (sorta), or centralized exchange orderbooks. So you can do all the magic you want, but in the end, it's all an API.
1
23
4) Like, in the end, it's Coinbase's API, or FTX's, or Binance's, spitting out a market price. That's how centralized exchange indexes work, it's where most DeFi oracles end up getting data, etc.
1
11
5) You can put whatever multisigs you want in front of it, but that's where the data comes from in the end. So it'll all rely on that.
1
13
6) What happens outside of DeFi? Well, centralized exchanges pull each other's API feeds for indexes, and then sanity check them, and discard them if they seem "crazy". E.g. FTX bounds any exchange at 30bps away from the median.
2
11
7) And outside of crypto? How do equity futures expire (ESA, MESA, etc.?) Well.... ...sort of the same thing. They pull in some API feeds from other centralized services, like the NYSE, or KRX.
2
10
8) And is it ever wrong? Yup! Sometimes it's wrong. Sometimes they disseminate data that makes no sense, and the answer is "yeah idk some dude was supposed to type in '103.54' but instead they typed '130.54', sorry about that."
2
10
9) And then the things consuming the datafeeds have to decide what to do, and how to handle erroneous data. This problem isn't specific to crypto.
1
7
10) For instance what do you have to deliver to create SPY? What if they file they disseminate has a typo? The answer is, well.... sort of messy. There are people at every step, trying to do something "reasonable".
1
9
11) What can you do about this? There are basically 2 types of answers in DeFi. (a) just accept it. Do the best you can: have multiple datafeeds, multiple people parsing, and automated outlier handling (e.g. 3 3 141312 3 3 --> 3 3 [excluded] 3 3).
1
8
Replying to
13) How can you do that? Well, you can go back to "idk some trusted people write it there". Or--in some cases--you can have the market decide. If your on-chain data is "a DEX price", and Bob thinks the oracle is way too low, he can go and buy on the DEX.
1
11
15) But that only works if the assets are tradable on-chain. And if not, then you're back to the drawing board. So what would a "decentralized prediction market" look like? Well much of it might be decentralized. But query how the oracle works. In the end, who writes to it?
1
11