5 ms·
I've been wondering the same for a few weeks but can't be bothered checking. My uneducated inference is that an oracle is a data source and you can hook into i
by el_dev_hell 5y ago
I've been wondering the same for a few weeks but can't be bothered checking.
My uneducated inference is that an oracle is a data source and you can hook into it from the smart contract. The oracle seems to live off-chain and live on a traditional server/DB.
Please correct me if the above is way off!
- chrisco255 5y agoAn oracle is a source of truth for information about the outside world to a smart contract. The smart contract doesn't actually call the oracle. This is because smart contracts don't self-execute and can't make external http calls. So a smart contract pauses, and waits for an oracle to trigger an update function. Because oracles have a lot of power over a smart contract (not all smart contracts need them, by the way), they have to be done in a secure way. The market leader in decentralized oracles is Chainlink. They power hundreds of DeFi applications.
- nieve 5y agoAt that point can they really be considered purely code contracts anymore? If their execution requires a trusted third party some of the rhetoric goes out the window.
- lifeformed 5y agoI think they're just other smart contacts that use many data sources. Like if you wanted an oracle that returned the result of a baseball game, you'd have it check various newspaper websites and have it make sure the results were all the same. To attack it, you'd have to attack all the newspaper sources. It's still a weak point, but not quite a single point of failure.
- chrisco255 5y agoThey're sort of hybrid networks at that point, but Chainlink oracles are decentralized: each function is run by several nodes (31 for the BTC/USD or ETH/USD price feed, for example). The nodes have to come to consensus and individual nodes are slashed if they produce bad or late data. You can see an example of a LINK feed here: https://data.chain.link/ethereum/mainnet/crypto-usd/eth-usd https://data.chain.link/ethereum/mainnet/crypto-usd/eth-usd Decentralization is a spectrum. But I would argue this approach is far more secure than naive oracle implementations. Not all applications need oracles. It depends on whether your smart contract needs information about the world outside of the blockchain.
- ric2b 5y agoWho owns those 31 nodes? Who gets to choose which nodes are part of the calculation?