Understanding smart contracts and blockchain-based workflows

Smart contracts are automated workflows written on top of the blockchain ledger that can read and write to the blockchain ledger and update the state of the blockchain system. What makes them special is that once they are deployed, they cannot be modified or controlled by external accounts (human-controlled accounts). They will always behave in accordance with the code written into them. This makes them perfect for creating time- or condition-based escrows that can operate without the involvement of a middleman.

Let's take an example. Alice wants to buy a car from Bob, but she will pay Bob the money and take possession of the car only if Bob gets a no objection certificate (NOC) issued for harmful emissions. Bob, on the other hand, doesn't want to spend more money on repairing his old car because he is worried that Alice might back out of the sale. To solve the conundrum, Alice and Bob could enter into a smart contract-based escrow. Alice puts her money on the blockchain into the escrow, and Bob puts an asset token that indicates ownership of the vehicle. This escrow is essentially a blockchain smart contract that will map the ownership of the vehicle to Alice and send the funds to Bob, only if he gets a copy of the NOC certificate from the relevant authority. The entire escrow logic is written using a smart contract platform (for example, Solidity). Since no one controls the escrow, neither Alice nor Bob needs to trust a middleman.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.15.94