Smart contracts are contracts that are encoded and stored in the blockchain. Smart contracts enable all parties to instantly confirm the result by automating the execution without the need for intermediaries of agreements. Here, what makes these contracts, which are closed to change and irrevocable, “smart” is that they are suitable for automation. Contracts that cannot be automated, in other words, cannot be executed by a computer program, would not be qualified as “smart”. The subject of a smart contract can only be things that can be digitalized. For example, electronic commitments or digital assets can be exchanged through Smart Contracts. The exchange of digital goods or the transfer of a certain amount of cryptocurrencies can be accomplished with smart contracts. Asset values that are not reflected in the digital environment, such as a house, a car, or a painting by a famous painter, can also be a subject of the smart contract by being converted into tokens.
Another face of automation is that smart contracts are based on an “if…then” logic. Therefore, the conditions that must be fulfilled for the smart contract code to be executed must be digitally auditable as true or false. For this reason, the existence of open-ended, unclear, and ambiguous notions on the smart contract can cause problems since the smart contract code cannot audit these.
The parameters of computer codes are precise; There is only one true or false. In this sense, smart contracts are also based on smart contract code, which is clear and precise. As a piece of code, the Smart Contract executes commands or instructions on the computer program exactly. Input X always produces output Y. In this sense, smart contracts are deterministic programs. If an issue is not explicitly embedded into the smart contract code, it cannot be considered by the smart contract. Since smart contracts are based on logic rules and mathematical formulas, they consist of code that is not open to interpretation.
If there are abstract expressions such as “just cause”, “fault”, “force majeure”, and “reasonable time”, which are often used in traditional contracts, the smart contract will not give the expected result. Because the smart contract code cannot self-audit such abstract legal expressions or subjective value judgments. That is why the banking and finance sectors, which are suitable for automation, were the first and foremost fields that Smart Contracts preferred. Since these fields can easily adopt new technologies, it is easier to transform the conditions of contracts into a code. However, with the rapid development of technology, many different uses of smart contracts have also emerged.
Data sources outside the blockchain are considered “off-chain”, while data already stored on the blockchain is considered “on-chain”. Blockchains are not connected to the internet; they are deliberately isolated from external systems. For this reason, Smart Contracts running on the blockchain cannot connect to the internet to search and obtain external data that needs to be detected for the smart contract to be triggered. This also reveals a fundamental inadequacy of Smart Contracts. Smart contracts cannot spontaneously interact with data and systems outside their native blockchain environment. They need data input from trusted external sources: the Oracles. Although the term Oracle is translated into Turkish as “soothsayer”, this translation cannot fully reveal the meaning.
Oracle can be defined as interfaces that act as a bridge between the smart contract and the outside world. Accordingly, a person, a program, or a website can provide the information needed to trigger the smart contract by acting as an oracle. In smart contracts, oracles are used to obtain information, such as price changes, weather information, whether the risk has occurred, sales figures, etc. For example, a smart contract can be coded that allows the passenger to be automatically paid insurance indemnity when the data that the flight is delayed comes to the smart contract.
Many use cases of Smart Contracts require access to real-world data and off-chain events. In the DeFi (“decentralized finance”) sector, where smart contracts interact, financial data on assets and markets are needed. Oracles are particularly important for dynamic NFTs and GameFi as well. In addition, oracles are significant for the governance of DAOs (decentralized autonomous organizations), whose backbone is smart contracts. In supply chains, the internet of things acts as an oracle and enables the supply chain to be monitored and operated transparently.
Oracles also carry some risks: Data transmitted by Oracles directly determines the results of smart contracts. Therefore, if the smart contract is wanted to be executed exactly as expected, the oracle source must also be accurate/correct. Whereas smart contracts cannot confirm whether an oracle is providing accurate data. In other words, oracle does not have the “reliability” feature, which is one of the main features of the blockchain. Especially in cases where people are involved in smart contract processes as a “trusted person” oracle, the data provided to the smart contract may not be correct or accurate. Decentralized oracles are being developed to prevent problems such as data manipulation, false or undesirable results, and downtime that may arise in this way.