Hey dude! Seems that blockchain cant access data which is Off Chain, basically it only knows what’s on its own chain, and then now what?
That’s where oracles come in. Oracles are trusted third parties that provide blockchains with reliable data from outside their own code. This data can be anything from stock prices to weather reports to election results.
Oracles are essential for the development of better and more useful blockchains. They allow smart contracts to interact with the real world and enable new and innovative applications. For example, oracles can be used to create synthetic tokens that track the price of real-world assets, or to develop crop insurance contracts that pay out if there’s a drought.
How do oracles work?
Picture this: blockchains are like hermits in a secluded castle, completely oblivious to the outside world. Oracles, in this analogy, are like daring adventurers who journey into the real world, gather valuable data such as stock prices, weather conditions, or sports scores, and then bring this treasure trove back to the blockchain. In simpler terms, they act as messengers, transferring crucial real-world information into the digital realm.
How Do They Provide Information? 📡
The process is kinda similar to a Sherlock Holmes investigation, just kidding lol. Oracles use APIs and other data-fetching techniques to gather information from various sources. These sources can be anything from weather websites and financial databases to IoT devices like sensors. Once they’ve collected the data, they cryptographically confirm its authenticity and reliability ( depends some do confirm and some doesn’t ).
There are three main types of oracles:
- Hardware oracles: read information from real-world sensors, such as thermometers, weighing scales, and NFC tags.
- Software oracles: find information on the web, such as stock market data and website traffic statistics.
- Human oracles: collect and consolidate human data, such as reviews and expert opinions.
Centralized vs. Decentralized Oracles:
Now, let’s talk about the central question: are oracles centralized or decentralized? Well, the answer is both!
Centralized Oracles:
Some oracles are like trusted librarians. They’re centralized entities that fetch and verify data. Imagine a respected news agency providing election results. However, this centralization can be a weak link, susceptible to manipulation or errors.
Decentralized Oracles:
Decentralized oracles source data from multiple, independent providers. Think of it as cross-referencing information from different history books. If most books agree, you can trust the information. Decentralized oracles, like chainlink, use a network of nodes to ensure the data’s accuracy and prevent a single point of failure.
Blockchain oracles can be further classified into two types based on their direction of data flow ( I got to know about this recently after looking at Hyper Oracle’s white papers ):
- Input oracles: retrieve data from off-chain sources and feed it to the blockchain. like chainlink
- Output oracles: retrieve data from the blockchain and deliver it to off-chain systems. like Hyper Oracle
Why are oracles important?
I mean its kinda obvious, they allow blockchains to interact with the real world. without oracles blockchain is like frog in a well
Challenges with blockchain oracles
One of the biggest challenges with blockchain oracles is ensuring that the data they provide is accurate. This is because oracles are often centralized, which means that they are vulnerable to attack or manipulation.
Another challenge is that oracles can be a single point of failure. If an oracle is compromised, it could provide inaccurate data to smart contracts, which could lead to financial losses or other problems.
Conclusion
Oracles are kinda important you know…