• Abdullah Mohsin

Introduction to Smart Contracts

What are Smart Contracts?

Nick Szabo first described smart contracts in the 1990s. Back then, he defined a smart contract as a tool that formalizes and secures computer networks by combining protocols with user interfaces.

In the world of cryptocurrencies, we may define a smart contract as an application or program that runs on a blockchain. Typically, they work as a digital agreement that is enforced by a specific set of rules. These rules are predefined by computer code.

Blockchain smart contracts allow for the creation of trustless protocols. This means that two parties can make commitments via blockchain, without having to know or trust each other. They can be sure that if the conditions aren't fulfilled, the contract won't be executed. Other than that, the use of smart contracts can remove the need for middlemen, reducing operational costs significantly.

How do they work?

In simple terms Smart Contracts execute a particular task when and if certain conditions are met. As such, a smart contract system often follows "if… then…" statements. But despite the popular terminology, smart contracts are not legal contracts, nor smart. They are just a piece of code running on a distributed system (blockchain).

Let’s make it even more simple with an example, Aris wants the Golden State Warriors (GSW) to beat the Cleveland Cavaliers (CLE) in an NBA game. Dante wants CLE to win. So both put $10 into a digital wallet.

Now we code a digital contract with the following:

If GSW > CLE, then the wallet must send Aris $20.

If CLE > GSW, the wallet must send Dante $20.

Now the smart contract goes and checks NBA.com over and over again until the final score is displayed. It says, CLE > GSW. At that point we might not trust NBA.com, so the contract also checks ESPN.com, Bleacherreport.com and 5 more.

Not only that, we also have 10 more computers check all that work to make sure they all concur that CLE definitely beat GSW. This means we reached consensus. At this point, the smart contract tells the wallet to send Dante $20, Hence there is no risk of cheating or lying.

Advantages of Smart Contracts

Smart Contracts offer several benefits such as the ones above and lets discuss some below:

  • They are highly accurate and have no room for error (if coded properly).

  • They exist on public blockchains so anyone can see them offering full transparency.

  • They exist securely on the blockchain so they can never be stolen or tampered.

  • You can never lose it as its always backed up on the blockchain.

  • It uses no paper so no fragile physical property that could be damaged and no environmental harm.

  • It is trusted because the code is law here so the predetermined conditions to fulfill the contract will always execute no matter what.

  • They greatly reduce operational costs as it only needs to be coded once and then it can be used over and over again with no costs.

The use cases for Smart Contracts

Smart contracts can be used in a variety of fields, from healthcare to supply chains to financial services, let’s take a look at 4 of them below

Digital Identity One of the most obvious smart contract use cases is Digital Identity. Individual identity is one of the biggest assets for that individual. It contains reputation, data, and digital assets. The digital identity, if used rightly, can bring new opportunities to the person. Also, digital identity can also help protect the identity from counterparties and enable him to share it with companies that he intends.

Government voting system Smart contracts provide a secure environment making the voting system less susceptible to manipulation. Votes using smart contracts would be ledger-protected, which is extremely difficult to decode.

Moreover, smart contracts could increase the number of voters, which is historically low due to the inefficient system that requires voters to line up, show identity, and complete forms. Voting, when transferred online using smart contracts, can increase the number of participants in a voting system.

Healthcare Blockchain can store the encoded health records of patients with a private key. Only specific individuals would be granted access to the records for privacy concerns. Similarly, research can be conducted confidentially and securely using smart contracts.

Supply chain Traditionally, supply chains suffer due to paper-based systems where forms pass through multiple channels to get approvals. The laborious process increases the risk of fraud and loss.

Blockchain can nullify such risks by delivering an accessible and secure digital version to parties involved in the chain. Smart contracts can be used for inventory management and the automation of payments and tasks.

Useful links:

What are smart contracts video tutorial: Smart contracts - Simply ExplainedYouTube · Simply Explained21-Nov-2017

What are smart contracts article: https://academy.binance.com › articlesWhat Are Smart Contracts? | Binance Academy

Smart contract explanation for kids: https://hackernoon.com/how-i-explained-smart-contracts-to-my-10-year-old-c1fa8f4260d

Smart contract uses: https://moralis.io/smart-contracts-explained-what-are-smart-contracts/

2 views0 comments

Recent Posts

See All

What is Ethereum? Ethereum is a decentralized computing platform. You can think of it like a laptop or PC, but it doesn't run on a single device. Instead, it simultaneously runs on thousands of machin

What is GameFi GameFi is a fusion of the words game and finance. It refers to play-to-earn blockchain games that offer economic incentives to players. The GameFi ecosystem uses cryptocurrencies, non-f

What is Web 3? In a one-liner – it’s the next era of the Internet. Web 3.0 (commonly called Web3) is a shift towards a more decentralized Internet. Web3 establishes itself through new technologies, su