How Do Ethereum Smart Contracts Work

how-do-smart+contracts-work.jpeg

Most of us must have used the term ‘Smart Contracts’ in a blockchain discussion with colleagues or friends without completely realising the impact Smart Contracts can have on the entirety of the socio economic framework our society thrives on.

We have mentioned multiple times in this blog that Blockchain as a technology is revolutionary.

We refrain from calling ourselves maximalists of any particular cryptocurrency. Rather, you may call us blockchain/crypto maximalists.

Coming back to the topic at hand, you may already know by now what Blockchain is and how it works. If not, feel free to read our previous blog posts. Now, let us delve into a more intriguing topic of what are smart contracts.
What are smart contracts

What are smart contracts

Quoting Wikipedia,

“A smart contract is a computer protocol intended to digitally facilitate, verify, or enforce the negotiation or performance of a contract. Smart contracts allow the performance of credible transactions without third parties. These transactions are trackable and irreversible.”

The above definition basically states that smart contracts as the name suggests are contracts that can be programmed, verified without third parties, are trackable and are immutable unless explicitly mentioned in the contract.

There are numerous blockchain platforms that let you create custom smart contracts for varied use cases. Some of them are Ethereum, Hyperledger fabric, R3 Corda, Stellar, Achain, etc.
How do smart contracts work

How do smart contracts work

We will now try to understand smart contracts right from its inculcation.

Smart Contracts were first introduced by cryptographer and Computer Scientist Nick Szabo in 1994. A rough idea of smart contracts could be understood by analysing vending machines. You select a particular snack and enter the appropriate amount into the machine, the snack then presents itself to you. Just like that, magic.

However, sometimes the machine fails (mainly because of poor programming and centralisation), something which is tackled very efficiently when it comes to blockchain.

A Smart Contract needs several mathematical moving parts for it to function seamlessly.

A Blockchain platform - for it to perform and verify transactions on chain
Public Keys and Private Keys - the Smart Contract must have access to the private keys that it plans on controlling.
Conditions - Clear conditions must be defined by the Smart Contract so that relevant transactions are carried out. (a simple if loop on the blockchain)

Smart Contracts are highly beneficial in a wide variety of domains as they let you create contracts that are secure, fast and are standardized for numerous use cases.

The use cases of smart contracts are so vast that we would probably need more than one post to elaborate on each of them. However we will try to cover as much as possible in one post.

We will define this with 3 different examples that will adopt Smart Contracts in growing stages.

Minimal
Partial
Complete

Let’s take a real life scenario where smart contracts could possibly be used in the near future. In this example we will consider Uber. Uber as we all know are disruptors of traditional taxis and are probably the largest cab hailing service in the globe. Smart Contracts potentially have the capability of disrupting this disruptive service.

Continue reading here: https://www.bbod.io/bbod-blog/2018/8/18/smart-contracts