Smart contracts

The term smart contract was initially coined by Nick Szabo, who is a computer scientist, a legal scholar, and the inventor of Bit Gold, in 1994. He is a living legend in the world of cryptocurrency for his research into digital contracts and digital currency. He is even considered to be Satoshi Nakomoto by some people, although he rejected that claim.

Nick Szabo originally defined smart contracts as follows:

"A smart contract is a computerized transaction protocol that executes the terms of a contract. The general objectives of smart contract design are to satisfy common contractual conditions (such as payment terms, liens, confidentiality, and even enforcement), minimize exceptions both malicious and accidental, and minimize the need for trusted intermediaries. Related economic goals include lowering fraud loss, arbitration and enforcement costs, and other transaction costs."

With a vending machine, transaction rules are built into the machine hardware. Transaction rules on a digital asset are built into scripts. That is, the smart contract consists of code. Here are some useful facts on smart contracts:

An Ethereum smart contract can be developed in one of four languages: solidity (inspired by JavaScript), Serpent (inspired by Python, no longer used), LLL (inspired by Lisp), and Mutan (inspired by Go, no longer used). Regardless of the language used, smart contracts are coded in a high-level programming language which needs to be compiled into a low level, machine-runnable language. In the Ethereum smart contract implementation, a VM approach similar to the concept of Java VM (JVM) is used. The Ethereum VM is called EVM. Smart contract scripts are converted to EVM-runnable code called bytecode. The opcode is then deployed to the Ethereum blockchain for execution. Currently, a research-oriented language is under development, which is called Vyper and is a strongly typed Python-based language.