An Introduction To Smart Contracts - Where The BlockChain Truly Comes To Life...

in #blockchain8 years ago

 The BlockChain is the media darling at the moment. The hype is ever present as the finance sector salivates at the BlockChain's power to decimate banking infrastructure costs. Global Fintech startups become sucked into a world of addictive frenzy as they begin construction on the next uber icon to disruption, whilst the Venture capitalists rub their hands with glee as they throw $100 bills directly into the dancing flames of exponential growth. Whilst the media hype sells advertising, and the VC's have a love affair with the opportunities the technology can bring, to the passive observer the true power of the BlockChain is relatively hidden - and that is smart contracts.

The term "Smart Contract" was first coined by a computer scientist called Nick Szabo in 1993, when he broadly described a Smart Contract as the ability to bring refined legal practices of contract law to the e-commerce protocols between strangers on the internet. To understand the importance of the potential for smart contracts and dealing with strangers, let's first look at why we need traditional legal contracts. Traditional contract involve middlemen - everywhere. If we consider selling a house, for example, lawyers prepare and check legal documents - on both sides; banks register, pass over property deeds, mortgage documents and are ready to pay and receive monies once these documents have been exchanged. Documents and monies are exchanged; the house is bought. The middlemen, the lawyers and the bankers are there because there is a fundamental lack of trust between buyers and sellers that don't know each other, with both sides needing the protection of the trusted third parties, who understand how to recourse to a court of law in the event of things going wrong. So how does this need for trust extend into our online activities? When we buy online, trust is needed on both sides. As a buyer, we trust the seller will send the goods we have bought - once we have paid for them. On the other hand, the seller is concerned that if they send us the product, we might raise a false dispute, enabling any credit card payment to be reversed, and the goods kept. As a result, third party websites provide comfort in this "lack of trust" environment, whilst trusted third party payment providers give us some element of protection against untrustworthy behaviour. So, wouldn't it be great if we could buy anything, online and offline, in such a way as to dispense with the need for trusted third parties? 

With BlockChain technology, we have that ability using smart contracts, which use the same fundamental methodology as, wait for it, the humble vending machine.  


With a vending machine we understand exactly what is going on. We insert money; we choose a product; the machine dispenses our chosen product. It's very clean; it's very simple and we never question what's going on under the hood. In contractual terms, however, with a vending machine:

  • we express interest in buying a product - by clicking our button of choice,
  • the machine offers to sell us the product - by confirming the product is available and by giving us a price.
  • we insert monies into the slot - as consideration for the acceptance of the offer.
  • the machine accepts the money and gives us the product.
  • The contract is complete

 In this case, there was no need for a trusted third party in the middle; the vending machine has done this automatically for us, with it programmed appropriately. If we feed $2 into the vending machine then the machine will dispense our product of choice. Smart contracts on the BlockChain have the capability for so much more sophistication than the vending machine, but work on the same principal of "If - then" statements. 

Let's take a simple example and of a smart contract for the lease of a car. Let's say you have bought a car under the terms of a finance lease. On an ongoing basis, you pay your repayments every month without fail; the finance company is happy. Lets now say you lose your job and you fall behind with your payments, and you default on your contract. The car can be programmed automatically within its own operating system to recognise that IF you have not paid your repayments THEN it can automatically stop the car from starting in your own driveway. The location of your driveway is picked up from internet based sensors within the car that are GPS enabled. The smart contract automatically locks the car for your key. The repossession agent, on the other hand, has a key that is automatically programmed that should the repayments not be made, give him access to the car to drive it away. No middlemen involved - it's all just programmed automatically in the form of a smart contract programmatically built into the car, the keys, the payment systems and the locks. So let's extend this into a more complex use case - that of equities.    Under traditional equity sales, so many middle men get involved. There are those confirming ownership of the equity being sold, those paying for the equity, those selling the equity, the banks involved in the middle arranging monies to be transferred from one party to another. As it stands currently, all this takes three days and involves trust at every level. But imagine if...:

  •  The ownership of an equity were formally and permanently locked to the BlockChain (one of the BlockChain's strongest features is its immutable database - i.e. that any entry cannot be undone).
  • Then, when the price of the equity reaches, say, $15, the equity is sold automatically to the new owner, who has bid for the equity.
  • The computer code in the smart contract then requests monies be paid and drawn automatically
  • Once monies are paid, the new ownership is automatically transferred directly to the new owner and automatically locked into the BlockChain as a permanent record once more.

 Now whilst this actual use case is being programmed as we speak, there is more complexity than shown above but it shows how smart contracting can be used. It also means no third parties are involved - with the computer code automatically executing the transaction, the change in ownership and the transfer of monies. Understandably, investment bankers are really excited by this opportunity to enable almost instantaneous share sales as this frees up so much more liquidity into the financial markets, eradicates so much of the transaction costs and speeds things up. Venture Capitalists are also excited by the possibilities, as this form of smart contracting can be extended to any form of contract - in any industry - even the creative industries. In our own business of Veredictum.io, we are developing a software platform to protect video content producers from theft and piracy and as part of our roadmap is the creation of smart contracts that automatically allocate copyright payments to music providers that may have provided their music to a video producer. So when the music producer receives royalty payments or payments from YouTube or  iTunes for example, the appropriate music royalties are automatically dispensed. Smart contracts are very powerful, and we are only just touching the surface of what can and could be done. Just think about your own industry by looking at any elements that require "trust". Smart contracts can programmatically remove those elements. By understanding this, you can begin to plan your own smart contracts via the BlockChain. 

Sort:  

Hi! I am a content-detection robot. This post is to help manual curators; I have NOT flagged you.
Here is similar content:
https://medium.com/@timlea/smart-contracts-where-the-blockchain-truly-comes-to-life-344d019a2918

Congratulations @therabbithole! You have received a personal award!

2 Years on Steemit
Click on the badge to view your Board of Honor.

Do you like SteemitBoard's project? Then Vote for its witness and get one more award!

Congratulations @therabbithole! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 3 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!