BLOCKCHAIN

AN INTRODUCTION

 

CHRIS PRICE

@100pxls

TRADITIONAL BANKING

BITCOIN

BLOCKCHAIN

SCRIPT

LIGHTNING NETWORKS

TRADITIONAL BANKING

REAL-TIME GROSS SETTLEMENT

Blatter

Putin

x

Blatter
 
20 M

 
Putin
200 B

x

Blatter
 
20 M
20 M + x

 
Putin
200 B
200 B - x
Blatter Central Bank
20 M 0
20 M + x -x
Central Bank Putin
0 200 B
x 200 B - x
Blatter Central Bank
20 M 0
20 M + x -x
Central Bank Putin
0 200 B
x 200 B - x
Bank A Bank B
0 0
x -x

DEFERRED NET SETTLEMENT

Blatter Central Bank
20 M 0
20 M + x -x
Central Bank Putin
0 200 B
x 200 B - x
Bank A Bank B
0 0
Blatter Central Bank
20 M 0
20 M + x -x
20M
+ x + y
-x + -y
Central Bank Putin
0 200 B
x 200 B - x
x + y 200 B
- x - y
Bank A Bank B
0 0
Blatter Central Bank
20 M 0
20 M + x -x
20M
+ x + y
-x + -y
Central Bank Putin
0 200 B
x 200 B - x
x + y 200 B
- x - y
Bank A Bank B
0 0
x + y -x + -y

COUNTERPARTY RISK

Blatter Central Bank
20 M 0
20 M + x -x
20M
+ x + y
-x + -y
Central Bank Putin
0 200 B
x 200 B - x
x + y 200 B
- x - y
Bank A
Settlement
Bank B Settlement Bank A Reserve Bank B Reserve
0 0
x + y -x + -y
Blatter Central Bank
20 M 0
20 M + x -x
20M
+ x + y
-x + -y
Central Bank Putin
0 200 B
x 200 B - x
x + y 200 B
- x - y
Bank A
Settlement
Bank B Settlement Bank A Reserve Bank B Reserve
0 0 ? > x + y
x + y -x + -y ? > x + y

CUSTOMERS TRUST THEIR BANKS TO ACCURATELY RECORD TRANSACTIONS

But the banks don't trust each other...

ULTIMATELY THE BANKS DELEGATE TRUST TO THE CENTRAL BANK

A highly centralised system!

BITCOIN

Mathias Degen from Cologne, Germany - Hippie bug! CC BY-SA 2.0

BITCOIN

DESCRIBE INDIVIDUAL TRANSACTIONS

RECORD THE HISTORY OF TRANSACTIONS

BLOCKCHAIN

Lachlan Fearnley - Own work CC BY-SA 3.0

pattern contains doll pattern contains doll pattern doll
transactions previous block transactions previous block transactions block

MINING

James Hill - Jenny from the Blockchain, Reproduced with permission

FORKS

When in doubt, always pick the hardest path

CONSENSUS

Proof of work exists only to enable consensus

DESCRIBE INDIVIDUAL TRANSACTIONS

RECORD THE HISTORY OF TRANSACTIONS

SCRIPT

MINERS CREATE COINS

By including a transaction with zero* inputs and one or more outputs in the mined block

*Not strictly true

transaction output

USERS TRANSFER COINS

Using transactions with one or more inputs, each referencing a corresponding unspent transaction output (UTXO), and one or more outputs

transaction input output transaction input output transaction output

NO CONCEPT OF ACCOUNT BALANCE

A user's balance is the sum of all UTXOs for which they control the private key

OP_DUP 
OP_HASH160
<address/pubKeyHash>
OP_EQUALVERIFY
OP_CHECKSIG
<sig>
<pubKey>

PAY-TO-PUBKEYHASH

Output (ScriptPubKey)

Input (ScriptSig)

<sig>
<pubKey>
OP_DUP 
OP_HASH160
<address/pubKeyHash>
OP_EQUALVERIFY
OP_CHECKSIG
<EMPTY>

Script

Stack

<pubKey>
OP_DUP 
OP_HASH160
<address/pubKeyHash>
OP_EQUALVERIFY
OP_CHECKSIG
<sig>

Script

Stack

OP_DUP 
OP_HASH160
<address/pubKeyHash>
OP_EQUALVERIFY
OP_CHECKSIG
<pubKey>
<sig>

Script

Stack

OP_HASH160
<address/pubKeyHash>
OP_EQUALVERIFY
OP_CHECKSIG
<pubKey>
<pubKey>
<sig>

Script

Stack

<address/pubKeyHash>
OP_EQUALVERIFY
OP_CHECKSIG
<hashedPubKey>
<pubKey>
<sig>

Script

Stack

OP_EQUALVERIFY
OP_CHECKSIG
<address/pubKeyHash>
<hashedPubKey>
<pubKey>
<sig>

Script

Stack

OP_CHECKSIG
<pubKey>
<sig>

Script

Stack

<EMPTY>
true

Script

Stack

SCRIPT ALLOWS SCRIPTING...

Ethereum is essentially script++

DESCRIBE INDIVIDUAL TRANSACTIONS

RECORD THE HISTORY OF TRANSACTIONS

BLOCK CAPACITY

Transaction verification speed

LIGHTNING NETWORKS

MICROPAYMENT CHANNELS

Putin 10 M

Blatter 0 M

30 days

10 M

2-of-2 Multisig

MICROPAYMENT CHANNELS

Putin 10 M

Blatter 0 M

30 days

Putin 4 M

Blatter 6 M

29 days

10 M

2-of-2 Multisig

MICROPAYMENT CHANNELS

Putin 5 M

Blatter 5 M

30 days

Putin 4 M

Blatter 6 M

29 days

10 M

2-of-2 Multisig

Putin 8 M

Blatter 2 M

28 days

MICROPAYMENT CHANNELS

Putin 5 M

Blatter 5 M

30 days

Putin 4 M

Blatter 6 M

29 days

10 M

2-of-2 Multisig

Putin 8 M

Blatter 2 M

28 days

Putin 0 M

Blatter 10 M

<no limit>

MAJORITY OF TRANSACTIONS OCCUR OFF-CHAIN

Look familiar?

DEFERRED NET SETTLEMENT

But without trust!

ADD HASHLOCKS

JUST A ROUTE OPTIMISATION PROBLEM

Ripple similar but requires offline-trust between connected parties

THE FUTURE ALWAYS LOOKS LIKE THE PAST

DON'T SKIP BITCOIN EN ROUTE TO BLOCKCHAIN

BLOCKCHAIN

AN INTRODUCTION

 

CHRIS PRICE

@100pxls

BLOCKCHAIN - AN INTRODUCTION

By Chris Price

BLOCKCHAIN - AN INTRODUCTION

  • 1,151