Blockchain Technologies

Smart Contracts Explained
The Ultimate Guide to Understanding Blockchain Smart Contracts

Smart Contracts are a central component to next-generation blockchain platforms.

Blockchain technology is much broader than just bitcoin. The sustained levels of robust security achieved by public cryptocurrencies have demonstrated to the world that this new wave of blockchain technologies can provide efficiencies and intangible technological benefits very similar to what the internet has done. However, blockchains are a very powerful technology, capable of performing complex operations, capable of understanding much more than just how many bitcoins you have currently have in your digital wallet. This is where the idea of smart contracts come in. Smart contracts are already becoming a cornerstone for enterprise blockchain applications and will likely become one of the pillars of blockchain technology. Below we explore what a smart contract is, how it works, and how it is being used.

Blockchain Smart Contract Technology Explained

What is a Smart Contract? Smart Contract Technology Defined

What is a Smart Contract? Image Credit: SmartContract

Smart Contract Definition

Smart contract is a term used to describe computer program code that is capable of facilitating, executing, and enforcing the negotiation or performance of an agreement (i.e. contract) using blockchain technology. The entire process is automated can act as a complement, or substitute, for legal contracts, where the terms of the smart contract are recorded in a computer language as a set of instructions.

Smart Contracts Explained A Simple Explanation of Smart Contracts

Smart contracts provide a viable method of issuing tracking ownership of unique digital representations of value, which we call money.

Smart contracts (also called self-executing contracts, blockchain contracts, or digital contracts) are simply computer programs that act as agreements where the terms of the agreement can be preprogrammed with the ability to self-execute and self-enforce itself. The main goal of a smart contract is to enable two anonymous parties to trade and do business with each other, usually over the internet, without the need for a middleman. The origin and history of smart contracts is much older than bitcoin and dates back to the 1990’s.The term ‘smart contract’ was first coined in 1993 by one of bitcoin's alleged creators, Nick Szabo, and referred to self-automated computer programs that can carry out the terms of any contract.

Traditional vs. Smart Contracts The Current and Future State of Contracts

The future of contracts will likely be a hybrid paper-plus-code model where contracts are verified for authenticity via blockchain, but paper backups are also be filed for the purposes of traditional recourse.

Traditional Contracts

Traditional physical contracts, such as those created by legal professionals today, contain legal language on a vast amounts of printed documents and heavily rely on third parties for enforcement. This type of enforcement is not only very time consuming, but also very ambiguous. If things go astray, contract parties often must rely on the public judicial system to remedy the situation, which can be very costly and time consuming.

Smart Contracts

Smart contracts, often created by computer programmers through the help of smart contract development tools, are entirely digital and written using programming code languages such as C++, Go, Python, Java. This code defines the rules and consequences in the same way that a traditional legal document would, stating the obligations, benefits and penalties which may be due to either party in various different circumstances. This code can then be automatically executed by a distributed ledger system.

Smart Contract Platforms and Companies

How Do Smart Contracts Work? How Do Smart Contracts Work on the Blockchain?

How Does Smart Contract Technology Work? Image Credit: SmartContract

In order to understand how smart contracts work, it is important to first make the distinction between the smart contract code and how/what that code is being applied to. As explained in the article “Making Sense of Blockchain Smart Contracts” by Josh Stark of Ledger Labs, a smart contract can be broken down into two separate components:

  • Smart Contract Code - The code that is stored, verified and executed on a blockchain.
  • Smart Legal Contracts - The use of the smart contract code that can be used as a complement, or substitute, for legal contracts.

Step-by-Step Explanation of How Smart Contracts Work

We explain the general steps as to how a smart contract would work on a distributed ledger:

  1. Coding (What goes into a Smart Contract)
  2. Because smart contracts work like computer programs, it is very important that they do exactly what the parties want them to do. This is achieved by inputting the proper logic when writing your smart contract (more can be found here about an Introduction to Programming Smart Contracts on Ethereum). The code behaves in predefined ways and doesn’t have the linguistic nuances of human languages, thus, it has now automated the “if this happens then do that” part of traditional contracts.

  3. Distributed Ledgers (How the smart contract is sent out)
  4. The code is then encrypted and sent out to other computers via a distributed network of ledgers (i.e. Distributed Ledgers). If this is done via public permissionless blockchain such as bitcoin, the contract is sent out similar to the way that a network update of a bitcoin transaction would occur. This can also be done in a permissioned or hybrid distributed ledger platform such as the R3 Distributed Ledger.

  5. Execution (How it is processed)
  6. One the computers in this network of distributed ledgers receive the code, they each come to an individual agreement on the results of the code execution (. The network would then update the distributed ledgers to record the execution of the contract, and then monitor for compliance with the terms of the smart contract. In this type of system, single party manipulation is overted because control over the execution of the smart contract is no longer possible because execution is no longer in the hands of a single party.

Smart Contract Example Smart Contract Example in the Music Industry

Blockchain Smart Contract Music Example

Blockchain smart contract technology can provide singnificant transparency improvements to the music industry.

There are countless practical use cases where blockchain technology is being applied to achieve significant benefits. While smart contracts are used in most of these applications, the industry where blockchain smart contract technology can provide the most benefit is in the music industry.

In the music industry, either the musicians themselves or a record label own the rights to the music put out. As such, those rights entitle them to receive residual payments every time the music is used for commercial purposes. The issue with this system is knowing who owns these music rights and ensuring that payments are being distributed to the proper parties (and, at the next level down, which performers, songwriters and producers) in addition to what their split of the royalties are.

Enter the world of blockchain smart contracts for the music industry. In this case, a public blockchain could keep track of ownership rights. These rights could be publicly accessible to all, and because public blockchains are append-only (i.e. add only) databases, we know that this information has not been altered. Furthermore, the transfer of royalty payments could be real time and the smart contract could ensure that each time a payment is generated for a given work, the money would be automatically split according to the set terms, and each party’s account would instantly reflect the additional revenue.