bitcoin: synchronization and sharing of transactions · the mtgox incident i july 2010: first trade...

118
Bitcoin: Synchronization and Sharing of Transactions Roger Wattenhofer ETH Zurich – Distributed Computing Group – www.disco.ethz.ch

Upload: others

Post on 08-Aug-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Bitcoin: Synchronization andSharing of Transactions

Roger Wattenhofer

ETH Zurich – Distributed Computing Group – www.disco.ethz.ch

Page 2: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I
Page 3: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

20102011

20122013

20142015

0

200

400

600

800

1000

1200

Pri

ce [

USD

/BTC

]

Exchange Rate USD/BTC

Page 4: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I
Page 5: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

What is Bitcoin?

+ + =

Page 6: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Bitcoin Basics

Page 7: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

The Bank of Bitcoin

User BalanceA 2B 5C 8

TXB −→ A

User BalanceA 2 4B 5 3C 8

Page 8: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

The Bank of Bitcoin

User BalanceA 2B 5C 8

TXB −→ A

User BalanceA 2 4B 5 3C 8

Page 9: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

The Bank of Bitcoin

User BalanceA 2B 5C 8

TXB −→ A

User BalanceA 2 4B 5 3C 8

Page 10: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

The Bank of Bitcoin

User BalanceA 2B 5C 8

TXB −→ A

User BalanceA 2 4B 5 3C 8

Page 11: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Opening an Account in Bitcoin

Private Key Public Key Address

Page 12: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Transferring Bitcoins

TX: 41b221

B0.1

A4.798

A4.899

Inputs OutputsFee

0.001

Prev. TX:a1a53743

4.899

0

C...

1

|Outputs

Page 13: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Transferring Bitcoins

TX: 41b221

B0.1

A4.798

A4.899

Inputs OutputsFee

0.001

Prev. TX:a1a53743

4.899

0

C...

1

|Outputs

Page 14: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Transferring Bitcoins

TX: 41b221

B0.1

A4.798

A4.899

Inputs OutputsFee

0.001

Prev. TX:a1a53743

4.899

0

C...

1

|Outputs

Page 15: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Transferring Bitcoins

TX: 41b221

B0.1

A4.798

A4.899

Inputs OutputsFee

0.001

Prev. TX:a1a53743

4.899

0

C...

1

|Outputs

Page 16: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Transferring Bitcoins

TX: 41b221

B0.1

A4.798

A4.899

Inputs Outputs

Fee

0.001

Prev. TX:a1a53743

4.899

0

C...

1

|Outputs

Page 17: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Transferring Bitcoins

TX: 41b221

B0.1

A4.798

A4.899

Inputs OutputsFee

0.001

Prev. TX:a1a53743

4.899

0

C...

1

|Outputs

Page 18: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Transferring Bitcoins

TX: 41b221

B0.1

A4.798

A4.899

Inputs OutputsFee

0.001

Prev. TX:a1a53743

4.899

0

C...

1

|Outputs

Page 19: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Distributing the Bank

User BalanceA 2B 5C 8

TX

TX

Page 20: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Distributing the Bank

TX

Page 21: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Distributing the Bank

TX

Page 22: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Distributing the Bank

TX

Page 23: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Distributing the Bank

TX

Page 24: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Distributing the Bank

TX

Page 25: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Let’s Buy a Snack

[Bamert, Decker, Elsen, W, Welten, 2013]

Page 26: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Doublespending

TX B1

A

1

1

Inputs

Outputs

TX’ A1

1

Page 27: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Doublespending

TX B1

A

1

1

Inputs

Outputs

TX’ A1

1

Page 28: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Doublespending

TX B1

A

1

1

Inputs

Outputs

TX’ A1

1

Page 29: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Transaction Conflicts

TX

TX

Page 30: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Transaction Conflicts

TX

TX

Page 31: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Transaction Conflicts

TX

TX

Page 32: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Transaction Conflicts

TX

TX

Page 33: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Resolving Conflicts

Green!

Page 34: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Resolving Conflicts

Green!

Page 35: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Resolving Conflicts

Green!

Page 36: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

How to Choose a Leader?

Page 37: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Proof-of-Work

Block

H(Previous Block)

TX TX TX TX

I H(Block|0) → 094d66aa7c844a9dbb516a41259b5877. . .

I H(Block|1) → f2496854af8bf989171587a9259f634f. . .

I H(Block|2) → aec87c0ca2e5eb3f23111092f1089ada. . .

I H(Block|3) → 777f75b2a8ecfdc8026c236fc1d2ffa0. . ....

I H(Block|961127) → 0000014823419622d4c133672a7d657e. . .

Page 38: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Proof-of-Work

Block

H(Previous Block)

TX TX TX TX

I H(Block|0) → 094d66aa7c844a9dbb516a41259b5877. . .

I H(Block|1) → f2496854af8bf989171587a9259f634f. . .

I H(Block|2) → aec87c0ca2e5eb3f23111092f1089ada. . .

I H(Block|3) → 777f75b2a8ecfdc8026c236fc1d2ffa0. . ....

I H(Block|961127) → 0000014823419622d4c133672a7d657e. . .

Page 39: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Proof-of-Work

Block

H(Previous Block) TX TX TX TX

I H(Block|0) → 094d66aa7c844a9dbb516a41259b5877. . .

I H(Block|1) → f2496854af8bf989171587a9259f634f. . .

I H(Block|2) → aec87c0ca2e5eb3f23111092f1089ada. . .

I H(Block|3) → 777f75b2a8ecfdc8026c236fc1d2ffa0. . ....

I H(Block|961127) → 0000014823419622d4c133672a7d657e. . .

Page 40: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Proof-of-Work

Block

H(Previous Block) TX TX TX TX

I H(Block) → fd2e2055f117bfa261b5a6c7e11df367. . .

I H(Block|0) → 094d66aa7c844a9dbb516a41259b5877. . .

I H(Block|1) → f2496854af8bf989171587a9259f634f. . .

I H(Block|2) → aec87c0ca2e5eb3f23111092f1089ada. . .

I H(Block|3) → 777f75b2a8ecfdc8026c236fc1d2ffa0. . ....

I H(Block|961127) → 0000014823419622d4c133672a7d657e. . .

Page 41: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Proof-of-Work

Block

H(Previous Block) TX TX TX TX Nonce

I H(Block|0) → 094d66aa7c844a9dbb516a41259b5877. . .

I H(Block|1) → f2496854af8bf989171587a9259f634f. . .

I H(Block|2) → aec87c0ca2e5eb3f23111092f1089ada. . .

I H(Block|3) → 777f75b2a8ecfdc8026c236fc1d2ffa0. . ....

I H(Block|961127) → 0000014823419622d4c133672a7d657e. . .

Page 42: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Proof-of-Work

Block

H(Previous Block) TX TX TX TX Nonce

I H(Block|0) → 094d66aa7c844a9dbb516a41259b5877. . .

I H(Block|1) → f2496854af8bf989171587a9259f634f. . .

I H(Block|2) → aec87c0ca2e5eb3f23111092f1089ada. . .

I H(Block|3) → 777f75b2a8ecfdc8026c236fc1d2ffa0. . ....

I H(Block|961127) → 0000014823419622d4c133672a7d657e. . .

Page 43: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Proof-of-Work

Block

H(Previous Block) TX TX TX TX Nonce

I H(Block|0) → 094d66aa7c844a9dbb516a41259b5877. . .

I H(Block|1) → f2496854af8bf989171587a9259f634f. . .

I H(Block|2) → aec87c0ca2e5eb3f23111092f1089ada. . .

I H(Block|3) → 777f75b2a8ecfdc8026c236fc1d2ffa0. . ....

I H(Block|961127) → 0000014823419622d4c133672a7d657e. . .

Page 44: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Proof-of-Work

Block

H(Previous Block) TX TX TX TX Nonce

I H(Block|0) → 094d66aa7c844a9dbb516a41259b5877. . .

I H(Block|1) → f2496854af8bf989171587a9259f634f. . .

I H(Block|2) → aec87c0ca2e5eb3f23111092f1089ada. . .

I H(Block|3) → 777f75b2a8ecfdc8026c236fc1d2ffa0. . ....

I H(Block|961127) → 0000014823419622d4c133672a7d657e. . .

Page 45: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

The Blockchain

Time

Page 46: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

The Blockchain

Time

Page 47: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Is Bitcoin stable?

Page 48: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

The Blockchain

Time

Page 49: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

The Blockchain

Time

Page 50: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Propagation Speed

0 10 20 30 40 50 60Time since first observation [s]

0.00

0.02

0.04

0.06

0.08

0.10

0.12PD

FBlock propagation

[Decker, W, 2013]http://bitcoinstats.com

Page 51: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Propagation Speed

0 10 20 30 40 50 60Time since first observation [s]

0.00

0.02

0.04

0.06

0.08

0.10

0.12PD

FBlock propagation

50thp

erc.[Decker, W, 2013]http://bitcoinstats.com

Page 52: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Propagation Speed

0 10 20 30 40 50 60Time since first observation [s]

0.00

0.02

0.04

0.06

0.08

0.10

0.12PD

FBlock propagation

50thp

erc.

95thp

erc.

[Decker, W, 2013]http://bitcoinstats.com

Page 53: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Propagation Speed

0 10 20 30 40 50 60Time since first observation [s]

0.00

0.02

0.04

0.06

0.08

0.10

0.12PD

FBlock propagation

[Decker, W, 2013]http://bitcoinstats.com

Page 54: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Blockchain Forks

180000 182000 184000 186000 188000 190000Blockchain Height

0

2

4

6

8

10

12

Fork

sBlockchain forks

1.69%

[Decker, W, 2013]

Page 55: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Aside: Mining Evolution

20102011

20122013

20142015

10-10

10-9

10-8

10-7

10-6

10-5

10-4

10-3

10-2

10-1

100

101

102

103

Hash

rate

PH

/s

Hashrate evolution

Page 56: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Aside: Mining Evolution

20102011

20122013

20142015

10-10

10-9

10-8

10-7

10-6

10-5

10-4

10-3

10-2

10-1

100

101

102

103

Hash

rate

PH

/s

Hashrate evolution

Page 57: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Aside: Mining Evolution

20102011

20122013

20142015

10-10

10-9

10-8

10-7

10-6

10-5

10-4

10-3

10-2

10-1

100

101

102

103

Hash

rate

PH

/s

Hashrate evolution

Page 58: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Summary

TX

Green!

Block

H(Previous Block) TX TX TX TX Nonce

Time

Page 59: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

How to Lose $500M

Page 60: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Addressing Transaction Malleability: MtGox has detectedunusual activity on its Bitcoin wallets and performedinvestigations during the past weeks.

Page 61: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

The MtGox Incident

I July 2010: First trade on MtGox

I May 2011: Transaction malleability identified as low priority issue

I February 7, 2014: MtGox halts withdrawals

I February 10, 2014: MtGox announces loss of 850,000 bitcoins (620millio USD) and cites transaction malleability as root cause

I February 28, 2014: MtGox files for bankruptcy

I March 7 2014: MtGox finds 200,000 bitcoins

I August 2015: MtGox CEO is arrested

Page 62: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Signatures

00 00

61 af bb 4d e9 f8 b8 74 86 1e

There are multiple ways to serialize a signature:

I Multiple push operations (1 byte, 2 byte, 4 byte)

I Non-canonical DER encodings

I Padding

I . . .

Page 63: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Signatures

00 00 61 af bb 4d e9 f8 b8 74 86 1e

There are multiple ways to serialize a signature:

I Multiple push operations (1 byte, 2 byte, 4 byte)

I Non-canonical DER encodings

I Padding

I . . .

Page 64: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Transaction Malleability Attack

TX

TX

TX

TX

TX

Red!

TX?Refund

Page 65: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Transaction Malleability Attack

TX

TX

TX

TX

TX

Red!

TX?Refund

Page 66: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Transaction Malleability Attack

TX

TX

TX

TX

TX

Red!

TX?Refund

Page 67: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Transaction Malleability Attack

TX

TX

TX

TX

TX

Red!

TX?Refund

Page 68: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Transaction Malleability Attack

TX

TX

TX

TX

TX

Red!

TX?

Refund

Page 69: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Transaction Malleability Attack

TX

TX

TX

TX

TX

Red!

TX?

Refund

Page 70: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Incident Timeline

Feb 01 2014

Feb 04 2014

Feb 07 2014

Feb 10 2014

Feb 13 2014

Feb 16 2014

Feb 19 2014

Feb 22 2014

Feb 25 2014

Feb 28 20140

50000

100000

150000

200000

250000

300000

350000

bit

coin

s

0

5000

10000

15000

20000

25000

30000

transa

ctio

ns

1st

Pre

ss R

ele

ase

2nd P

ress

Rele

ase

Cumulative malleable doublespends

value

number

386 BTC

[Decker, W, 2014]

Page 71: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Incident Timeline

Feb 01 2014

Feb 04 2014

Feb 07 2014

Feb 10 2014

Feb 13 2014

Feb 16 2014

Feb 19 2014

Feb 22 2014

Feb 25 2014

Feb 28 20140

50000

100000

150000

200000

250000

300000

350000

bit

coin

s

0

5000

10000

15000

20000

25000

30000

transa

ctio

ns

1st

Pre

ss R

ele

ase

2nd P

ress

Rele

ase

Cumulative malleable doublespends

value

number

386 BTC

[Decker, W, 2014]

Page 72: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Is Bitcoin Secure?

Page 73: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Securing Your Bitcoins

[Bamert, Decker, W, 2013]

Page 74: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Does Bitcoin Scale?

Page 75: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

The Bitcoin Ecosystem is Growing

20102011

20122013

20142015

0

20000

40000

60000

80000

100000

120000

140000

Tra

nsa

ctio

ns

Daily Transaction Volume

Page 76: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Scalability Limits

I Disk space: < 500 transactions per second

I Processing power: < 200 transactions per second

I Network bandwidth: < 100 transactions per second

I Artificial 1MB limit: < 3 transactions per second

Today:

I Bitcoin: 1 transaction per second

I Credit Cards: > 10, 000 transactions per second

Page 77: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Scalability Limits

I Disk space: < 500 transactions per second

I Processing power: < 200 transactions per second

I Network bandwidth: < 100 transactions per second

I Artificial 1MB limit: < 3 transactions per second

Today:

I Bitcoin: 1 transaction per second

I Credit Cards: > 10, 000 transactions per second

Page 78: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Scalability Limits

I Disk space: < 500 transactions per second

I Processing power: < 200 transactions per second

I Network bandwidth: < 100 transactions per second

I Artificial 1MB limit: < 3 transactions per second

Today:

I Bitcoin: 1 transaction per second

I Credit Cards: > 10, 000 transactions per second

Page 79: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Scalability Limits

I Disk space: < 500 transactions per second

I Processing power: < 200 transactions per second

I Network bandwidth: < 100 transactions per second

I Artificial 1MB limit: < 3 transactions per second

Today:

I Bitcoin: 1 transaction per second

I Credit Cards: > 10, 000 transactions per second

Page 80: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Scalability Limits

I Disk space: < 500 transactions per second

I Processing power: < 200 transactions per second

I Network bandwidth: < 100 transactions per second

I Artificial 1MB limit: < 3 transactions per second

Today:

I Bitcoin: 1 transaction per second

I Credit Cards: > 10, 000 transactions per second

Page 81: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Payment Network

Page 82: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Payment Network

Page 83: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Payment Network

Page 84: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Micropayment Channels

5

5

T=100 5

5

0

4

1

3

2

Page 85: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Micropayment Channels

5 5

T=100 5

5

0

4

1

3

2

Page 86: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Micropayment Channels

5 5

T=100 5

5

0

4

1

3

2

Page 87: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Micropayment Channels

5 5

T=100 5

5

0

4

1

3

2

Page 88: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Micropayment Channels

5 5

T=100 5

5

0

4

1

3

2

Page 89: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Micropayment Channels

5 5

T=100 5

5

0

4

1

3

2

Page 90: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Micropayment Channels

5 5

T=100 5

5

0

4

1

3

2

Page 91: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Micropayment Channels

5 5

T=100 5

5

0

4

1

3

2

Page 92: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Micropayment Channels

5 5

T=100 5

5

0

4

1

3

2

Page 93: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Atomic Multiparty Opt-In

Page 94: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Atomic Multiparty Opt-In

Page 95: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Atomic Multiparty Opt-In

Page 96: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Invalidating Transactions

T=100

T=99

Page 97: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Invalidating Transactions

T=100

T=99

Page 98: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Bidirectional Transfers

5 5

5

0

4 4

4

0

0

5

1

3

Page 99: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Bidirectional Transfers

5 5

5

0

4 4

4

0

0

5

1

3

Page 100: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Bidirectional Transfers

5 5

5

0

4 4

4

0

0

5

1

3

Page 101: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Duplex Micropayment Channels

Setup Invalidation Tree Micropayment Channels

T = 100 T = 100 T = 100

T = 99 T = 100 T = 100

T = 99 T = 100

T = 99

Page 102: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Duplex Micropayment Channels

Setup Invalidation Tree Micropayment Channels

T = 100 T = 100 T = 100

T = 99 T = 100 T = 100

T = 99 T = 100

T = 99

Page 103: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Duplex Micropayment Channels

Setup Invalidation Tree Micropayment Channels

T = 100 T = 100 T = 100

T = 99 T = 100 T = 100

T = 99 T = 100

T = 99

Page 104: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Duplex Micropayment Channels

Setup Invalidation Tree Micropayment Channels

T = 100 T = 100 T = 100

T = 99 T = 100 T = 100

T = 99 T = 100

T = 99

Page 105: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Duplex Micropayment Channels

Setup Invalidation Tree Micropayment Channels

T = 100 T = 100 T = 100

T = 99 T = 100 T = 100

T = 99 T = 100

T = 99

Page 106: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Summary

Red!

TX?Refund

T = 100 T = 100 T = 100

T = 99 T = 100 T = 100

T = 99 T = 100

T = 99

Page 107: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Thank you, questions?

Thanks to Christian Decker

ETH Zurich – Distributed Computing Group – www.disco.ethz.ch

Page 108: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Securing Fast Payments

Page 109: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Let’s Buy a Snack

[Bamert, Decker, Elsen, W, Welten, 2013]

Page 110: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Transaction Confidence

TX

confidence(TX ) =

Page 111: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Transaction Confidence

TX

confidence(TX ) =

Page 112: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Transaction Confidence

TX

confidence(TX ) =

Page 113: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Transaction Confidence

TX

confidence(TX ) =

Page 114: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Transaction Confidence

TX

confidence(TX ) =

Page 115: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Doublespend Detection

0 20 40 60 80 100Node sample size

0.0

0.2

0.4

0.6

0.8

1.0D

ete

ctio

n p

robabili

tyDoublespend detection

[Bamert, Decker, Elsen, W, Welten, 2013]

Page 116: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Time to Detection

20 40 60 80 100Node sample size

0

2

4

6

8

10

12

14

Tim

e [

s]Time until detection

Average time

Median time

95 percentile

99 percentile

[Bamert, Decker, Elsen, W, Welten, 2013]

Page 117: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Successful Doublespend

0 20 40 60 80 100Node sample size

0.00

0.05

0.10

0.15

0.20

0.25

0.30

0.35

0.40

0.45

Pro

babili

tyProbability of successful double spend

[Bamert, Decker, Elsen, W, Welten, 2013]

Page 118: Bitcoin: Synchronization and Sharing of Transactions · The MtGox Incident I July 2010: First trade on MtGox I May 2011: Transaction malleability identi ed as low priority issue I

Successful Doublespend

0 20 40 60 80 100Node sample size

0.00

0.05

0.10

0.15

0.20

0.25

0.30

0.35

0.40

0.45

Pro

babili

tyProbability of successful double spend

0.088%

[Bamert, Decker, Elsen, W, Welten, 2013]