Smart Contracts 101

“A smart contract is a set of promises, specified in digital form”

Nick Szabo

 

Photo by Chris Liverani on Unsplash
Photo by Chris Liverani on Unsplash

Since Satoshi Nakamoto devised the first blockchain database in the form of bitcoin, a host of other protocols have built on top of the technology.

Smart Contracts are one such development that rely on blockchain consensus to automate transactions.

Who created smart contracts?

Smart contracts are often attributed to Vitalik Buterin, but they were actually first conceptualized by computer mastermind Nick Szabo in 1994, when Ethereum creator Buterin was just a twinkle in his mother’s eye.

Szabo saw that the coming wave of computerization would enable a new type of contract—one that had the potential to revolutionize the world of commerce, and be useful in fields as diverse as politics, law, and supply chain management.

These self-enforcing contracts—what he called “promises in digital form”—would make complex transactions possible without the need to trust a third party.

But, it wasn’t until Satoshi Nakamoto put blockchain on the scene that these contracts could be executed over a decentralized network, and the digital revolution Szabo predicted started to take shape.

Nick Szabo’s vending machine

To help the rest of the world understand smart contracts, Szabo used the analogy of a vending machine.

Everyone knows how to use a vending machine, and it provides a simple example of how a transaction can be automatically processed:

  • You feed in the money, press the button, and lo and behold, receive your chosen beverage.
  • Or, If you don’t want a drink, you don’t put money in and the soda doesn’t come out!

The transaction is made possible by computer code written into the microprocessor of the vending machine.

This microprocessor is essentially a third party to the transaction, just like a shopkeeper would be a third party if you were to buy your drink in a more traditional fashion.

Now, you might be thinking, vending machines are nothing new—so what’s revolutionary about that?

The difference with smart contracts is that there is no third party—and so there is no need to trust anyone because the whole mechanism is secured by blockchain consensus.

And unlike the inner workings of the vending machine, the code and account balances of smart contracts can be publicly verified to ensure fairness and transparency, removing the need for trust.

This might not mean much if you’re just buying chocolate or soda in your lunch break, but if you’re transferring money around the world, taking out a loan, or making a big bet on your favourite football team, then suddenly trust becomes a lot more important.

Smart Contract use cases

Going to all that trouble just to make buying snacks slightly more secure would be overkill, but hype spreads like wildfire in blockchain space, and many people have come up with wild and wonderful ideas for how smart contracts can be implemented.

Even in today’s world we can find Smart Contracts already in use; from simple code that Ethereum wallets use to automate the moving of funds, to complex dApps that rely on hundreds of smart contracts.

dApps

Decentralized applications are made up of a complex network of interlocking smart contracts.

Some of the most popular examples include CryptoKitties—where you can trade and breed collectible cats on the blockchain, and decentralized exchanges like IDEX.

Token issuances

When you send cryptocurrency to invest in an ICO or security token, the address will usually be a smart contract address which will automatically send the appropriate amount of tokens back to you. This makes the process completely transparent.

Prediction markets

Prediction markets allow participants to bet on the outcomes of future events. These could be political elections, sports matches, or, the possibility of bitcoin reaching $1 million before 2020 (if your name is John McAfee!)

By using smart contracts, those who predict accurately are automatically rewarded when the event comes to pass.

The future of smart contracts

If you believe the hype, then there is almost no area of industry that can’t be transformed with smart contracts.

But by conducting so many automated transactions, smart contracts can create a high workload for the underlying blockchain—much more than the usual pressure created by daily transactions. This happened in late 2017, when the CryptoKitties craze of people buying and selling digital cats slowed down transactions for everyone else using the Ethereum network.

Only a significant scaling effort will let smart contracts tackle more mainstream applications without rendering the underlying network unusable, and Ethereum is now competing with other blockchains — including Cardano, EOS, and Stellar — in the race to create a scalable and secure smart contract platform.

Author:

Kieran Smith is a content marketing consultant at Bitcopy, where he provides strategy and copywriting services for blockchain and cryptocurrency companies.