(Bashir, 2017, p. 333) In 1994 Nick Szabo, realized that smart contracts could be used in a decentralized ledger. Smart contracts are also called digital contracts, blockchain contracts, self-executing contracts. Smart contract are converted in computer code, and then are stored and replicated on the system while the network of nodes that participated in the blockchain supervises them. (Buterin, 2017) The smart contracts were included also in Bitcoin but in very limited way. Trying to give a definition to a smart contract, we could say that is a secure and unstoppable program representing an agreement that is automatically executed and enforceable. (Bashir, 2017, p. 335) In another definition, smart contracts are computer programs that can be consistently executed by a network of mutually distrusting nodes, without the arbitration of a trusted authority. (Bartoletty & Pompianu, 2017, p. 1) From the definitions of smart contract their main characteristics are derived •Written in a language that a computer can understand •Includes agreements between parties in the form of business logic •Automatically executed when conditions are met •Enforceable, all contractual terms are executed even if adversaries are present •Secure and unstoppable, thus designed for fault tolerance and execution in reasonable amount of time. •Deterministic, thus the smart contract can be run in any node on the network and reach at the same result. (Bashir, 2017, pp. 336-339) At the following example of a smart contract, an option contract between two parties is written into the blockchain. The triggering event for a smart contract to be executed could be the reach of an expiration date or a strike price that is hit. At that point where the specified criteria are met and are coded within blockchain, the smart contract executes. The smart contract is distributed into the blockchain network, where the actual event can be shown that took place but at the same time the privacy of the actor participated is maintained. Smart contract not only define the rules and the penalties that are set by an agreement, but at the same time enforce the obligations that the participating parties have. (Buterin, 2017)
Figure 6: Visual presentation of a Smart Contract Figure 7: Ethereum Smart Contract example
6.1 Oracles The main limitation of smart contacts is their lack of communication with the external world in a sense that internal world is specified by the borders of the blockchain. In that way an oracle works as a bridge between the real world (external) and the blockchain (internal) by providing the requested data to the smart contracts. (blockgeeks, 2017) Oracles is an important component to the smart contract entity. It’s the way for smart contracts to have the ability to access external data that might be required to fulfill the business logic that the smart contract describes.