The Basics Of Ethereum

by

Blockchained India

What Is Money?

"The eye has never seen, nor the hand touched a dollar"

Alfred Mitchell Ines

The Functional Definition

Medium Of Exchange

Store Of Value

Unit Of Account

Forms Of Money

A Really Long Time Ago -The Barter System

9000 BC - Livestock

3000 BC - Grains (The Shekel)

1200 BC - Sea shells (Cowry)

1000 to 600 BC - Crude Metal Coins

700 BC - Precious Metal Coins

118 BC - Leather Money

806 - Paper Money

1816 - Gold

1913 - Gold Backed US Dollar

1950 - Credit Cards

1971- The Unpegged US Dollar

2009 - Bitcoin

Money And Trust

For any currency to be viable, it must win the trust of the community using it.

What Is Bitcoin?

An Apple

A Digital Apple

The Double Spend Problem

Double spending is the process of successfully spending the some money (or thing) more than once.

The Ledger

The Distributed Ledger

How Bitcoin Works

A State Transition System

- State consisting of the ownership status of all bitcoins (UTXOs).

- State transition function that takes a state and a transaction and outputs a     new state which is the result.

APPLY(S,TX) -> S' or ERROR
APPLY(S,TX)>SorERRORAPPLY(S,TX) -> S' or ERROR

- A Transaction with one or more inputs and one or more outputs.

  1. For each input in TX:
    • If the referenced UTXO is not in S, return an error.
    • If the provided signature does not match the owner of the UTXO, return an error.
  2. If the sum of the denominations of all input UTXO is less than the sum of the denominations of all output UTXO, return an error.
  3. Return S' with all input UTXO removed and all output UTXO added.
APPLY(S,TX) -> S' or ERROR
APPLY(S,TX)>SorERRORAPPLY(S,TX) -> S' or ERROR

Mining

The process of creating consensus in the distributed ledger network, and creating the blockchain.

The Concensus Algorithm

  1. Check if the previous block referenced by the block exists and is valid.
  2. Check that the timestamp of the block is greater than that of the previous block and less than 2 hours into the future
  3. Check that the proof of work on the block is valid.
  4. Let S[0] be the state at the end of the previous block.
  5. Suppose TX is the block's transaction list with n transactions. For all i in 0...n-1, set S[i+1] = APPLY(S[i],TX[i]) If any application returns an error, exit and return false.
  6. Return true, and register S[n] as the state at the end of this block.

Proof Of Work

A proof of work is a piece of data which is difficult (costly, time-consuming) to produce but easy for others to verify and which satisfies certain requirements.

Alternative Applications Of The

Bitcoin Blockchain

Namecoin - Decentralised Name Registration Database

Coloured Coin - Issue your own digital currency

Metacoin - Cryptocurrency protocol with advanced features

Issues With The Bitcoin Blockchain

Scalability

Weak Scripting Capability

Concentration Of Mining Power

Ethereum

“What bitcoin does for payments, Ethereum does for anything that can be programmed”

Ethereum is a blockchain :-

- With a built in fully fledged Turing complete programming language

- That can be used to create 'contracts' that can encode arbitrary state functions

- Which allows users to create decentralised applications simply by writing

  a few lines of code

The Great Grandfather Of Smart Contracts

> if money received == $2.50 
>     && the button pressed is "Diet Coke"
> then release Diet__Coke

Vending Machines 2.0

What if the machine says, "If you put in $1000, this machine will give you $5000!"

Smart Contracts

Smart Contracts are just code which have the trust backing of a blockchain.

Ethereum consists of :-

- The Ethereum Virtual Machine

- A Turing Complete programming language called Solidity

- A P2P Network Protocol

Pros & Cons

- Massive parallelisation causes Ethereum to be much slower         and more expensive than a traditional computer.

- Decentralised consensus gives Ethereum extreme levels of           fault tolerance, ensures zero downtime, and makes data stored   on the blockchain forever unchangable (immutability).

Ethereum's basic unit is the account.

- Externally Owned Account - controlled by private keys

- Contract Accounts - controlled by the contract code

The Account

Ether

This is the native token of Ethereum and serves two key purposes.

- By requiring applications to pay Ether for every operation they perform, broken or   malicious programs are kept from running out of control.

- Given as a reward to miners for keeping the consensus in the system.

Mist

This is Ethereum's end user interface to bring blockchain technologies to non-technical users. It works similar to app stores and browsers

Applications Of Ethereum

- Token Systems

- Financial derivates and stable value currencies

- Identity & Reputation Systems

- Decentralised File Storage

- Decentralised Autonomous Organisations (DAOs)

And many many more...

Augur is a decentralised prediction market which allows users to bet on the outcome of different events and can also be used for hedging purposes.

The Blockchain Disruption