Welcome to the first topic of our session on Smart Contracts and Blockchain Architecture! In this segment, we will walk you through the reason for the existence of a smart contract and a use case describing smart contracts.
A contract is a legally binding agreement between two entities. For a contract to be valid, the following conditions should be met:
(1) offer between two or more parties
(2) acceptance of the offer
(3) consideration, which is a benefit which must be bargained for between the parties
(4) mutuality of obligation
(5) competency and capacity
(6) a written instrument.
Most contracts are valid even when only two conditions are met amongst the 6 mentioned above: one, acceptance and two, consideration.
Further, contracts are of two types:
(1) Written: Documented contracts
(2) Verbal: Contracts maintained out of goodwill.
Source: Small Business Development Cooperation: Contracts and agreements
A smart contract is the digital version of a contract that runs on the Blockchain nodes and is executed when a set of trigger criteria are met. If designed right, a smart contract will surely be successful as it is driven by a computer system without human intervention.
Designing a smart contract is based on the following steps:
Step 1: Understanding the business problem statement
Step 2: Defining the blockchain network and its participants
Step 3: Assessing involved parties of the contract (whether all members of the network or specific roles)
Step 4: Exploring pre-requisites for the Smart Contract
Step 5: Examining trigger event for the Smart Contract (once this condition is met, the contract is executed)
Step 6: Evaluating business logic for the Smart Contract (If the condition is fulfilled, then what course of action will be followed, else what will happen?)
After having gone through the segment, you may refer to the following links to consolidate your understanding