You are currently viewing What is a smart contract?

What is a smart contract?

Smart contract technology inspires to bring fundamental changes in the way people are doing business.

And that’s because a smart contract can automate business agreements without the need of intervention of a third trusted party.

That’s alright, but what is a smart contract?

Smart contract is defined as a set of promises that each party has to meet, which is specified in digital form.

The impressive thing about smart contracts is the fact that they take the use of cryptocurrencies one step further.

So, cryptocurrencies are not only going to be applied in the economic and financial sector as they first intended to, but their philosophy seems to fit nicely in plenty of other cases.

As a result, the possibilities that are opened in front of our eyes are at the same time fascinating but also intimidating.

But let’s take things from the beginning.

What is a smart contract? 

The person that introduced smart contracts to the world was a computer scientist called Nick Szabo, all back in 1998.

Who described them like that:

Smart contracts are self-executing lines of code with the terms of an agreement between buyer and seller automatically verified and executed via a computer network.

However, smart contracts back then didn’t seem to offer much value.

It was only after Vitalik Buterin conceived in 2013 the Ethereum platform that the magic really started.

And the reason for that?

Of course Buterin’s creation, Ethereum, a platform that enables smart contracts to function on top of the blockchain technology.

Subsequently, smart contracts inherited the characteristics of the blockchain.

This basically means that smart contracts can be executed without the need of a third trusted party thanks to blockchain’s consensus mechanism.

At this point it is right to mention that smart contracts are not really smart.

In fact a lot of people are making fun out of it by calling them dumb contracts.

They simply check if particular conditions are met and after that take action accordingly.

So, we should not think of them as artificial intelligence.

Who writes smart contracts?

That’s a very important question because it will give the opportunity to the reader to understand some more functional aspects of smart contracts.

So, anybody has the ability to write a smart contract and then upload it to the platform.

You just need to know the programming language of each platform.

For example in the case of Ethereum (which is the most popular smart contract platform), the languages you can use one of those:

  • Solidity
  • Vyper
  • Yul

Solidity and Vyper are the most active so it is strongly recommended to use those two.

Except for the coding skills you will also need to have gas money in order to deploy a smart contract.

How much does a smart contract cost?

Every smart contract deployed is basically a transaction and that’s why you need to pay fees for it, the same way as you do with a simple cryptocurrency transfer.

But the cost is really bigger than a simple transaction because smart contracts are much more complicated.

However, the answer here is that the cost differs from platform to platform.

For starters, in Ethereum you will need to pay around 500 dollars if the smart contract is very small.

Deploying a meaningful and complicated smart contract is going to cost you around $10.000.

In the case of NEO, the cost to create a smart contract fluctuates from 100 NeoGas (GAS) (around $500 with the current GAS price) for basic smart contracts to 500 GAS ($2500) if you need storage area and dynamic calls.

At this point it is worth mentioning that once a smart contract is deployed, it can never change again.

Even if you want to change something inside it you will just have to create a new one and redeploy it.

So you have to be very careful when writing smart contracts, because one mistake can cost you thousands of dollars!

Smart contract platforms

The first and most renowned platform enabling smart contracts to run is Ethereum, but ever since then many other platforms have been designed to host them.

Below are listed the three most popular:

  • Ethereum Market value: $370.039 billions. Ethereum is the number one platform to think of when talking about smart contracts. And that’s due to the popularity of Ethereum since over the last years millions of smart contracts have been deployed on it.
  • EOS –  Market value: $2.204 billions. A decentralized platform initially built on Ethereum but later became an independent platform. Today, smart contracts and Daaps can run at EOS protocol just like with Ethereum.
  • NEOMarket value: $1.559 billions. Started in China in 2014. It is generally thought of as the Ethereum of China. A lot of people think with the backing of the Chinese government, even not officially but certainly with verbal support.

NEO and EOS are a little faster than Ethereum because of the proof of work that they use. So, they might be more scalable than Ethereum in the long term.

You can read this post which discusses those and many other smart contract platforms.

What is a smart contract?
EOS belongs among the most popular platforms for smart contracts / Photo by QuoteInspector

Examples of smart contracts

There is a wide variety of occasions that smart contracts can be applied and bring a lot of extra value.

At this point I’ll mention just a few of them but if you want to broaden your knowledge and look at more examples, please check out this post.

    • Insurance – The primary job that a smart contract does, is to check whether a condition is met or not and after that taking a particular action. As you can imagine, there are a plethora of cases in the insurance sector where lawyers can be replaced by smart contracts.
  • Real Estate – The concepts of renting, buying or selling a real estate property fit very well with smart contracts.
  • NFT’s – One NFT can be embedded in a smart contract and vice versa.

Final thoughts

The combination of smart contracts with blockchain technology seems to have a lot of interesting applications in the present but especially in the future.

So, the best thing we got to do, is to stay tuned and wait for the magic to happen.

Image Source: QuoteInspector