What is a Smart Contract?

Bite-sized

Smart contracts are small programs or instructions on a blockchain — such as Ethereum — which automatically execute once predetermined conditions are met. Usually, smart contracts automate certain agreements between parties such that all participants are guaranteed the predetermined outcome without the need of an intermediate party.

What are contracts?

We all deal with contracts in life, whether it be for employment, electricity, licensing, or the transfer of property. To explain smart contracts it is beneficial first to describe what a contract is. A contract is a legally binding agreement between one or multiple parties and is enforceable by law. Even when using a service, we sign a contract — but usually skip the boring part, reading — all 'terms of use' agreements are legally binding contracts. Sometimes, an intermediate party must construct and oversee a contract, so both parties follow the agreement they made. Or sometimes, the two parties agreeing are the only ones involved in the process — not very transparent.

While contracts are not new, the way we were using contracts is about to shift to an automatically executing digital contract, known as 'smart contract'. The idea of a smart contract is not new, Nick Szabo already thought of the idea in the 1990s. However, the technology to support smart contracts was not there yet. But the future is today, and here is the era of blockchain, where secure and reliable smart contracts can exist.

Problems with traditional contracts

So why would we improve contracts? They look fine as is! Well, that is true. Partly. While (most) contracts work great, some limitations to physical contracts make them potentially bad.

  • One of the biggest issues with traditional contracts is that they can be forged, modified, or destroyed. And once this happens, there is no easy way to detect such an event. Traditional contracts are complicated and not tamper-proof.
  • Another issue with traditional contracts is that a third party is usually required to enforce an agreement. There is no easy way to resolve disputes, and they are often time-consuming and costly. It could take years to settle a dispute, with the costs going up into thousands of dollars — a waste of money if you asked us.
  • Also, some traditional contracts are too subjective. Some contracts are trying to be misleading, and some contracts are deliberately made vague, which only costs more time and money in a dispute. Not very nice, aye.
  • Finally, did we say they are slow?

Smart Contracts to the rescue

While traditional contracts may come with some limitations, there is a way to improve them. Namely: Smart contracts, which are small programs or instructions on a blockchain — such as Ethereum — that automatically execute once predetermined conditions are met. Smart Contracts are revolutionizing the way we deal with contracts, and are changing industry standards.

contract vs smart constract

How do smart contracts work?

Smart contracts contain code — Ethereum uses Solidity, a programming language — which automatically executes on the blockchain. The blockchain does not care about the contents of a smart contract; it executes no matter what — as long as the conditions are met. A smart contract may contain code that will be triggered when a specific event happens, for example, a birthday of a friend. The blockchain will carry out the contract, and your gift of 20$ cryptocurrency will be automatically transferred to your friend's wallet. There are infinitely many use cases, and the sky is the limit. As long as the trigger is an event that the blockchain can verify (through the internet), the network will execute the code, and anything is possible. Once a smart contract is deployed, the blockchain carries out the rest. And remember, nothing can be changed anymore. Literally, code becomes law.

The flexibility and reliability of smart contracts, make them great, and there are various benefits.

  • Since smart contracts are deployed on a blockchain, they're tamper-proof. Meaning that, once they are deployed, it becomes impossible to change or delete a contract.
  • Smart contracts are pretty objective. Whatever is written will be carried out. When it comes to computer code, what you read is what you get.
  • Smart contracts don't require any intermediaries to work. Getting rid of a third party saves tons of money and time. And smart contracts are completely trustless. You do not have to trust anyone, you can read the contract yourself, and the blockchain will automatically carry the contents no matter what! It is even possible to stay anonymous — for both sides — which is due to blockchain technology. You can simply sign a contract with your pseudo-anonymous cryptographic key! Well, isn't that a mouth full?

Decentralized Finance (DeFi)

Smart contracts make it possible to do things that were impossible before — making Decentralized Finance (DeFi) possible. DeFi is exactly what it says, decentralized finance. In short, Decentralized Finance is a form of finance that does not rely on a central party such as brokers, exchanges, or banks. Most DeFi services are accessed through decentralized applications (dApp), which as with any app, makes interacting with a service more intuitive. Some examples of DeFi services are stablecoins, decentralized exchanges, and insurance protocols. However, the sky is the limit, and smart contracts makes it possible. We have an entire topic dedicated to DeFi here.

The future is now, isn't it?

Today, smart contracts — and blockchain — are still used by a relatively small portion of users. The technology is still actively being developed and researched. Even the industry is catching up with major companies like IBM developing their Hyperledger Fabric or R3's Corda. Once the technology matures, smart contracts will add a significant contribution to society. As we see now, smart contracts are becoming increasingly mainstream and more integrated into our day-to-day life. It might as well be that, in the future, we do not know how to live without them.

Topics

In topics, we explain crypto-related subjects and capture the essence in bite-sized articles. Crypto should not be difficult. We cover many topics and make them as easy as possible for anyone to understand. Would you like us to cover a specific topic? Let us now and send an email to support@cryptobites.io