In our last blog entry, we learned what a smart contract is. It needs external information like the result of a soccer game for example to execute itself. A smart contract cannot source this information directly from a sports webpage, because it is not on the blockchain. Information that is on the blockchain like a transaction for example gets validated by the network nodes. What the majority is voting yes or true, is the truth. Only one answer can be true. This doesn’t work with external data that is off-chain as there is no such mechanism. It would lead to different responses which is not in accordance with the concept of blockchain technology. Here is where the blockchain oracle comes into play. It is an intermediary between a blockchain based application like the smart contract and the offline world. It verifies external data and then transmits it to the blockchain.
If we go back to the example from our last blog post, we had Alice and Bob that made a bet on the outcome of the soccer game. Alice bet on Team A and Bob on a tie. They wrote everything into a code of a smart contract, so no one could cheat. Both paid one coin to the smart contract. Team A ended up winning. The blockchain oracle transfers this information from the sports webpage to the smart contract. It makes it compatible for the smart contract. Once it receives the information from the oracle of Team A winning the game, it automatically returns both coins to Alice. Depending on the functionality of the oracle, there are different types. There are software or hardware oracles. The software oracle uses data that is online available like the temperature for example. The hardware oracle on the other hand provides data that comes directly from an electrical device like RFID sensors in the supply chain. An oracle can be inbound or outbound. An inbound oracle delivers data from the offline world to the blockchain. An outbound oracle does the exact opposite. It brings the data from the smart contract to the off-chain world. Oracles can be centralized or decentralized. A centralized oracle has a one single point of
information. A decentralized oracle has many sources. In the case of Blockchain Presence, we are talking about an inbound centralized software oracle.
The conclusion is that the blockchain oracle is an interface between the off-chain and the on-chain world.
Hopefully our blog series simply explained helped you to get a better understanding for the terms blockchain, smart contracts and oracles. If there are questions, send us a message.