Smart contracts and Oracles. Linking blockchain to the real world.

Gepubliceerd op 5 september 2021 om 11:07

The so-called Oracles are important components of the smart contracts (also called blockchain 2.0). Without Oracles, smart contracts cannot be executed properly. In this article I will discuss the smart contracts and the associated Oracles. Why are Oracles such important parts of smart contracts?


Smart contracts

A smart contract is a computer program that can be executed automatically if certain predefined conditions are met. A smart contract is not a 'contract' in the legal sense.
The parties determine the conditions and agree them in a computer program. The idea behind smart contracts is that parties themselves can agree without the involvement of intermediaries. If parties sign a digital signature on the smart contract, the smart contract is placed on the blockchain and executed automatically.
An example where smart contracts can be created is between the tenant and his landlord. The landlord can draw up a smart contract with the tenants. The smart contract contains the most important details of both parties, such as the name, contact details, bank account details and information about the lease itself, including the lease amount and payment date. When a smart contract executes itself on the pre-defined lease payment date, it automatically withdraws money from the tenant's bank account and deposits it into the landlord's account. This saves the landlord from monthly rent statements in advance, from reminding the tenant to pay, and from hounding the tenant once the late date has passed, let alone eviction notices, court dates, and attorney fees.
Smart contracts are stored on the blockchain and are automatically executed when a transaction is processed. And because data on the blockchain is immutable - cannot be changed or manipulated by anyone - and once agreed, smart contracts should help build trust between all parties, as neither party can tamper with the contract or its terms.

Blockchain Oracles

Parties A and B discuss the weather in July 2022. A thinks and feels that it will be 20 degrees Celsius on average in July 2022. B thinks that the weather in July 2022 will be 30 degrees Celsius on average. A and B agree that whoever is the closest should pay the other 100 euros. A and B agree on this via a smart contract. The person who is closest automatically gets 100 euros credited to his or her bank account.
Another example is the outcome of elections. We could place a bet on the next Dutch elections. We agree on an amount for the winner and conclude the agreement in a smart contract. After the election, the smart contract will use an Oracle to retrieve the correct election result from verified sources and close the deal. In this case, the winner is automatically paid.
The problem here is that how can the smart contract know what the weather will be in July 2022 or what the right (verified) sources are. The smart contract itself does not know. A blockchain Oracle is a service that provides smart contracts with data outside the blockchain. An Oracle makes the connection, as it were, between the blockchain and the outside world. An Oracle is the extra layer that provides the smart contracts with external sources. There are various types of Oracles and they all work differently. What they all have in common is that Oracles use verified external information on the blockchain.

What are the different types of blockchain Oracles?

Software Oracles

Software Oracles interact with online information sources and send them to the blockchain. This information can come from online databases, servers, websites - basically any data source available on the web.

Hardware Oracles

Some smart contracts need a connection to the real world. Hardware Oracles are designed to extract information from the physical world and make it available for smart contracts. Such information can then be transmitted via electronic sensors, barcode scanners and other devices that collect data.

Incoming and outgoing Oracles

Incoming Oracles send information from external sources to smart contracts, whereas outgoing Oracles send information from smart contracts to the external world.
An example of an incoming Oracle is when a sensor that measures the temperature and passes it on to a smart contract. An example of an outgoing Oracle could be the use of a smart lock (when payment is received on the blockchain address of the smart lock, the smart lock in the physical world will unlock automatically).

Centralised and decentralised Oracles

A centralised Oracle is managed by a single entity and is therefore also the sole provider of information for the smart contract. The use of only one source of information can be risky, as the effectiveness of the contract depends entirely on the entity managing the Oracle.

Human Oracles

Sometimes people with specialist knowledge in a particular field can also be deployed as Oracles. They can research and verify the authenticity of information from various sources and translate that information into smart contracts. Since human Oracles can verify their identity using cryptography, the possibility of a fraudster falsifying his identity and providing corrupt data is relatively small.

The blockchain Oracle problem

A major problem with a blockchain Oracle is the sources that are consulted by the Oracle. When a source is 'attacked', it is not only the source that is no longer reliable. All smart contracts that rely on this source are also affected. In theory, a hacker could therefore attack a source in order to influence the smart contracts and the money associated with them.
A challenge for the projects that want to make the blockchain Oracle therefore lies in the way the information is retrieved from the outside world. If this is done via a single source, the blockchain is in fact no longer decentralised. Multiple Oracles, multiple sources and a reward structure for correct information are indispensable for good Oracles.
Unfortunately, since Oracles are not part of the blockchain, they are not covered by the security mechanisms that public blockchains can offer. The problem of trust between third-party Oracles and the execution of smart contracts remains largely unsolved to date.

Conclusion

A reliable mechanism that establishes communication between smart contracts and the external world is vital for the global acceptance of blockchains. Without blockchain Oracles, smart contracts would have to rely solely on information already in their networks, which would significantly limit their capabilities.
Blockchain Oracles therefore bring us a little closer to a future in which blockchain can play a major role. It builds a bridge between the world as we know it now, and a world as it could be if we use blockchain (and smart contracts).
The development of smart contracts and Oracles is still in its early stages, but it is already worth taking into account! Since blockchain technology is increasingly being accepted by established parties, I would dare to say that smart contracts will play a larger role in the distant future.

I published this article previously on my LinkedIn page. This article was written on February 27 2021. This article was updated on September 5, 2021.

BTC address: bc1q3nnm8m2vrsv8med8a38dl37g8l3mm4wa7ph7wj 

ETH address: 0x38b84E2D3B50F83A067A7488C1733180651f418A

Reactie plaatsen

Reacties

Er zijn geen reacties geplaatst.