bitcoin and blockchain for noobs

71
Cryptocurrency Bitcoin and the Blockchain 8th March, 2016 Monik Pamecha [email protected]

Upload: monik-pamecha

Post on 11-Feb-2017

521 views

Category:

Technology


8 download

TRANSCRIPT

Page 1: Bitcoin and Blockchain for noobs

Cryptocurrency Bitcoin and the Blockchain

8th March, 2016Monik Pamecha

[email protected]

Page 2: Bitcoin and Blockchain for noobs

Going back

Page 3: Bitcoin and Blockchain for noobs

Barter System

Page 4: Bitcoin and Blockchain for noobs

Physical ObjectsWORKS

Page 5: Bitcoin and Blockchain for noobs

WHAT ABOUT HIM?!FAILS

Page 6: Bitcoin and Blockchain for noobs
Page 7: Bitcoin and Blockchain for noobs
Page 8: Bitcoin and Blockchain for noobs

FIAT CURRENCIES

Page 9: Bitcoin and Blockchain for noobs

MONEY

Page 10: Bitcoin and Blockchain for noobs

HAVE FAITH AND HOPE OTHERS WILL HAVE

FAITH

Page 11: Bitcoin and Blockchain for noobs

SO WHAT ABOUT BITCOIN?

Page 12: Bitcoin and Blockchain for noobs

?

Page 13: Bitcoin and Blockchain for noobs
Page 14: Bitcoin and Blockchain for noobs

NAME BALANCE

ROHIT 5.00

JOHN 7.32

VINNY 230.22

AWAIZ 93.32

LIST OF RECORDS - LEDGER

6.00

229.22

TRA Transaction

Page 15: Bitcoin and Blockchain for noobs

But banks do that any way

So what is different?

Page 16: Bitcoin and Blockchain for noobs

BANKS LEDGER

Page 17: Bitcoin and Blockchain for noobs

YOU NEED TO TRUST

The banks/authorities

Page 18: Bitcoin and Blockchain for noobs

EVERYBODY MAINTAINS A COPYImage: http://www.imponderablethings.com/2013/07/how-bitcoin-works-under-hood.html

Page 19: Bitcoin and Blockchain for noobs

Image: http://www.imponderablethings.com/2013/07/how-bitcoin-works-under-hood.html

Page 20: Bitcoin and Blockchain for noobs

NETWORK OF RANDOM

STRANGERSBUT EVERYBODY

KNOWS EVERYTHING!!!!

Page 21: Bitcoin and Blockchain for noobs

600.00 for a date with Alisha

240.00 for a date with Akansha

1200 for a date with Rohini20.00 Vada Pav

with himself

JOEY’s Pizza

Dosa guy outside

6 and 3/4 Hills

OUR INSANELY DELICIOUS FOOD SERVING CANTEEN

HARSH’s TRANSACTIONS

Page 22: Bitcoin and Blockchain for noobs

So Harsh can’t remain the player

he isBut luckily with bitcoin he can

Page 23: Bitcoin and Blockchain for noobs

600.00 for a date with Alisha

240.00 for a date with Akansha

20.00 Vada Pav

with himself

JOEY’s Pizza

Dosa guy outside

6 and 3/4 Hills

OUR INSANELY DELICIOUS FOOD SERVING CANTEEN

1HB5XMLmzFVj8ALj6mfBsbifRoD4miY36

v

1K9C8kGBhb6e5i2VYN6NXEqBbsd635Lt9y1PjoMgwHZ9LoBR14ibgSpcBLsWciMjjitq

185X18qsBYtWMKvBMK1dtN2EZEZW

zwn2tW

158H1mtB4iDNkZyVxtK82rZoF6S2xMH69S

?

1200 for a date with Rohini

?

?

Page 24: Bitcoin and Blockchain for noobs

COMPLETE ANONYMITY

NO Links between real identity and public address on

bitcoin network

Page 25: Bitcoin and Blockchain for noobs

So what is a bitcoin transaction like?

Page 26: Bitcoin and Blockchain for noobs

Marco Polo 4.00 BTC

1HB5XMLmzFVj8ALj6mfBsbifRoD4miY36v

Marco’s Public Address

Page 27: Bitcoin and Blockchain for noobs

Every node* on network is updated

*node = user

Page 28: Bitcoin and Blockchain for noobs

That’s easyI can spend everyone

else’s money!

Not so easy

Page 29: Bitcoin and Blockchain for noobs

AMIT’s Addres

sYUKTI’s Address5000.0

Signature : ????

Page 30: Bitcoin and Blockchain for noobs

1EdL1yeBQCLXaFw97VH3Zuq2dCgDt9Ag9u

L38gXdAApcQd3z8W9zLtZKKzpM9MkG82ttapu4HiVQJ1CbvzfP7n

PUBLIC KEY : SAFE TO SHOW TO THE WORLD

PRIVATE KEY : KEEP IT WITH YOURSELF

EVERY WALLET

Page 31: Bitcoin and Blockchain for noobs

AMIT’s Addres

sYUKTI’s Address5000.0

Signature : ????

Page 32: Bitcoin and Blockchain for noobs

Signature comes from a function

Transaction Content : Who to and how much?

Your Wallet’s Private Key

304502206e21798a42fae0e854281abd38bacd1aeed3ee3738d9e1446618c4571d1090db022100e2ac980643b0b82c0e88ffdfec6b64e3e6ba35e7ba5fdd7d5d6cc8d25c6b241501

Your Wallet’s Public Key!

Page 33: Bitcoin and Blockchain for noobs

Recap

Image: http://www.imponderablethings.com/2013/07/how-bitcoin-works-under-hood.html

Page 34: Bitcoin and Blockchain for noobs

AMIT’s Address

YUKTI’s Address

5000.0 304502206e21798a42fae0e854281abd38bacd1aeed3ee3738d9e1446618c4571d1090db022100e2ac980643b0b82c0e88ffdfec6b64e3e6ba35e7ba5fdd7d5d6cc8d25c6b241501

1EdL1yeBQCLXaFw97VH3Zuq2dCgDt9Ag9u

EVERY NODE WILL CHECK

1HB5XMLmzFVj8ALj6mfBsbifRoD4

miY36v

DO THEY MATCH?

This function gives public key from

signature

Page 35: Bitcoin and Blockchain for noobs

AMIT’s Address

YUKTI’s Address

5000.0 304502206e21798a42fae0e854281abd38bacd1aeed3ee3738d9e1446618c4571d1090db022100e2ac980643b0b82c0e88ffdfec6b64e3e6ba35e7ba5fdd7d5d6cc8d25c6b241501

1EdL1yeBQCLXaFw97VH3Zuq2dCgDt9Ag9u

AMIT’s Address

PIYA’s Address

4000.0 304402201df3f048877aff61e41066415f4e446033bdb49833a24d37102794a0683c73d5022038d19ad1a71367c285e0e4ff4408405a8b37df4c8a9e36edc3e42fe2ac862f0201

185X18qsBYtWMKvBMK1dtN2EZEZWzwn2tW

They are different! Each transaction will have a

different sign!

Page 36: Bitcoin and Blockchain for noobs

What are f(x) and g(x)?

Elliptic Curve Digital Signature Algorithm

Page 37: Bitcoin and Blockchain for noobs

AMIT’s Addres

sYUKTI’s Address5000.0

Signature : ????

304402201df3f048877aff61e41066415f4e446033bdb49833a24d37102794a0683c73d5022038d19ad1a71367c285e0e4ff4408405a8b37df4c8a9e36edc3e42fe2ac862f0201

Page 38: Bitcoin and Blockchain for noobs

Transaction Content : Who to and how much?

Your Wallet’s Private Key

304502206e21798a42fae0e854281abd38bacd1aeed3ee3738d9e1446618c4571d1090db022100e2ac980643b0b82c0e88ffdfec6b64e3e6ba35e7ba5fdd7d5d6cc8d25c6b241501

5000 to Yukti

Page 39: Bitcoin and Blockchain for noobs

What do we know?Each transaction = unique

signatureEach transaction = Can be verified who signed it

Each transaction = Any attempt to manipulate transaction invalidates the sign

Page 40: Bitcoin and Blockchain for noobs

Questions?

Page 41: Bitcoin and Blockchain for noobs

NAME BALANCE

ROHIT 5.00

JOHN 7.32

VINNY 230.22

AWAIZ 93.32

LIST OF RECORDS - LEDGER

6.00

229.22

TRA Transaction

Page 42: Bitcoin and Blockchain for noobs

Transactions are stored

+0.008

Page 43: Bitcoin and Blockchain for noobs

Transaction

Inputs OutputsPeople giving me bitcoins Me giving people bitcoins

=They must be equal!

Page 44: Bitcoin and Blockchain for noobs

What if tx1

tx2

5 btc

7 btc

I want to pay 9 onlyWhat about

extra 3?Send 3 back

to myself

Page 45: Bitcoin and Blockchain for noobs

All inputs in a transaction must be

used up

Page 46: Bitcoin and Blockchain for noobs

Back to Transactions

Page 47: Bitcoin and Blockchain for noobs

Every single bitcoin can be traced to the start

Page 48: Bitcoin and Blockchain for noobs

Types of Transactions

Spent

Unspent

Solves the double spending problem partially

Page 49: Bitcoin and Blockchain for noobs

Questions?

Page 50: Bitcoin and Blockchain for noobs

Double spending problem

1. Alice wants buy stuff from Bob2. Alice sends Bob some bitcoins3. Takes the items4. Alice sends himself some bitcoins

referencing same inputs5. Possibility that Alice’s transaction to

himself gets confirmed6. All other users will reject Alice -> Bob

transaction7. Alice get’s the stuff for free!

Page 51: Bitcoin and Blockchain for noobs

PROBLEM

ORDERING OF TRANSACTIONS

Which transactions occurred first?

Page 52: Bitcoin and Blockchain for noobs

SOLUTIONTHE BLOCKCHAIN

Image: http://www.imponderablethings.com/2013/07/how-bitcoin-works-under-hood.html

Page 53: Bitcoin and Blockchain for noobs

Block = Group of transactions

Image: http://www.imponderablethings.com/2013/07/how-bitcoin-works-under-hood.html

Page 54: Bitcoin and Blockchain for noobs

So can anybody add their own block?

Yes, but with some effort

Page 55: Bitcoin and Blockchain for noobs

Image: http://www.imponderablethings.com/2013/07/how-bitcoin-works-under-hood.html

Page 56: Bitcoin and Blockchain for noobs

What is HashingDemo

Page 57: Bitcoin and Blockchain for noobs

Computers guess the hash values using

computational power

A single computer = require years

Bitcoin network = Approx. 10 minutes

Page 58: Bitcoin and Blockchain for noobs

When will the problem get solved?

Page 59: Bitcoin and Blockchain for noobs

EUREKA! PROBLEM SOLVED

WAIT, SOMEBODY ALREADY SOLVED IT BEFORE!

Switch to the longest chain

Page 60: Bitcoin and Blockchain for noobs

Multiple chains get orphaned

Page 61: Bitcoin and Blockchain for noobs

One more problem

Image: http://www.imponderablethings.com/2013/07/how-bitcoin-works-under-hood.html

Page 62: Bitcoin and Blockchain for noobs

How difficult is it to mine consecutive

blocks successfully?

Page 63: Bitcoin and Blockchain for noobs

q=0.1

z=0 P=1.0000000 z=1 P=0.2045873 z=2 P=0.0509779 z=3 P=0.0131722 z=4 P=0.0034552 z=5 P=0.0009137 z=6 P=0.0002428 z=7 P=0.0000647 z=8 P=0.0000173 z=9 P=0.0000046 z=10 P=0.0000012

As number of blocks to catch up increase,Probability to catch up decreases exponentially

Satoshi Whitepaper : http://bitcoin.org/bitcoin.pdf

Page 64: Bitcoin and Blockchain for noobs

Us Against The World

For a malicious node

Page 65: Bitcoin and Blockchain for noobs

Questions?

Page 66: Bitcoin and Blockchain for noobs

Final PartWhy should anybody invest money and computational power to mine

blocks?

Page 67: Bitcoin and Blockchain for noobs

The bitcoin reward per block

Smart way of introducing bitcoins into the economy

Rewards halve every year and will eventually stop

Current Reward = 50 bitcoins

Page 68: Bitcoin and Blockchain for noobs

Transaction Fees

Page 69: Bitcoin and Blockchain for noobs

But bitcoins are limited?

Deflationary Currency

Bitcoins are divisible upto 1 satoshi = 0.00000001 BTC

Page 70: Bitcoin and Blockchain for noobs

Blockchain as a consensus mechanism

Page 71: Bitcoin and Blockchain for noobs

Thanks!Monik Pamecha

[email protected]@monikkinom