bitcoin and blockchain for noobs

Post on 11-Feb-2017

521 Views

Category:

Technology

8 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Cryptocurrency Bitcoin and the Blockchain

8th March, 2016Monik Pamecha

monik@etiole.com

Going back

Barter System

Physical ObjectsWORKS

WHAT ABOUT HIM?!FAILS

FIAT CURRENCIES

MONEY

HAVE FAITH AND HOPE OTHERS WILL HAVE

FAITH

SO WHAT ABOUT BITCOIN?

?

NAME BALANCE

ROHIT 5.00

JOHN 7.32

VINNY 230.22

AWAIZ 93.32

LIST OF RECORDS - LEDGER

6.00

229.22

TRA Transaction

But banks do that any way

So what is different?

BANKS LEDGER

YOU NEED TO TRUST

The banks/authorities

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

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

NETWORK OF RANDOM

STRANGERSBUT EVERYBODY

KNOWS EVERYTHING!!!!

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

So Harsh can’t remain the player

he isBut luckily with bitcoin he can

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

?

?

COMPLETE ANONYMITY

NO Links between real identity and public address on

bitcoin network

So what is a bitcoin transaction like?

Marco Polo 4.00 BTC

1HB5XMLmzFVj8ALj6mfBsbifRoD4miY36v

Marco’s Public Address

Every node* on network is updated

*node = user

That’s easyI can spend everyone

else’s money!

Not so easy

AMIT’s Addres

sYUKTI’s Address5000.0

Signature : ????

1EdL1yeBQCLXaFw97VH3Zuq2dCgDt9Ag9u

L38gXdAApcQd3z8W9zLtZKKzpM9MkG82ttapu4HiVQJ1CbvzfP7n

PUBLIC KEY : SAFE TO SHOW TO THE WORLD

PRIVATE KEY : KEEP IT WITH YOURSELF

EVERY WALLET

AMIT’s Addres

sYUKTI’s Address5000.0

Signature : ????

Signature comes from a function

Transaction Content : Who to and how much?

Your Wallet’s Private Key

304502206e21798a42fae0e854281abd38bacd1aeed3ee3738d9e1446618c4571d1090db022100e2ac980643b0b82c0e88ffdfec6b64e3e6ba35e7ba5fdd7d5d6cc8d25c6b241501

Your Wallet’s Public Key!

Recap

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

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

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!

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

Elliptic Curve Digital Signature Algorithm

AMIT’s Addres

sYUKTI’s Address5000.0

Signature : ????

304402201df3f048877aff61e41066415f4e446033bdb49833a24d37102794a0683c73d5022038d19ad1a71367c285e0e4ff4408405a8b37df4c8a9e36edc3e42fe2ac862f0201

Transaction Content : Who to and how much?

Your Wallet’s Private Key

304502206e21798a42fae0e854281abd38bacd1aeed3ee3738d9e1446618c4571d1090db022100e2ac980643b0b82c0e88ffdfec6b64e3e6ba35e7ba5fdd7d5d6cc8d25c6b241501

5000 to Yukti

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

Questions?

NAME BALANCE

ROHIT 5.00

JOHN 7.32

VINNY 230.22

AWAIZ 93.32

LIST OF RECORDS - LEDGER

6.00

229.22

TRA Transaction

Transactions are stored

+0.008

Transaction

Inputs OutputsPeople giving me bitcoins Me giving people bitcoins

=They must be equal!

What if tx1

tx2

5 btc

7 btc

I want to pay 9 onlyWhat about

extra 3?Send 3 back

to myself

All inputs in a transaction must be

used up

Back to Transactions

Every single bitcoin can be traced to the start

Types of Transactions

Spent

Unspent

Solves the double spending problem partially

Questions?

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!

PROBLEM

ORDERING OF TRANSACTIONS

Which transactions occurred first?

SOLUTIONTHE BLOCKCHAIN

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

Block = Group of transactions

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

So can anybody add their own block?

Yes, but with some effort

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

What is HashingDemo

Computers guess the hash values using

computational power

A single computer = require years

Bitcoin network = Approx. 10 minutes

When will the problem get solved?

EUREKA! PROBLEM SOLVED

WAIT, SOMEBODY ALREADY SOLVED IT BEFORE!

Switch to the longest chain

Multiple chains get orphaned

One more problem

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

How difficult is it to mine consecutive

blocks successfully?

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

Us Against The World

For a malicious node

Questions?

Final PartWhy should anybody invest money and computational power to mine

blocks?

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

Transaction Fees

But bitcoins are limited?

Deflationary Currency

Bitcoins are divisible upto 1 satoshi = 0.00000001 BTC

Blockchain as a consensus mechanism

Thanks!Monik Pamecha

monik@etiole.com@monikkinom

top related