Learning how to Smart Contracts pt.1

Smart Contracts

smart contracts are a set of instructions executed in a decentralized way without a need for centralized or third party intermediary.

Set of instructions in code. Executed in the BlockChain. ( Ethereum was the first Use-case)

Bitcoin is Store of Value , Turing incomplete. Ethereum is turing complete and therefore its a store of value and utility to facilitate agreements.

What is the value of Smart Contracts?


Imagine the following agreement : Contractor will remodel your bathroom and kitchen , they will need 30% to start , 30% after roughing and the 40% when done. We can write a smart contract for this, this contract will reside on the blockChain and it will be executed after this data is verified. So contract will be executed, since its immutable, transparent and decentralized.

So basically , this ENSURES that we get what we sign up for.

We do have the legal way, But unfortunaly this takes a lot of time, resources and could not work in the end.

Oracle Problem

BlockChains have a hard-time to get external data. This is where oracles come into place.

Oracles are any device that interacts with the off-chain world to provide external data or computation to smart contracts.

off-chain data also needs to be decentralized!

Hybrid Smart Contracts

On-Chain + Off-Chain. ChainLink is the perfect example of a decentralized oracles network.

Breakdown :

  • Decentralized : Many node operators ( computers )
  • Tranparent and Flexible : Everybody has the same information
  • Speed and Efficiency : Final settlement takes seconds.
  • Security and Immutability : contracts can't be tempered with. All data is safe on the blockchain.
  • Counterparty risk removal : Trust minimized. Math based agreements.

Some Smart Contracts usage

  1. Defi : Decentralized Finance.
  2. DAO: Decentralized Autonomous Organization.
  3. NFT's : Non-fungible Tokens. Unique data.

Great Start , see you on my next lesson !