A smart contract is a computer program that runs on theblockchain. A smart contract can be considered as a trustedthird party between non-trusting participants. Smart contractsconsist of a contract storage, a balance, and program code.It can be created and made available for use by any nodein the network, simply through posting a transaction to theblockchain. Smart contract program code is fixed and cannotbe updated once included in the blockchain.Smart contracts are run by a network of miners whoare responsible for maintaining the blockchain. Miners reachconsensus on the execution outcome of the smart contractand accordingly update the blockchain. Once deployed, eachsmart contract is assigned to 160-bit address and is executedwhenever a transaction is created using this address. Duringthe execution of the smart contract its storage might be updated(i.e., reading from or writing to the storage). In addition, asmart contract can exchange cryptocurrency between users.Moreover, a smart contract can invoke and create another smart contract by posting a message, which is not recorded in theblockchain. This message is used by smart contracts either forcreating a new smart contract or for calling functions in othersmart contracts.