The Bitcoin and Blockchain buzz is continuing!
But have you noticed a new term “Smart Contracts” has joined the buzz mania?
- Why is everyone talking about smart contracts now?
- What is so “smart” about smart contracts?
Well to understand this, we need to see who brought this concept of smart contracts to the table.
The name “smart contracts” was coined by a cryptologist computer scientist, Nick Szabo, in the 90s.
Nick Szabo in 1994 said this:
A smart contract is a computerized transaction protocol that executes the terms of a contract. The general objectives are to satisfy common contractual conditions.
Ahh! So technical!!
To make it easier to understand, let’s fast forward to the 21st century. Consider a real life example where you are taking out a bag of potato chips mapped against the trigger number “B6” of a vending machine.
You put a $10 note in a vending machine. This action triggers the next option for you to select a number (like B6) on the vending machine.
And what happens when you select B6?
A lever in the vending machine moves and pushes out the bag of chips.
A smart contract self-executes the “if-this-then-that” conditions coded onto it in the same way that triggers are implemented in a vending machine.
But why is everyone buzzing about the outdated technology in vending machines?
The buzz is about the smarter contracts that are based on Ethereum technology.
The Ethereum blockchain mechanism coupled with smart contract technology removes intermediaries and escrow services.
Let’s dwell deeper into the concept of smart contracts so that even a non-techie can understand.
But before that, you need to be familiar with Ethereum 101…
Ethereum in a nutshell:
- Ethereum – A blockchain which records all executed codes as transactions.
- Ether – The cryptocurrency which fuels the Ethereum blockchain.
To be even more familiar with Ethereum 101, see our guide on “Ethereum Cryptocurrency: Everything A Beginner Needs To Know”.
What is a Smart Contract?
A smart contract is a piece of software that contains rules and regulations for negotiating the terms of a contract. It automatically verifies the contract and then executes the agreed upon terms.
And when this smart contract’s centralized code is made decentralized for execution purposes on the Ethereum blockchain, it becomes a smarter contract.
Coding and executing smart contracts on the Ethereum blockchain makes them immutable and independent from centralization.
Smart Contract’s Characteristics on Ethereum
A smart contract has the following characteristics:
- Cost saving
- Removes third parties or escrow agents
How Do Smart Contracts Work on Ethereum?
Developers write the code of smart contract using the native language of Ethereum called Solidity.
These contract codes can be of many forms, such as the transaction of money when certain conditions are met, or the exchange of goods between parties.
Once the code is written, it is uploaded on the EVM- Ethereum Virtual Machine, which you can say is a universal runtime compiler or browser to execute the smart contract’s code.
Now once the code is on the EVM, it will be same across each Ethereum node.
And each node will try to run and see whether the conditions are met or not.
A contract of Ethereum will involve two or more parties which will be fueled by the digital asset (Ether). Once the contract is executed successfully, the digital asset will be distributed or re-distributed according to the logics defined in the code.
To make it easier to understand, consider this example:
Assume that Harry has given a contract of $1000 to Mary for web development. Harry has hard coded the requirements and conditions about the kind of website he needs onto the Ethereum blockchain.
Now, this blockchain will act as the evaluator whenever Mary submits the website to Harry for approval after the project’s completion. Harry has already pre-coded his requirements (such as load time, server host, design specifics, etc.).
Now, Mary submits the work on the blockchain for evaluation. If the conditions set by Harry are successfully evaluated, and the website is done as per his coded requirements, then the contract worth $1000 will be instantly self-executed, and payment in equivalent Ether (ETH) will be released to Mary.
But let’s suppose Mary didn’t get her payment or Harry didn’t get his work.
Then this conflict of interest is resolved by the blockchain’s smart contract, which enforces trust by default.
Why Trust an Ethereum Smart Contract?
As every transaction history and history of every executed code is stored on the blockchain, you can trust and verify everything when needed.
Even in the case of Harry’s smart contract, Harry can’t cheat Mary. Because once Mary has done her work, it will be verified by the blockchain and recorded onto it.
Anyone, including Harry, can inspect the blockchain, hence resolving the conflict or protecting against cheating.
Moreover, Harry can’t stop or manipulate this contract as the execution of this contract is no longer dependent on one single party or node. As Harry’s contract is running on an EVM of the Ethereum blockchain, it is resistant to damage caused by a single point of failure.
On the other hand, if these conditions are not met, then Mary will need to continue the work until the appropriate website is created.
That’s why you can trust an Ethereum smart contract.
Use Cases of Smart Contracts
Smart contracts are becoming an integral part of the blockchain economy.
Some current applications of smart contracts:
- Real Estate – A Midasium Contract is a small computer program. It is a digital representation of the mutual agreements as in a traditional real estate contract. This software code self-executes and self-enforces, and it is based on smart contracts.
- Supply Chain Mangement (Skuchain) – A material’s supply and procurement are typically tracked with paper trails which are mutable. Hence, implementing the supply chain management on blockchain removes the possibility of theft or fraud.
- Intellectual Property Rights – Musicians, writers, and artists can put their creativity on the blockchain and can control ownership of their work. Smart contracts like this enable the creator to collect royalties and payments directly without any third parties involved.
What is the Future of Smart Contracts?
Bitcoin is merely the first application on the blockchain backed by the internet.
But Ethereum and smart contracts are the next gen applications on the blockchain.
And I think Ethereum smart contracts also answer the question of “why do you need Ethereum when you have Bitcoin?”
Just like the invention of the internet has transformed human life, the Ethereum blockchain and smart contracts have the power to change human life in incredible ways.
Because the marathon has just started; Ethereum is only 3 years old, and many scholars are pursuing a lot of research on it.
The floodgates of unparalleled innovation have been opened with the establishment of The Enterprise Ethereum Alliance.
The Enterprise Ethereum Alliance connects Fortune 500 enterprises (like Accenture, Microsoft, Intel, JP Morgan, Wipro, etc.), startups, and academics with Ethereum subject matter experts.
With this meeting of minds, it’s highly likely that Ethereum will be the next big cryptocurrency.
What do you think about Ethereum and smart contracts? Have you used a smart contract before? Share your experience in the comments below!
If you find this tutorial useful, do share it with your friends on Facebook & Twitter!