Smart Contracts - blockchainpsu/blockchain-essentials-spring2020 GitHub Wiki

Introduction

Smart contracts, as the name suggests, are a smarter version of normal contracts. You probably know what a normal contract is, but for the ease of explanation I will outline the key components of a contract. Contracts consist of the parties involved, the agreement (outcome), and the condition needed to execute the agreement. Contracts are relatively slow and expensive to draft up and execute. The parties involved must write up the contract in its entirety and print it on paper for the parties to sign. Writing up the contract usually involves paying for a lawyer or some legal expert. Smart contracts streamline all the shortcomings of regular contracts. They also digitize contracts, which is quite beneficial in today's day and age.

Comparison

As contracts are found on paper, smart contracts are found on the Blockchain . A smart contract is essentially an application that can be executed within the Blockchain, it's as simple as that.

Just how Blockchain transactions are housed and monitored within the Blockchain, smart contracts are housed and monitored within the Blockchain too. Smart contracts have the same details found in a regular contract: the parties involved, the transaction, and the execution condition. A smart contract can exist on the Blockchain without being executed. It can sit dormant waiting to receive the execution condition(s). Depending on what the smart contract is for, the execution condition(s) can be different condition(s) and combination of conditions: a signature, a certain day of the week, a confirmation code, etc.

Smart contracts can be thought of as a “delayed” Blockchain transaction. They can be put on the Blockchain, and not be executed until it receives the execution conditions, maybe a week later, maybe months, or maybe even years. But once as the condition is received, everything happens automatically. The contract decides, using the logic coded into it, which party gets what. There is no gray area, it is all hard code, that decides the outcome.

History

Nick Szabo first conceived the idea in the mid 1990s. He explained it as a sort of digital vending machine.

The vending machine (the Blockchain) holds items waiting for a user to enter data to retrieve an item. The user inputs data, and then the user receives an item.

Crypto-Use

Bitcoin, the most famous cryptocurrency, does not have complex support for smart contracts. It allows for simple smart contracts but they are rather cumbersome to write.

Ethereum, on the other hand, allows for more complex and feasible smart contracts.

With cryptocurrencies becoming more popular, smart contracts will continue to be implemented more and more into everyday life.

Benefits

If they haven't already became evident, smart contracts have a lot of benefits and uses.

  • Autonomy - Smart contracts automate the execution of contracts.
  • Security - As discussed before the Blockchain technology is very secure, so by extension smart contracts are very secure.
  • Cost Savings - Without the need for middlemen, smart contracts eliminate extraneous costs.
  • Trust - Once the contract is put on the Blockchain it cannot be altered, increasing the level of trust between parties.
  • Records - Records of smart contracts and transactions are easily accessible and verifiable.

Resources