A brief explanation of smart contracts and an oracle’s role in them
What is a smart contract?
A smart contract acts as a digital, objective third party that completes a task upon the completion of a set of conditions. To phrase another way, a smart contract is a hard coded program that upon the completion of conditional statements, executes pre-defined clauses. A smart contract is typically used to store some sort of information on the blockchain. The advantage of a contract stored on the blockchain instead of in a centralized fashion (i.e. handled by a company with servers like GoFundMe, or even a physical third party like a bookie or lawyer) is that a smart contract is immutable, decentralized, and resilient to censorship by attribution to the blockchain it is on. A crowdfunding or sports betting operation can easily be shut down by an authority who deems it should not exist. But it becomes much harder to ban such a process when it is stored on the blockchain in all of its iterations. The applications of smart contracts certainly don’t stop there, either. There are far-reaching applications in the legal world, financial sector, and beyond. Everything from census taking to lease agreements have the potential to be revolutionized by this exciting new and disruptive technology. A huge variety of real world information and outcomes can be represented with smart contracts.
How does an oracle facilitate smart contracts?
“But wait”, you say. This is all well and good, but how does a smart contract know whether its real world conditions have been satisfied or not? How can simple code determine the temperature, score of a football game, or other such real world metric without referencing some authority of the outside world? It independently cannot, and to properly function, a smart contract needs this information fed to it by a reliable source called an Oracle. The truth is though that these Oracles are not always 100% reliable. See our previous article https://deor.medium.com/-8c05c2f8472b for examples of how singular centralized Oracles have failed in the past. A smart contract lives and dies by the quality of data that is fed to it. If it lacks information or receives manipulated information and executes on it, that is a permanent mistake forever chiseled into the blockchain. It is this inherit unreliability in the old smart contract to oracle communication model that the Decentralized Oracle DEOR token remedies. By establishing a reputation system among several oracles, DEOR effectively removes what was previously a single point of failure in the system resulting in a much more robust model of smart contract implementation.