Welcome to Smart Contracts

If you are into cryptocurrencies, because of the ideas and principles of decentralization, enhanced trust mechanisms and efficiency, you will love smart contracts and the idea behind them. This short article will explain some main concepts and discuss the application of smart contracts but also show the advantages and disadvantages of this technology.

An image showing the online interaction between traditional and smart contracts.

Smart Contracts’ Nature

As misleading as it might be, smart contracts are neither smart nor are they contracts. This is a computer program which runs on the blockchain and serves with the if, then, else logic. For instance, me and ABC insurance company “sign” a smart contract ensuring my brand-new car for the next 12 months. I deposit $10 and ABC insurance deposits $90 to the blockchain. If my car gets stolen, or breaks down, then the blockchain deposits $100 to my public address in the blockchain. Else, my car is perfectly fine during those 12 months and after they’ve passed, and the contract has ended, the $100 are deposited to ABC insurance company’s public address on the blockchain. That’s essentially what a smart contract is.

Advantages and Disadvantages

Having said all that so far, smart contracts are not without faults. The table below compares the advantages and disadvantages of this technology.

Advantages:

  • Cost efficiency by eliminates middleman and trustees in many sectors thus lowering costs
  • Process speed increase once set, no human interaction needed, thus speeding up different processes
  • Reliability as data entered in the network cannot be retrospectively changed
  • Autonomy – automatically processed by the network

Disadvantages:

  • No international regulation on blockchains and smart contracts
  • Cannot be changed or amended; the new contract must be signed
  • Security concerns about attempts to hack smart contracts and blockchains having them
  • Young technology not tested in time and many sectors / cases

Types of Smart Contracts

Don’t let yourself be confused by the simplicity of everything so far. As in the real world, where we have one-page contracts and sixty-page contracts, smart contracts to vary from simple to complex. From a digital value exchange, where one family member sends another family member some bitcoins, through basic smart contracts, where a landlord remotely locks tenants out of the property when they have not paid for extended periods of time or distributed autonomous organizations, where self-driving delivery trucks make deliveries, pay local road and toll taxes, but also buy local gas or electricity, all the way to distributed autonomous societies, where groups of people from different parts of the worlds establish complex self-enforcing trade agreements between the countries.

Simple

  • Digital value exchange
  • Smart right and obligation
  • Basic smart contract
  • Multiparty smart contract
  • Distributed autonomous business unit
  • Distributed autonomous organization
  • Distributed autonomous government
  • Distributed autonomous society

Complex

Objects of Smart Contracts

Like traditional contracts, smart or digital contracts have three main integral parts, also known as objects, namely signatories, subject of agreement and specific terms. The signatories are the parties signing the contract. In the example above, me and ABC insurance. The subject of the agreement is what we are signing a contract for. In the above example, the subject of the agreement is those $100. Important, the subject must always be something within the environment of the smart contract – the blockchain – for it to be able to serve its purpose. The smart contract must be able to “control” or hold the subject for everything to work as thought of. The specific terms are that if, then, else logic described in the example above.

Why use a Smart Contract

Everything may sound great so far, but you might be asking yourself, smart contracts seem a lot like everything we have so far … only digital, why should I consider using smart contracts. This is the embodiment of the decentralization principles in smart contracts. They are truly objective; a smart contract cannot be bribed or intimidated. They are distributed; the outcome is validated through algorithms by everyone in the network and if fraudulent behavior is detected, it will be marked as invalid by the blockchain participants. They are immutable; a smart contract cannot be changed, and no one can break a contract unless both parties agree.

“Exactly like a chest, keeping your precious data inside and unlock it only with the right key. In a word, there’s no need of a middleman.”

Traditional Contracts vs. Smart Contracts

Let’s go back to the example with the car from the beginning of this article and suppose I want to sell that car after the 12 months insurance period has passed. In the lines below, we will see how that will look in traditional contracts vs. smart contracts.

An info graphic showing the essentials behind the process of using traditional contracts.

Traditional Contracts – I have a potential buyer, I have never met, we will need a trustee, since no one really trusts the other. Someone to serve as middleman between both of us, to make sure no one tries to scam the other person, and both get what we want – car or money. This third person however, will require a fee for the services performed. Once done, we will both have to go through some sort of government vehicle registration authority and depending on the country or region insurance and inspection of the car.

An info graphic showing the core of smart contracts and what's their nature.

Smart Contracts – I state my public address and define the specific terms of the sale via a smart contract. Most probably, if $4000 are sent to my public address, then the blockchain should transfer car ownership ID to the private address that signed the smart contract and sends the $4000 and allow that private address to access the car. In this case, the smart contract serves as an intermediary. If the network validates this transaction, the buyer is also now the new registered owner of the car and can access it via the private key.

Daily usage of Smart Contracts

Smart contracts, as you might have figured out by now, can have vast applications in many different industries. One example of application in cryptocurrencies is with staking or masternoding. In order to do either, your computer has to be connected to the blockchain 24/7 which could be a problem for some people. Via smart contracts, you can authorize someone – a server – to stake or masternode on your behalf, while you collect the earnings. Smart contracts can and are seeing applications in banking, healthcare, government and business. An interesting example in supply chain management is a production factory “signing” smart contracts with its stores to track and automatically produce more items, when the in-stock quantity is lowering in a certain location.

.