Smart Contract (2024)

What is a Smart Contract?

A smart contract is a self-executing contract whose terms of the agreement between the contract’s counterparties are embedded into lines of code. Essentially, a smart contract is a digital version of the standard paper contract that automatically verifies fulfillment and enforces and performs the terms of the contract.The concept of smart contracts was proposed by Nick Szabo, an American computer scientist and researcher of digital currencies, in 1994.

The smart contract is executed through a blockchain network, and the code of the contract is replicated on many computers that comprise the network. This ensures a more transparent and secured facilitation and performance of the contractual terms.

Smart Contract (1)

Moreover, smart contracts do not require amiddleman to execute because the code of a smart contract is verified by all the participants in the blockchain network. The removal of the middleman from the contract helps to substantially reduce the costs for counterparties.

Smart Contracts and Blockchain

The concept of smart contracts is primarily based on the idea of blockchain technology.

A blockchain is a decentralized network of a growing list of records (blocks) that are linked through cryptography. A blockchain network does not include a single central point like a conventional database. The data that is stored in the blockchain is shared between all the computers that comprise the network. Therefore, the network is less exposed to possible failures or attacks.

In addition, in a blockchain, a record in one computer cannot be altered without changing the same record on other machines in the network. Transactions executed through a blockchain are grouped in blocks that are linked in a chain. A new block is created only when the previous block is completed. The blocks come in a linear chronological order, and each block contains a cryptographic hash of the previous block.

How Do Smart Contracts Work?

First, the contractual parties should determine the terms of the contract. After the contractual terms are finalized, they are translated into programming code. Basically, the code represents a number of different conditional statements that describe the possible scenarios of a future transaction.

Smart Contract (2)

When the code is created, it is stored in the blockchain network and is replicated among the participants in the blockchain.

Smart Contract (3)

Then, the code is run and executed by all computers in the network. If a term of the contract is satisfied and it is verified by all participants of the blockchain network, then the relevant transaction is executed.

Smart Contract (4)

Additional Resources

Thank you for reading CFI’s guide to Smart Contract. To continue learning and advancing your career, these additional CFI resources will be helpful:

Smart Contract (2024)
Top Articles
Latest Posts
Article information

Author: Greg Kuvalis

Last Updated:

Views: 5927

Rating: 4.4 / 5 (55 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Greg Kuvalis

Birthday: 1996-12-20

Address: 53157 Trantow Inlet, Townemouth, FL 92564-0267

Phone: +68218650356656

Job: IT Representative

Hobby: Knitting, Amateur radio, Skiing, Running, Mountain biking, Slacklining, Electronics

Introduction: My name is Greg Kuvalis, I am a witty, spotless, beautiful, charming, delightful, thankful, beautiful person who loves writing and wants to share my knowledge and understanding with you.