What Are Smart Contracts (A Simple, Easy-to-Understand Guide)

A smart contract is a digital agreement that executes automatically when certain conditions are met.

If that sounds confusing, think of it like a vending machine.

If you want a can of Coke, you insert the correct money and the machine releases your drink.

If you don’t put in enough money, the vending machine doesn’t work.

This is the basic premise of a smart contract. It will only execute when all the coded agreements are met. And it all works using blockchain technology.

vending machine smart contract

In this piece, we cover everything you need to know about smart contracts. We explore their origins, current implementations, and future possibilities of user adoption. We also dive into smart contract technical features, use cases, and more. Without further ado, here is our comprehensive guide on smart contracts.

Definition of a Smart Contract

A smart contract is a self-executing contract.

It’s written in lines of code that allows two parties to complete a transaction based on agreed-upon terms and stipulations. In essence, a smart contract allows individuals to ensure that the terms of a contract are carried out without having to rely upon a third-party intermediary (i.e. a judge, attorney, etc.). 

Smart contracts are similar to existing, traditional contract systems. The main difference is that they are automated, whereas traditional contracts are not.

Smart-contracts infographic
Credit: Code Brahma

Why Are Smart Contracts Important?

Cost and efficiency – Think about how much a lawyer costs and how long it takes to settle a disagreement. Smart contracts could significantly decrease long-term operational costs and friction that has traditionally been present with all sorts of modern transactions.

Power of blockchain – Smart contracts are executed and recorded on a blockchain (usually Ethereum). The contracts benefit from all the best aspects of blockchain technology; they are fully traceable, transparent, and irreversible. 

Eliminate third-parties – The fact that a smart contract doesn’t need a third party is a technical innovation game-changer. You set the terms and create the arrangement. The smart contract ensures conditions are met.

Eliminate the need for trust – A smart contract can even eliminate the need for trust in any agreement between two parties. You don’t need to trust your lawyer is negotiating appropriately, for example. This means that a smart contract can be equally well-suited for ensuring that two familiar parties (i.e. friends or family) or even two anonymous individuals follow the terms and stipulations within an established agreement.

How Do Smart Contracts Work?

In basic terms, smart contracts rely on “if-then” statements, also known as “geometric proofs”. If I insert the correct money into a vending machine, then I get a can of Coke.

To use a real smart contract example, if Bob sends a specified amount of money to Alice, then Alice hands over ownership of an asset (i.e. a house or car) to Bob. This is just one example of how smart contracts can serve as legal contracts for the exchange of assets. 

In 2018, the most common use of smart contracts is the simple transfer of cryptocurrency assets. But it’s possible to create even more complex smart contracts that include a number of factors. 

smart contract possibilities
Credit: Records Keeper

Smart Contracts in Gambling and Sports

For instance, we could see the implementation of a smart contract in activities like wagering on events. 

For instance, two people could wager on who will win the Super Bowl. One contract would collect the data to decide who wins. A second contract would settle the wager by sending funds from the loser to the winner. It would use information received from the first contract once the conditions are met (i.e. when the winner is determined at the end of the game). 

Using a smart contract generally requires transaction fees. Even though fees are typically minimal, they do depend on factors like blockchain throughput and scalability as well as computational power needed to execute an agreement.

Most smart contracts are built on Ethereum, so fees are usually paid in ether. 

Who Created Smart Contracts?

Before we go over how exactly smart contracts are implemented today and what’s possible for the future, it’s important to understand the origins of this technology. 

The idea of a smart contract was first proposed by Nick Szabo in 1994. In addition to writing about smart contracts, Szabo also proposed the idea of “Bit Gold” in 1998. Essentially, this concept was the theoretical precursor to Bitcoin, which emerged a decade later. 

So how did Szabo envision smart contracts? His vision was actually very similar to how smart contracts of today work. 

“[Smart contracts are] a set of promises, specified in digital form, including protocols within which the parties perform on these promises…” Nick Szabo.

Nick Sbazo smart contracts

He saw it as a way to revolutionize the transfer of money. He saw how electronic money transfers had improved the retail industry, and wanted to digitize the process even further. 

Szabo also saw smart contracts being employed in financial markets for trading derivatives and bonds.

“These new securities are formed by combining securities (such as bonds) and derivatives (options and futures) in a wide variety of ways. Very complex term structures for payments can now be built into standardized contracts and traded with low transaction costs, due to computerized analysis of these complex term structures.”  Nick Szabo.

In basic terms, Szabo believed that smart contracts could be implemented to improve the efficiencies of buying and selling derivatives.

He was right. Flash forward 20 years and startups like dYdX are using smart contracts to create financial derivatives. 

The First Uses of Smart Contracts

Szabo’s vision of a smart contract took a few years to get off the ground. Even though the concept was innovative, it didn’t gain much traction at the time because the supporting technologies didn’t exist.

The missing component was blockchain – a distributed ledger technology. 

In 2008, the idea of implementing smart contracts came closer to a reality with the invention of Bitcoin, the world’s first blockchain and cryptocurrency. 

Bitcoin was a promising step forward; however, it still wasn’t enough to create the world’s first smart contract. This was due to the limitations of Bitcoin’s technical architecture. 

Nonetheless, this created the foundation for subsequent blockchain projects to emerge. In 2013, Szabo’s vision finally became a reality when Ethereum was first proposed. 

Learn more: Download our free Ethereum eBook (no email address required)

Soon afterwards, Ethereum became the first blockchain platform to implement a real-world smart contract. Now, all kinds of dapps, DAOs, and blockchain applications use smart contracts to power operations.

Since that time, more blockchains have emerged to offer smart contracts along with Ethereum. In only a few years, this technology has already moved far past Szabo’s original intended use case as a secure way to buy and sell derivatives. 

In fact, we are beginning to see smart contract platforms for exchanging all sorts of assets, way beyond the financial sector. 

Smart contracts are tentatively being used for real estate, insurance, healthcare, supply chain management and even voting.

Beyond Money: How Smart Contracts Can Revolutionize Other Industries

Cars and insurance

Imagine you just crashed your car. You now face a nightmare process of arguing with insurers and lawyers.

But what if the whole process was automatic?

Imagine your car could send all the crash information back to the insurer automatically. Your speed, images from the dash cam, your reaction time, the point of impact. Everything that proves it wasn’t your fault.

And thanks to a smart contract, the insurance terms are already set up. If the information meets the criteria, the insurance pays out immediately.

No arguments with the insurance company. No unnecessary lawyers. Just fast, automatic payouts.

Admittedly, we’re nowhere near this level of sophistication, but it’s a possible use case.

Elections

Smart contacts could be used to execute and record votes in an election. Since they’re stored on a blockchain, the votes can’t be rigged or defrauded.

Logistics and Supply Chains

Most large companies have a complicated supply chain involving hundreds of contracts. The legal costs of managing these contracts are phenomenal. They’re also vulnerable to fraud and manipulation, not to mention the logistic nightmare of tracking them all.

Smart contracts would streamline the entire process and make it more secure.

These ideas are all very exciting, but how are smart contracts being used right now, in 2018?

——————————————————————————————–



——————————————————————————————–

IBM and More: Who’s Using Smart Contracts in 2018?

IBM Hyperledger Fabric 

IBM hyperledger smart contracts

This is probably the best example of what is possible today with private blockchains. Walmart and Maersk are just two of several major corporations that are working with IBM to create customized smart contract technologies to solve real-world problems. In this case, these companies are working to improve the efficiency of supply chain logistics operations.

Share&Charge

share and charge smart contracts

Share&Charge launched a mobile app for shared electric vehicle (EV) charging. The idea behind the project is simple yet innovative. Traditionally, EV charging has suffered from a lack of infrastructure. There just aren’t that many charging points. Share&Charge solves this issue by decentralizing EV charging. 

As of January 2017, 92% of electric vehicle owners in Germany had an electric charging station at home. However, no one besides the resident was typically using it on a regular basis. 

By opening up these charging stations to others via a blockchain-driven mobile app, both charging stations owners and EV owners could benefit and solve a relevant supply-demand dilemma.

It uses smart contracts to agree upon terms and execute payments.

Propy

propy smart contracts

Propy is one of many blockchain projects aiming to change the future of real estate. This platform uses smart contracts to allow users to purchase a home from anywhere in the world without having to go through a bank. 

By allowing users to select from any currency of their choosing, Propy gives both real estate buyers and sellers greater payment flexibility. This platform demonstrates the potential of blockchain and smart contracts to serve as a decentralized title registry for listings in the US, China, Russia, the Middle-East, and Europe.

Wanchain

wanchain blockchain

Wanchain is another project working towards privacy-protected financial services. Its services facilitate cryptocurrency management as well as exchanges, loans, credit payments, and much more.

According to a July 2018 update, Wanchain now offers cross-chain compatibility with Ethereum. In this update, Wanchain also lists a variety of use cases for their technology beyond just financial services. For example, this project can be used to improve supply chain logistics, medical data management, and identity verification. 

Most importantly, Wanchain is one of the first projects to attempt to implement privacy features into smart contracts. This means that users can not only make verifiable agreements but also protect their privacy. 

Additionally, Wanchain’s One Time Address (OTA) generation system and Private Send functionalities also provide increased privacy.

Challenges to Smart Contract Adoption

Since 2013, smart contracts have come a long way in how they can be used for real-world applications. But there are many hurdles to overcome:

Shortage of technical expertise – Because it’s a new and complicated technology, there’s a global shortage of expertise in building smart contracts. They are simply not as easy to use as traditional legal documents. Not only does it require technical know-how, but it requires a level of legal expertise too. 

High costs – Because of the expertise required and the lack of qualified developers, there are high costs required to develop smart contracts. Because blockchain technology is still relatively new in 2018, there aren’t as many blockchain or smart contract development experts available as more established technologies have. This puts smart contract development work at a premium. 

Bugs and faults – Smart contracts are only as good as the coders that write them. 25% of all smart contracts have critical bugs, according to Hosho, a cryptocurrency security firm. Smart contract auditing is a service that aims to double-check the security of contracts, but there’s a long way to go. 

Legal issues – There are also some issues in how smart contracts are enforced by existing legal institutions. In some jurisdictions, they might not serve as actual legal agreements. If smart contracts are not recognized as a legal document in a given place, this could negatively impact the possibility of user adoption. This varies depending on location but a general lack of regulations surrounding blockchain (and smart contracts specifically) makes it more difficult for some companies and individuals to justify investing time and money in the development of such technologies. 

Lack of user-friendly interfaces – Finally, many smart contracts lack a user-friendly interface. This is partly due to the technical complexity of smart contract logic. It’s also partly because projects have focused more on the technical implementation rather than prioritizing the UI/UX design needed to make smart contracts more accessible to non-technical users.

Where Can Smart Contracts Go From Here?

We are likely to see a lot of progress in smart contract technology and adoption in the coming years. As blockchain technology continues to improve and evolve, smart contracts are likely to become easier to use, be utilized in a greater variety of use cases, and gain greater acceptance from existing legal institutions. If these three goals are achieved, smart contracts could become an integral part of major industries like finance, real estate, healthcare, and many more. 

What’s the ultimate role for smart contracts in modern society? While it can be difficult to determine to what extent people will use this technology in the coming years, it’s easy to envision a future where smart contracts displace traditional legal contracts and improve the ability for two parties to ensure that contracts of all types can be better enforced.

Further reading:

What is Ethereum – Our complete eBook on Ethereum (free to download, no email address required)

Learned something new in this article? Subscribe to the Block Explorer newsletter.

 

Delton Rhodes

Delton enjoys researching new, innovative, and interesting blockchain/crypto projects that have the potential to impact the world. Whenever he's not writing, he's usually playing sports or producing music.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.