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:

  • A smart contract is immutable.
  • A smart contract is permanent.
  • A smart contract is timestamped.
  • A smart contract is globally available.
  • A smart contract is a digitized legal document.
  • A smart contract is a computer protocol intended to facilitate, verify, or enforce an agreed contract between trading parties digitally.
  • Smart contracts allow for execution of transactions without the third party as an intermediary. The transactions are auditable and irreversible.
  • A smart contract moves digital coins, executes a conventional payment, or transfers a digital asset, or even delivers real-world goods and services.
  • For a third-party-involved business transaction, for instance, buying/selling a house, escrow accounts are often used to temporarily store the trading parties' money. With a smart contract, no escrow account is needed. Smart contracts eliminate the need for escrow accounts since they are guaranteed to be executed for transferring the money and assets.
  • Smart contracts provide more security than traditional contract law and their transaction costs are only a fraction of other transaction costs associated with contracting.
  • In the interpretation used by the Ethereum Foundation, a smart contract does not necessarily refer to the classical concept of a contract. It can be any kind of computer program.
  • To deploy and run a smart contract, one has to digitally sign the deployment, similar to sending other data or transactions on the Ethereum blockchain.
  • Smart contracts can be public and are open to developers. This leads to a security issue. If a smart contract has a bug or security loophole, it is visible to all developers. To make the issue worse, such a bug or loophole is not easily fixable, due to its immutability. This gives hackers plenty of time to explore weaknesses and initiate attacks on the Ethereum blockchain. The DAO event was a high-profile example of this issue.

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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.26.217