post-image

A smart contract is a computer program or a transaction protocol that is intended to automatically execute, control, or document legally relevant events and actions according to the terms of a contract or an agreement. The objectives of smart contracts are the reduction of need in trusted intermediates, arbitrations, and enforcement costs, fraud losses, as well as the reduction of malicious and accidental exceptions.

The code and the agreements contained therein exist across a distributed, decentralized blockchain network. The code controls the execution, and transactions are trackable and irreversible.

Smart contracts permit trusted transactions and agreements to be carried out among disparate, anonymous parties without the need for a central authority, legal system, or external enforcement mechanism.

Smart contracts are made possible by blockchains, a network of computers that work together to enforce rules on the network without requiring the help of an intermediary.

How smart contracts work

Smart contracts work by following simple “if/when…then…” statements that are written into code on a blockchain. A network of computers executes the actions when predetermined conditions have been met and verified. These actions could include releasing funds to the appropriate parties, registering a vehicle, sending notifications, or issuing a ticket. The blockchain is then updated when the transaction is completed. That means the transaction cannot be changed, and only parties who have been granted permission can see the results.

Within a smart contract, there can be as many stipulations as needed to satisfy the participants that the task will be completed satisfactorily. To establish the terms, participants must determine how transactions and their data are represented on the blockchain, agree on the “if/when…then…” rules that govern those transactions, explore all possible exceptions, and define a framework for resolving disputes.

Then the smart contract can be programmed by a developer – although increasingly, organizations that use blockchain for business provide templates, web interfaces, and other online tools to simplify structuring smart contracts.

With conventional contracts, a document outlines the terms of a relationship between two parties, which is enforceable by law. If one Party A violates the terms, Party B can take Party A to court for not complying with the agreement. A smart contract fortifies such agreements in code so the rules are automatically enforced without courts (or any third party) getting involved.

Benefits of smart contracts

  • Speed, efficiency, and accuracy: Once a condition is met, the contract is executed immediately. Because smart contracts are digital and automated, there’s no paperwork to process and no time spent reconciling errors that often result from manually filling in documents.
  • Trust and transparency: Because there’s no third party involved, and because encrypted records of transactions are shared across participants, there’s no need to question whether information has been altered for personal benefit.
  • Security: Blockchain transaction records are encrypted, which makes them very hard to hack. Moreover, because each record is connected to the previous and subsequent records on a distributed ledger, hackers would have to alter the entire chain to change a single record.
  • Savings: Smart contracts remove the need for intermediaries to handle transactions and, by extension, their associated time delays and fees.

What can smart contracts be used for?

Some common ways of using smart contracts are:

  • Multisignature accounts: Funds can only be spent when a required percentage of people agree.
  • Encoding financial agreements: Manage agreements between users. Say, if one person buys insurance from an insurance company, the rules of when the insurance can be redeemed can be programmed into a smart contract.
  • Agreements based on the outside world: Pull in data from the outside world (financial, political, or whatever) with the help of oracles.
  • Provide the third party: Similar to how a software library works, smart contracts can work with other smart contracts in a chain.
  • Storage: Store information about an application, such as domain registration information or membership records. Storage in a blockchain like Ethereum is unique in that the data is immutable and can’t be erased.

Examples of blockchain platforms supporting smart contracts

  • Bitcoin: Provides a Turing-incomplete script language that allows the creation of custom smart contracts on top of Bitcoin like multisignature accounts, payment channels, escrows, time locks, atomic cross-chain trading, oracles, or multi-party lottery with no operator.
  • Cardano: A blockchain platform for smart contracts, using proof of stake
  • Ethereum: Implements a Turing-complete language on its blockchain, a prominent smart contract framework.
  • EOS.IO: A blockchain platform for smart contracts
  • Tezos: A blockchain platform modifying its own set of rules with minimal disruption to the network through an on-chain governance model
See Also