What is Smart contract?
-
A smart contract is a computer protocol that is stored inside the Blockchain, and is intended to digitally facilitate, verify, or enforce the negotiation or performance of a contract.
-
A smart contract would be activated/ executed automatically when certain conditions are met.
-
No longer need a trusted third-party.
-
Smart contract are also Immutable and Distributed.
Ethereum
Ethereum is a platform that’s built specifically for creating contracts.
In Bitcoin, transactions looks like:
> Executing BTC Transaction...
> Ahmad sends 10BTC to Bilal.
> Transaction Confirmed.
> Ahmad sends 10BTC to Bilal.
> Transaction Confirmed.
Ethereum uses smart contracts, where transactions are programmable and it could look like this:
> Executing ETH Smart Contract...
> Send 10ETH from Ahmad to Bilal if Ahmad’s balance is > 15ETH and the date is 01-06-2022.
> Conditions Met. Executing...
> Send 10ETH from Ahmad to Bilal if Ahmad’s balance is > 15ETH and the date is 01-06-2022.
> Conditions Met. Executing...
SMART CONTRACTS
>>>>>>>>>>>>>>>> HOW IT WORKS <<<<<<<<<<<<<<<<
1. Pre-Programmed Contract
The terms, rules & Conditions of the Agreement are established by all counterparties and translated into code.
2. Chain of Events
If the events specified by the conditions occurs, then the code automatically executes.
3. Execution & Value Transfer
Once executed, the terms of the contract will automatically transfer the value to the relevant parties.
4. Settlement
The transfer of value to counterparties will be recorded on the blockchain.