A gentle introduction to smart contracts

News

What are people talking about when they talk about smart contracts?

In the context of blockchains and cryptocurrencies, smart contracts are:
– pre-written logic (computer code),
– stored and replicated on a distributed storage platform (eg a blockchain),
– executed/run by a network of computers (usually the same ones running the blockchain),
– and can result in ledger updates (cryptocurrency payments, etc).

In other words, they are little programs that execute “if this happens then do that”, run and verified by many computers to ensure trustworthiness.

If blockchains give us distributed trustworthy storage, then smart contracts give us distributed trustworthy calculations.

I’ve found three helpful ways to bring them to life:

  1. Bank accounts with embedded instructions
  2. Replacing legal-ese with computer code
  3. An actual smart contract example
  1. Bank accounts with embedded instructions

There are some elements of bank accounts that behave like smart contracts.
My bank account has a balance. Every month, I have an automated payment that deducts a fixed amount and sends it to my landlady. If there isn’t enough money in my bank account, the payment fails, I get fined, and another workflow is triggered.

There are instructions I have set up which are associated with the account.

This is similar to what a smart contract can do, except that a smart contract running on a blockchain is…

Read the full article written by Antony Lewis on bitsonblogs.net

Read full article