Smart contracts, agreements written in code which get activated when predetermined conditions are met, are turning out to be one of the most revolutionary applications of the blockchain. Through smart contract, users including smart devices in the Internet of Things (IoT) networks, can interact and perform business transactions with one another without the third party enforcer services.
In a simple smart contract, an action of one of the counterparts triggers an activation. For example, the receipt of payment into an account can trigger a file to be sent to the sender of the money. The payment could also trigger a product shipping procedure.
More complex smart contracts however might require to be activated by data streaming external to the blockchain on which they are launched. For example a betting decentralized application on the blockchain might rely on the outcome of real world game matches to determine winners and losers. A smart contract on that decentralized application needs to be tapped on to make payment to those who make accurate predictions. This can only happen if it receives accurate results of the matches in question.
The role of oracles
This is where an oracle comes into play.
An oracle is a node, a platform or a channel that stands between the blockchain and the outside world. Its’ primary function is to relay data which is necessary for the execution of smart contracts from outside into the blockchain. The particular oracle for use is coded into the smart contract itself.
Different blockchains use the oracle in their respective ways. Some blockchains, such as Ethereum, use third party oracle services. These are separate projects that connect to it through Application Programming Interfaces (APIs). The third party oracles can be decentralized like the platform Chainlink or centralized like Oraclize.
Meanwhile, some blockchains have the oracle functionality coded into their base protocol. Ludos is one of those that belong in this category, making it more decentralized as a service platform.
Decentralized oracle designs are more in line with expectations of the majority of users especially within the crypto space. This is because users do not have to worry about compatibility issue. Furthermore, the functionality is well thought of right from the foundation of the platform.
Incentives to provide good data
In both centralized and decentralized oracles, it is the individuals who are tasked with sourcing for data and feeding it to smart contracts that need it. This might appear as a weak point since individuals can choose not to provide the correct data.
However in most architectures this concern is taken care of and handled through robust game theory models. Akin to the maintenance of blockchain themselves, in oracle designs, good actors are rewarded and those who try to game the system are penalized.
In most instances, those providing data through the oracle system are required to stake value in the form of native coins. If they share the correct data, they stand to receive a reward and get back their staked coins. However, if they provide the wrong data, they are not rewarded and also risk losing the money staked.