Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Demystifying the Blockchain Hype

David Evans
October 25, 2016

Demystifying the Blockchain Hype

Talk at #hashtagzero meetup
Willow Tree Apps, Charlottesville
25 October 2016

David Evans

October 25, 2016
Tweet

More Decks by David Evans

Other Decks in Technology

Transcript

  1. Demystifying the Blockchain Hype Blockchain Meetup Willow Tree Apps 25

    October 2016 David Evans University of Virginia www.cs.virginia.edu/evans bitcoin-class.org
  2. 6 For thousands of years, philosophers, thinkers and prophets have

    besmirched money and called it the root of all evil. Be that as it may, money is also the apogee of human tolerance. Money is more open- minded than language, state laws, cultural codes , religious beliefs and social habits. Money is the only trust system created by humans that can bridge almost any cultural gap, and that does not discriminate on the basis of religion, gender, race, age or sexual orientation. Thanks to money, even people who don’t know each other and don’t trust each other can nevertheless cooperate effectively.
  3. Paradox of Money 7 Money works because people trust it.

    People trust money because it works. Need a starting point: where does that trust begin.
  4. Owning and Transferring a Coin 11 Alice: “I, Alice, give

    coin x to Bob.” Only Alice should be able to say this (if she owns coin x). Everyone should be able to trust it is valid. Bob should now own coin x.
  5. Asymmetry Required Need a function f that is: Easy to

    compute: given x, easy to compute f (x) Hard to invert: given f (x), hard to compute x Has a trap-door: given f (x) and t, easy to compute x 12
  6. Using Asymmetric Crypto: Signatures 13 E D Verified Message Signed

    Message Message Insecure Channel KUB KRB Bob Generates key pair: KUB , KRB Publishes KUB Anyone Get KUB from trusted provider
  7. Transferring a Coin 14 Alice signs m1 = “I, Alice

    (KUA ), give coin x, t to Bob (KUB ).” with her private signing key, KRA . How does Bob transfer x to Colleen (KUC )?
  8. Transferring a Coin 15 Bob signs m2 = “I give

    coin x, given to me by m1 to Colleen (KUC ).” with KRB . Alice signs m1 = “I, Alice (KUA ), give coin x to Bob (KUB ).” with her private signing key, KRA .
  9. Transferring a Coin 16 Bob signs m2 = “I give

    coin x, given to me by m1 to Colleen (KUC ).” with KRB . Alice signs m1 = “I, Alice (KUA ), give coin x to Bob (KUB ).” with her private signing key, KRA . Colleen signs m3 = “I give coin x, given to me by m2 to Dave (KUD ).” with KRC . This does not solve: how to create x how to prevent double spending ...
  10. Centralized Digital Currency 17 Trusted Bank Account No. Owner’s Identify

    Value 3022493 Alice 2033.23 3022494 Bob 85733.03 3022495 Colleen 24331.77 3022496 Dave 0.01
  11. Double Spending Challenge 23 M = transfer X to Bob

    SignKRA [H(M)] Bob wants to verify: 1. Alice owns X 2. Alice hasn’t transferred X 3. The coin will be valuable for Bob
  12. Double Spending Challenge 24 M = transfer X to Bob

    SignKRA [H(M)] Bob wants to verify: 1. Alice owns X 2. Alice hasn’t transferred X 3. The coin will be valuable for Bob Node C Node A Node B txb txb
  13. 25 M = transfer X to Bob SignKRA [H(M)] Bob

    wants to verify: 1. Alice owns X 2. Alice hasn’t transferred X 3. The coin will be valuable for Bob Node C Node A Node B txb txb M = transfer X to Coleen SignKRA [H(M)] txc
  14. 26 M = transfer X to Bob SignKRA [H(M)] Bob

    wants to verify: 1. Alice owns X 2. Alice hasn’t transferred X 3. The coin will be valuable for Bob Node C Node A Node B txb txb M = transfer X to Coleen SignKRA [H(M)] txc
  15. 27 M = transfer X to Bob SignKRA [H(M)] Bob

    wants to verify: 1. Alice owns X 2. Alice hasn’t transferred X 3. The coin will be valuable for Bob Node C Node A Node B txb txb M = transfer X to Coleen SignKRA [H(M)] txc Node E Node D
  16. Blockchain 29 B0 H(B0) Nonce Transactions H(B1) Nonce Transactions H(B2)

    Nonce Transactions Distributed ledger maintained by network of untrusted nodes Blocks added require proof-of-work Node’s agree to consensus: longest (most difficult) chain Incentives designed to encourage network nodes to: Validate and record transactions Spend effort on extending consensus chain
  17. 30 Bitcoin Transaction Input 1: v1 , a1 Input 2:

    v2 , a2 … Output 1: x1 , d1 Output 2: x2 , d2 … transaction fees = sum(input values) – sum(output values) (must be non-negative for valid transaction)
  18. Bitcoin Script 31 OP_DATA <public key> OP_CHECKSIG Locking Script OP_DATA

    <signature> Unlocking Script Transaction a0b6ea….. Input 1: v1 , a1 Output 1: x1 , d1 Output 2: x2 , d2 … Transaction d8730d… Locking Script Unlocking Script If Bitcoin Address were just public key Spender provides unlocking script, transaction is valid if stack ends with 1 on top
  19. Bitcoin Script 32 OP_DUP OP_HASH160 OP_DATA <bitcoin address> OP_EQUALVERIFY OP_CHECKSIG

    Locking Script OP_DATA <signature> OP_DATA <public key> Unlocking Script Transaction a0b6ea….. Input 1: v1 , a1 Output 1: x1 , d1 Output 2: x2 , d2 … Transaction d8730d… Locking Script Unlocking Script Bitcoin Address = H(public key)
  20. 37 Bitcoin Transaction Input 1: v1 , a1 Input 2:

    v2 , a2 … Output 1: x1 , d1 Output 2: x2 , d2 … transaction fees = sum(input values) – sum(output values) (must be non-negative for valid transaction) How is new bitcoin created?
  21. 38 Coinbase Transaction Output 1: x1 , d1 Output 2:

    x2 , d2 … sum(output values) ≤ sum(transaction fees) + mining reward mining reward = 50 BTC 2floor(block number / 210,000)
  22. 39

  23. Bitcoin’s Proof-of-Work 40 B0 H(B0) Nonce Transactions H(B1) Nonce Transactions

    H(B2) Nonce Transactions Find a nonce x such that: SHA-256(SHA-256(r || x)) < T/d r = header includes H(previous block) root of Merkle tree of transactions
  24. 45 XOR two 32-bit values in CPU XOR two 32-bit

    values in ASIC 4 transistors XOR design
  25. 47

  26. 49 Fire at mining facility in Thailand, 14 Oct 2014

    Photo credit: www.thairath.co.th
  27. 50

  28. 51

  29. 52

  30. Reality Check 54 Bitcoin “Market Capitalization” = Number of Bitcoins

    ✕ Market Price = 15,940,740 ✕ $651.40 = $10.3B Daily transactions: ~$200M
  31. 56 Apple’s revenue ~$500M/day > 2x all bitcoin transactions Apple’s

    cash holdings ~$250B > 20x value of all Bitcoin
  32. Scale Today 57 Block Size = 1MB Typical transaction size

    ~ 500 Bytes Maximum of ~2000 transactions per block / 10 minutes So, about 3-4 transactions per second
  33. Block Size = 1MB Typical transaction size ~ 500 Bytes

    Maximum of ~2000 transactions per block / 10 minutes So, about 3-4 transactions per second Scale Today 58 Cost to control bitcoin (assuming other miners are “rational”): value per block-minute ~ $8000 ~ $800/minute ~ $1M/day to increase to $1B/day with current transaction rate: $3472 fee per transaction (without losing transactions) or 33 Billion transactions per day (with current $0.03 fee) $1B / day =
  34. Block Size = 1MB Typical transaction size ~ 500 Bytes

    Maximum of ~2000 transactions per block / 10 minutes So, about 3-4 transactions per second Scale Today 59 Cost to control bitcoin (assuming other miners are “rational”): value per block-minute ~ $8000 ~ $800/minute ~ $1M/day to increase to $1B/day with current transaction rate: $3472 fee per transaction (without losing transactions) or 33 Billion transactions per day (with current $0.03 fee) $1B / day = Transactions per Day VISA: 300M Interbank: 100M
  35. Block Size = 1MB Typical transaction size ~ 500 Bytes

    Maximum of ~2000 transactions per block / 10 minutes So, about 3-4 transactions per second Scale Today 60 Cost to control bitcoin (assuming other miners are “rational”): value per block-minute ~ $8000 ~ $800/minute ~ $1M/day to increase to $1B/day with current transaction rate: $3472 fee per transaction (without losing transactions) or 33 Billion transactions per day (with current $0.03 fee) $1B / day = Transactions per Day VISA: 300M Interbank: 100M Cash: 20B?
  36. Promise of Blockchains 61 Medical Records Global, decentralized, ledger that:

    everyone agrees on no one controls anyone can write into no one can erase