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

Bitcoin Expained Insanely Simple

Avatar for andreashove andreashove
February 29, 2016

Bitcoin Expained Insanely Simple

University lecture on Bitcoin (by student, not professor)

Avatar for andreashove

andreashove

February 29, 2016

Other Decks in Education

Transcript

  1. What is Bitcoin: Basics • Bitcoins - hashes • Miners

    - computers • Block - transactons • Blockchain - history • Wallets - 19UJAQMPqxDqhkppwzd1YFtfTbLiX3rjJ9 • Difficulty – create blocks predictably (every 10 minutes) • Confirms – to be considered valid
  2. What is Bitcoin: Characteristics • Decentralized • (not centralized) •

    Easy to set up • (not hard) • Anonymous (no accounts) • Completely transparent (to users) • Transaction fees are tiny (for now) • It’s fast • (not slow) • It’s non-repudiable (send something and its gone forever) and ever and ever and ever and ever and ever and ever and ever and ever
  3. Research Perspectives and Challenges for Bitcoin and Cryptocurrencies • Why

    Bitcoin is worthy of research • Three components of Bitcoin’s design • Transactions • Consensus Protocol • Communications Network • Stability of Bitcoin • Client-side Security • Anonymity and Privacy • Some Concluding Remarks
  4. Why Bitcoin is Worthy of Research • «Bitcoin works in

    practice, but not in theory» • True, it works surprisingly well (so far), we just need to find out why and if it will work in the future as «works in practice» changes. Politicics and economy evolve so the system must change when transaction volumes scales. • «Bitcoin’s stability relies on social and economic factors» • True, if the Bitcoin currency is weakened drastically, then miners may stop mining as it is not affordable to keep mining. No mining  No Bitcoin. • «Bitcoin has worked for five years and will continue to do so» • False, we do not have a good enough understanding to conclude this, which is a crucial research challenge in computer science theory.
  5. Research Perspectives and Challenges for Bitcoin and Cryptocurrencies • Why

    Bitcoin is worthy of research • Three components of Bitcoin’s design • Transactions • Consensus Protocol • Communications Network • Stability of Bitcoin • Client-side Security • Anonymity and Privacy • Some Concluding Remarks
  6. Transactions • Transfer currency from one user (address) to another

    • Transaction is hashed and hash serves as transaction ID. • Bitcoin’s state is a series of transactions forming the blockchain • The blockchain is the only state, as Bitcoin has no high-level concepts • Users, accounts, balances or identities etc. • Output of transaction is an integer value, representing quantity of Bitcoin currency, which is bitcoins ( , BTC or XBT). • Conservation of value: ∑(outputs) ≤ ∑(inputs) • Sometimes include transaction fee to miners • No one «own» bitcoins since Bitcoin does not have any users or accounts. You own as many bitcoins as you can redeem using PK.
  7. Consensus Protocol • Each block depends on the previous one,

    locking each block of transactions creating the blockchain. • Consensus is achieved by consensing on the contents of the blockchain. • Nakomoto consensus – Bitcoin’s core invention • Anyone can attempt to add to the chain by solving a computational puzzle. • Invalid blocks is rejected and miners keep working until they find a valid one • Eventually reach consensus • Algorithm relies on monetary rewards
  8. Stability of the consensus protocol • Bitcoin is decentralized, but

    still governed by core Bitcoin developers • Five stability properties • Eventual consensus • At any time, all nodes will agree upon what will become the eventual valid blockchain. • Exponential convergence • The probability of a fork is such that k-confirmations of a block will be enough to ensure, with high confidence, that a transaction will be permanently included in the blockchain. • Liveness • New blocks added within reasonable amount of time • Correctness • All blocks in the longest chain will only include valid transactions. • Fairness • A miner with proportion x of computational power will mine approx. x of blocks. • System is stable if all five properties hold • Unstable if there is a majority miner (or several miners collude)
  9. Stability is not known when mining rewards: • Decline •

    Halved every 4 years • Cease entirely • Around year 2140 • Altcoin SpreadCoin proposes smooth decrease instead
  10. Alternative consensus protocols • Several concerns about the current protocol

    • Stability • Computational puzzle wastes resources • Unfair as miners use ASICs – custom hardware for mining • Article proposes changing Bitcoin parameters – hardcoded “magic constants” • not proven how they affect stability • Difficulty adjustment window • Limits on block and transaction size. When this limit is reached, transaction will need to use fees to be picked up by miners. This will increase the cost of Bitcoin in the future. • Monetary Policy – deflating, eventually users may stop spending Bitcoin and hoard instead because it is (it may be) more affordable
  11. Communications Network • Decentralized, ad hoc peer-to-peer broadcast network •

    Announce new transactions and proposed blocks • Impact on consensus • Latency – forking blockchains • Malicous miners controlling portion of network – favor their own blocks • Topology and discovery • Any node can join • Every node maintains a list of peer addresses • Peers propagate info about each other • Each new node receives a sample of known addresses from peer • this establishes a well-connected random network.
  12. Communications Network • New blocks are broadcast by flooding the

    network • Nodes send samples of their new block • Peer can respond by requesting the full content • Nodes only forward new (and valid) data once • Strict relay policy prevents DoS attacks
  13. Research Perspectives and Challenges for Bitcoin and Cryptocurrencies • Why

    Bitcoin is worthy of research • Three components of Bitcoin’s design • Transactions • Consensus Protocol • Communications Network • Stability of Bitcoin • Client-side Security • Anonymity and Privacy • Some Concluding Remarks
  14. Stability of Bitcoin • We’ve talked about stability in the

    consensus protocol of Bitcoin • Many external stability issues like attacks on/from altcoins • A Bitcoin mining pool (Eligius) destroyed an altcoin called CoiledCoin. • Stability of mining pools • Withholding blocks to decrease pool revenue (self-destructing) • Infiltrate other mining pools and do the same • Happened against the Eligius mining pool in 2014. • Easily detected through statistics • Every pool fears retaliation, no one dares to attack (most of the time)
  15. Stability of the peer-to-peer layer • Depends on the participants

    • A majority of nodes will learn nearly all state information within reasonable time. • Unknown if nodes will keep propagating this information for the public good if it does not benefit them when theres not enough to earn from mining. • Will the communication break down eventually? • DoS attacks against each other • Big mining pools will earn more if they “take out” others.
  16. Research Perspectives and Challenges for Bitcoin and Cryptocurrencies • Why

    Bitcoin is worthy of research • Three components of Bitcoin’s design • Transactions • Consensus Protocol • Communications Network • Stability of Bitcoin • Client-side Security • Anonymity and Privacy • Some Concluding Remarks
  17. Client-side Security of Bitcoin • Mobile devices • cant store

    the entire chain, so they simplify by trusting that the longest chain only contains valid transactions. • has to disclose their set of addresses to a third party, which is a privacy risk. • Key management • Almost all forms of online commerce today rely on credit card info or passwords • Bitcoin relies on public key cryptography = relies on keeping keys secret • You are familiar with key storing and issues related to them. • Everything can be stolen.
  18. Key storing and issues related to them • Keys stored

    on disk – may be stolen • Split control – multisignature (require k-out-of-n to redeem transaction) A wallet is a stored key pool file • Password-protected wallets – user-password; still may be stolen • Password-derived wallets – lose password; all money lost • Offline storage (passive portable media) – may be stolen • Hosted wallet • Have to trust third party • Similar to regular online banking • Not safe against theft
  19. Research Perspectives and Challenges for Bitcoin and Cryptocurrencies • Why

    Bitcoin is worthy of research • Three components of Bitcoin’s design • Transactions • Consensus Protocol • Communications Network • Stability of Bitcoin • Client-side Security • Anonymity and Privacy • Some Concluding Remarks
  20. Anonymity and privacy • Users can create new addresses (pseudonyms)

    at any time • This design was to provide strong privacy • Except easily to trace the flow of money between addresses and conclude they are controlled by the same individual. • Also, with more addresses, individuals may have to pay from more than one, again linking those together. • Solution • Anonymity set: Set of users form a single Bitcoin transaction with one input from each user and output controlled by each user.
  21. Research Perspectives and Challenges for Bitcoin and Cryptocurrencies • Why

    Bitcoin is worthy of research • Three components of Bitcoin’s design • Transactions • Consensus Protocol • Communications Network • Stability of Bitcoin • Client-side Security • Anonymity and Privacy • Some Concluding Remarks
  22. Some Concluding Remarks • Our understanding of Bitcoin is still

    lacking, the amount of research on Bitcoin’s properties is rather low. • A lot of researchers don’t (dare to) research Bitcoin because it lacks a theoretical foundation. • It is unclear how to expand Bitcoin’s functionality without upsetting its observed stability. • It is difficult to understand if Bitcoin’s success is it’s design choices, or if it just was the first-movers advantage. • Bitcoin is a rare case where practice seems to be ahead of theory. • A wise man once said: “A lot of things work because we trust each other. I believe Bitcoin works because no one trust each other.” – Andreas Hove