Smart Contract
Smart Contract
Smart Contract
History:
A smart contract is just a digital contract with the security coding of the
blockchain.
It has details and permissions written in code that require an exact
sequence of events to take place to trigger the agreement of the terms
mentioned in the smart contract.
It can also include the time constraints that can introduce deadlines in the
contract.
Every smart contract has its address in the blockchain. The contract can
be interacted with by using its address presuming the contract has been
broadcasted on the network.
The idea behind smart contracts is pretty simple. They are executed on a
basis of simple logic, IF-THEN for example:
IF you send object A, THEN the sum (of money, in cryptocurrency) will be
transferred to you.
IF you transfer a certain amount of digital assets (cryptocurrency, for
example, ether, bitcoin), THEN the A object will be transferred to you.
IF I finish the work, THEN the digital assets mentioned in the contract will
be transferred to me.
Note: The WHEN constraint can be added to include the time factor in the
smart contracts. It can be seen that these smart contracts help set conditions
that have to be fulfilled for the terms of the contract agreement to be
executed. There is no limit on how much IF or THEN you can include in your
intelligent contract.
Smart Contract Working
Identify Agreement: Multiple parties identify the cooperative opportunity
and desired outcomes and agreements could include business processes,
asset swaps, etc.
Set conditions: Smart contracts could be initiated by parties themselves
or when certain conditions are met like financial market indices, events
like GPS locations, etc.
Code business logic: A computer program is written that will be
executed automatically when the conditional parameters are met.
Encryption and blockchain technology: Encryption provides secure
authentication and transfer of messages between parties relating to smart
contracts.
Execution and processing: In blockchain iteration, whenever consensus
is reached between the parties regarding authentication and verification
then the code is executed and the outcomes are memorialized for
compliance and verification.
Network updates: After smart contracts are executed, all the nodes on
the network update their ledger to reflect the new state. Once the record
is posted and verified on the blockchain network, it cannot be modified, it
is in append mode only.