Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Bitcoin and Blockchain Technology: An Introduction


Published on

Introductory lesson for the Bitcoin and Blockchain Technology course of Milano Bicocca University (2017)

Video (in Italian) available at

Published in: Technology
  • Wow! Love this!
    Are you sure you want to  Yes  No
    Your message goes here
  • First Million Road is all you need to start making real money ! Just google it
    Are you sure you want to  Yes  No
    Your message goes here
  • Hello! Get Your Professional Job-Winning Resume Here - Check our website!
    Are you sure you want to  Yes  No
    Your message goes here

Bitcoin and Blockchain Technology: An Introduction

  1. 1. Bitcoin and Blockchain Technology An Introduction
  2. 2. Table of Contents 1. Introduction 2. A Short History 3. Protocol and Currency 4. Money and Gold 5. Blockchain Without Bitcoin Ferdinando Ametrano 2017 2/68
  3. 3. Understanding Lags Well Behind the Hype Understanding of the technology however lags well behind the hype, amongst practitioners, policy makers and industry commentators alike. ‘Blockchain’ technology seems to promise major change for capital markets and other financial services – some say it may ultimately prove to be as important an innovation as the internet itself – but few can say exactly how or why. Michael Mainelli, Alistair Milne (2016) The Impact and Potential of Blockchain on the Securities Transaction Lifecycle Ferdinando Ametrano 2017 3/68
  4. 4. Why Bitcoin Is Hard to Understand At the crossroads of: 1. Cryptography 2. Computer networking and data transmission 3. Game theory 4. Economic and monetary theory Mainly not a technology, a cultural paradigm shift instead Ferdinando Ametrano 2017 4/68
  5. 5. • Decentralized digital currency • Not backed by any government or organization • Instantaneous peer-to-peer transactions • No need for trusted third party • Cryptographic security • Synergic economic incentives • Efficient low-cost banking for everybody everywhere Ferdinando Ametrano 2017 5/68
  6. 6. The Information Economy • Data is transferred with zero marginal cost • Why pay a fee to move bytes representing wealth? • Why only 9-5, Monday-Friday, two days settlement? • Who (and when) will gift humanity with a global instantaneous free p2p payment network? BANK Ferdinando Ametrano 2017 6/68
  7. 7. Bitcoin • Decentralized: no central authority, no intermediaries • Permissionless: no regulator • Censorship resistant: no frozen funds • Open-access: no discrimination, no amount limits, 24/7, 365 days • Free: negligible transaction costs • Borderless: no geographic limits • Transnational: no specific jurisdiction applies • Secure: non falsifiable, non repudiable transactions • Resilient: nothing has been able to stop it or break it Ferdinando Ametrano 2017 7/68
  8. 8. A Bitcoin Transaction About $83M transacted with $0.04 fee Ferdinando Ametrano 2017 8/68
  9. 9. BTC/USD Exchange Rate • BTC Market Cap: about $50B (USD M0 1959-2017 average has been $680B) Ferdinando Ametrano 2017 9/68
  10. 10. December 2013: China Crackdown • People’s Bank of China crackdown: – prohibits financial institutions from trading, underwriting, or offering insurance in bitcoins or any other digital currency – Bitcoin is not to be considered a currency – owning bitcoins is not outlawed or prohibited • As of December 2013 BTC China was world's largest Bitcoin exchange by volume • Alibaba, China's top Internet retailer, stopped using bitcoins as of January 19 2014 Ferdinando Ametrano 2017 10/68
  11. 11. February 2014: Mt Gox Bankruptcy • As of January 2014 Mt Gox was world's largest Bitcoin exchange by volume • In February 2014 it filed for bankruptcy protection from creditors • It announced that around 850,000 bitcoins belonging to customers and the company were missing and likely stolen, an amount valued at more than $450 million at the time • Fraud or theft? Ferdinando Ametrano 2017 11/68
  12. 12. Silk Road • Online market, operated as a Tor hidden service • Online users were able to buy illicit goodies using bitcoins, while browsing it anonymously and securely without potential traffic monitoring • Launched in February 2011, shut down in October 2013 • Ross William Ulbricht, alleged to be the owner of Silk Road, arrested in San Francisco, sentenced to life in prison • Other black markets have filled in as successors Ferdinando Ametrano 2017 12/68
  13. 13. Bitcoin Resilience • Is there anything else in financial world: • Just 8 years old • Without government or corporation backing • That can lose its main (China) market • Fraud/theft at its main reference exchange (Mt Gox) • With such a bad reputation (Silk Road) • That could be still alive and kicking? Ferdinando Ametrano 2017 13/68
  14. 14. Bitcoin Used by Terrorists Europol: • Despite third party reporting suggesting the use of anonymous currencies like Bitcoin by terrorists to finance their activities, this has not been confirmed by law enforcement Ferdinando Ametrano 2017 14/68
  15. 15. Bitcoin for Money Laundering UK HM Treasury: The money laundering risk associated with digital currencies is low, though if the use of digital currencies was to become more prevalent in the UK this risk could rise national-risk-assessment-of-money-laundering-and- terrorist-financing Ferdinando Ametrano 2017 15/68
  16. 16. Ransomware • A malware propagated via infected email attachments and botnets • when activated, it encrypts files stored on local and mounted network drives • then it displays a message which offers to decrypt the data if a bitcoin payment is made Ferdinando Ametrano 2017 16/68
  17. 17. Ferdinando Ametrano 2017 17/68
  18. 18. Table of Contents 1. Introduction 2. A Short History 3. Protocol and Currency 4. Money and Gold 5. Blockchain Without Bitcoin Ferdinando Ametrano 2017 18/68
  19. 19. Private Monies • A widely accepted medium of exchange or payment – issued by a non-governmental body – without legal privileges • Private monies do not have to be generally acceptable; they merely have to be accepted in a given economic community • Public demand for private currencies: – hold them in the expectation that they will not diminish in purchasing power as state money has – wish to be part of a movement against increasing state control of economic and personal behavior – conduct illegal activity – just want better money Ferdinando Ametrano 2017 19/68
  20. 20. Liberty Dollar: 1998-2009 • Private mint that issued gold and silver coins; also issued notes redeemable in precious metals • Periodically revalued against USD: the value of the latter fell over time against precious metals • Specifically designed to function in parallel with and in competition to USD • Never marketed or represented as official US currency • Highly successful: it became the second most popular currency in the US • Its use declared a federal crime by the US government • Its founders convicted for counterfeiting, fraud and conspiracy against the United States Ferdinando Ametrano 2017 20/68
  21. 21. E-gold: 1996-2007 • Digital payment system with gold as unit of account • User accounts backed by gold reserves • By 2005, e-gold had grown to be second only to PayPal in the online payments industry: 1.2M accounts and $1.5B transactions • Indicted in April 2007 by US law enforcement services • Charges: unlicensed money-transmitting entity and a means of moving the proceeds of illegal activities • Never proven and even the judge expressed major doubts • ‘Offshore’ payment system rather than a money transmitter or bank as defined under then-existing regulations, not least because gold was not legally ‘money’ Ferdinando Ametrano 2017 21/68
  22. 22. Double Spending Problem • To securely transfer value using digital means has been possible for decades • In digital cash schemes, a single digital token, being just a file that can be duplicated, can be spent twice • A centralized trusted party has always been required to prevent double spending Ferdinando Ametrano 2017 22/68
  23. 23. Precursors • Ecash, David Chaum, 1982 (blind signature) • Hashcash, Adam Back, 1997 (Proof-of-Work) • B-money, Wei Dau, 1988 (distributed database) • Bit gold, Nick Szabo, 1998 (distributed database, sequential money creation) • Anonymous Electronic Cash, Tomas Sander and Amnon Ta-Shma, 1999 (anonymity) • Reusable P-o-W, Hal Finney, 2004 Ferdinando Ametrano 2017 23/68
  24. 24. The Announcement From: Satoshi Nakamoto <satoshi <at>> Subject: Bitcoin P2P e-cash paper Newsgroups: gmane.comp.encryption.general Date: 2008-10-31 18:10:00 GMT I've been working on a new electronic cash system that's fully peer-to-peer, with no trusted third party. The paper is available at: The main properties: Double-spending is prevented with a peer-to-peer network. No mint or other trusted parties. Participants can be anonymous. New coins are made from Hashcash style proof-of-work. The proof-of-work for new coin generation also powers the network to prevent double-spending. Bitcoin: A Peer-to-Peer Electronic Cash System Abstract. A purely peer-to-peer version of electronic cash […] Satoshi Nakamoto --------------------------------------- The Cryptography Mailing List Ferdinando Ametrano 2017 24/68
  25. 25. Satoshi Nakamoto • Worked on Bitcoin since probably 2007 • Published the paper in 2008 • Released the code in January 2009 • Stopped involvement mid-2010 • Entrusted the project and a copy of the alert key to Gavin Andresen, effectively his successor • Unknown identity: pseudonymous person or group? • He owns about 1M bitcoins, never spent Ferdinando Ametrano 2017 25/68
  26. 26. Nakamoto's Political Motivations • "Yes, [we will not find a solution to political problems in cryptography,] but we can win a major battle in the arms race and gain a new territory of freedom for several years. Governments are good at cutting off the heads of a centrally controlled networks like Napster, but pure P2P networks like Gnutella and Tor seem to be holding their own." • "[Bitcoin is] very attractive to the libertarian viewpoint if we can explain it properly. I'm better with code than with words though." • In the Bitcoin's transaction database, the first entry has a note by Nakamoto: "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks" Ferdinando Ametrano 2017 26/68
  27. 27. Source Code License Bitcoin was released under the MIT license, so it is: • open source; cryptographic software’s source code must be available to allows public inspection (absence of backdoor and security vulnerabilities) • free software; the user the right to use, copy, modify, and redistribute the software • Instead, proprietary software is often close source and it only grants the right to use Ferdinando Ametrano 2017 27/68
  28. 28. Table of Contents 1. Introduction 2. A Short History 3. Protocol and Currency 4. Money and Gold 5. Blockchain Without Bitcoin Ferdinando Ametrano 2017 28/68
  29. 29. Bitcoin: A Protocol and a Currency • Bitcoin: protocol, software, and community • bitcoins: units of the currency bitcoins are sent using Bitcoin • bitcoins are the first powerful Bitcoin protocol application: a native digital asset created inside the protocol Ferdinando Ametrano 2017 29/68
  30. 30. Bitcoin: The Protocol • Distributed public ledger of transactions • shared with peer-to-peer technology • allowing the ownership transfer of a native digital scriptural asset • a “digital token” that can be exchanged, but not duplicated • keeps records of each and every transaction forever • It could replace any processing central authority • with decentralized peer-to-peer cryptographically secure equivalent Ferdinando Ametrano 2017 30/68
  31. 31. Bitcoins: The Currency • Only exist as public ledger documented transactions • Are associated to public address(es) like 1FEz167JCVgBvhJBahpzmrsTNewhiwgWVG • the bitcoin distributed public ledger certifies for everybody how many bitcoins are associated to any address It is mine; you are REALLY encouraged to tip Ferdinando Ametrano 2017 31/68
  32. 32. Pseudonymity, Anonymity • Bitcoin is really pseudonymous, not anonymous: • The bitcoin address does not provide direct information about the bitcoin owner • All transactions are transparent to everybody’s inspection. • Perfect persistent public account history: the public ledger is forever Ferdinando Ametrano 2017 32/68
  33. 33. Asymmetric Cryptography: Public/Private Key Pair Two mathematically linked keys perform opposite digital signature functions: • the private (secret) key used to generate the signature • the public key used by anyone to verify the signature • The public key derives from the private key, but the private key cannot be derived from the public one Ferdinando Ametrano 2017 33/68
  34. 34. Asymmetric Cryptography: Public/Private Key Pair • A bitcoin address is derived from a public key, but the public key cannot be derived from the address • Private key -> public key -> bitcoin address • The corresponding private key allows spending from that address Try at Ferdinando Ametrano 2017 34/68
  35. 35. A Bitcoin Transaction: From Address to Address • Transaction: amount + receiver’s address • The sender’s private key signs the transaction • The transaction is broadcasted to the network • With sender’s public key any network node can verify that: 1. The private key has been used, signature has not been forged, transaction has not been tampered or modified 2. The amount is at sender’s address disposal • The transaction is published to the public ledger • Everybody knows that the receiver’s address has received the transacted amount Ferdinando Ametrano 2017 35/68
  36. 36. Transactions Cannot Be Altered, They Could Be Censored • Transactions cannot be altered • Bitcoins cannot be redirected • Transactions could only be censored, as if they never happened Ferdinando Ametrano 2017 36/68
  37. 37. Bitcoin Safe Custody • Bitcoins are effectively owned by whoever can spend them • Securing private keys is crucial for safe storage • Wallets can be used to manage keys and addresses: – PC client: Bitcoin Core, Armory, Electrum – Mobile client:, Copay – Cold storage: never exposed to Internet, stored away Ferdinando Ametrano 2017 37/68
  38. 38. Bitcoin's Public Ledger: A Chain of Blocks • Transactions are bundled in blocks, sequentially chained, about one block every 10 minutes • The cryptographic link between blocks requires computing power to be created • The computing power required to replace or rewrite a block increases exponentially with the number of blocks chained after it • The blockchain is a history of transactions resilient to network attackers because it cannot be altered without huge resources • Computing power is measured in hash/s, hash being the basic operation needed for validation Ferdinando Ametrano 2017 38/68
  39. 39. Network Hash Rate 10,000s times more powerful than the world top 500 supercomputers Ferdinando Ametrano 2017 39/68
  40. 40. Hashing With ASICs • Application-Specific Integrated Circuit • Designed and manufactured for a specific purpose, introduced in 2013 for Bitcoin • Less power consumption, higher hashing power. Outpaced CPU, GPU, and FPGA Ferdinando Ametrano 2017 40/68
  41. 41. Hash Function • A function that maps input data of arbitrary length to a hash value, i.e. a output data of a fixed length – Non-invertible (one-way: input data can not be regenerated from the hash value) – Collision-resistant: computationally unfeasible to find 2 inputs that produce the same output (hash value reliably unique for input data) • The resulting hash value can be considered the unique digital fingerprint of the input data and it does not reveal the input data • Bitcoin uses the (Secure Hash Algorithm) SHA-256 that generates a fixed size 256-bit (32-byte) hash value output Ferdinando Ametrano 2017 41/68
  42. 42. SHA-256(“Hello, world!”) SHA-256(“Hello, world!”) = 315f5bdb76d078c43b8ac0064e4a0164612b1fce77c869345bfc94c75894edd3 SHA-256(“Hello, world!0”) = 1312af178c253f84028d480a6adc1e25e81caa44c749ec81976192e2ec934c64 SHA-256(“Hello, world!1”) = e9afc424b79e4f6ab42d99c81156d3a17228d6e1eef4139be78e948a9332a7d8 …… SHA-256(“Hello, world!4249”) = c004190b822f1669cac8dc37e761cb73652e7832fb814565702245cf26ebb9e6 SHA-256(“Hello, world!4250”) = 0000c3af42fc31103f1fdc0151fa747ff87349a4714df7cc52ea464e12dcd4e9Ferdinando Ametrano 2017 42/68
  43. 43. Proof-of-Work • A new block is added with a mathematical proof-of-work based on SHA-256 hashing. Find a nonce for a given block such that: • SHA-256(previous block hash, transactions, nonce) <= target • The longer chain (actually the one with more proof-of-work) is the consensus chain Ferdinando Ametrano 2017 43/68
  44. 44. Mining • The network nodes providing hashing power are called mining nodes or miners. • Miners compete to validate a new block of transactions: the winner providing proof-of-work is rewarded with the issue of new bitcoins in a special coinbase transaction included in the block • Miners solve the double spending problem: – conflicting transactions spending the same coins would invalidate the block – an invalid block would be rejected from the network – the bitcoin reward would be removed from transaction history – miner would have wasted his work Ferdinando Ametrano 2017 44/68
  45. 45. Distributed Consensus • How do miners reach consensus on the transaction history? • Consensus in an asynchronous network with faulty (or malicious) nodes is proved to be impossible • a very hard problem known as Byzantine General Problem Ferdinando Ametrano 2017 45/68
  46. 46. The Byzantine Generals' Problem • Generals can communicate using messengers, cannot have a summit • There are traitors amongst them • Must decide unanimously whether to attack • Success (i.e. fault tolerance) is achieved if the loyal generals can agree on their strategy, whatever it might be Ferdinando Ametrano 2017 46/68
  47. 47. Nakamoto Consensus • Nakamoto achieves Byzantine Fault Tolerant Consensus using (game theory) economic incentive for the mining nodes to be honest. Bitcoin – solves double spending without a central trusted party – can resist attacks of malicious agents, as long as they do not control network majority • Miners are compensated for their proof-of-work using seigniorage revenues, i.e. with issuance of new bitcoins • Seigniorage revenues subsidize the network, making transaction almost free Ferdinando Ametrano 2017 47/68
  48. 48. Network Costs Covered By Seigniorage Revenues • 144 blocks per day, 365 days per year • 12.5 BTC per block, $3,000 per BTC Currently about $2 billions per year (as of June 2017) Ferdinando Ametrano 2017 48/68
  49. 49. Virtuous Cycle Ferdinando Ametrano 2017 Hashing Power Bitcoin Security Bitcoin Price Mining Reward 49/68
  50. 50. Validation Process: Block Generation The proof-of-work difficulty is adapted to the overall available computing power to ensure an average of one block every ten minutes Ferdinando Ametrano 2017 50/68
  51. 51. Bitcoin Monetary Rule • 2009: 50BTC per block, every 10 minutes – halving every 4Y • This is the only way new bitcoins are released • It is called mining because of its similarity with the progressive scarcity of gold extraction • Supply free of discretionary intervention Ferdinando Ametrano 2017 51/68
  52. 52. Bitcoin Inelastic Supply: Deterministic Decreasing Rate chart Ferdinando Ametrano 2017 2029: 96.88% of all BTC issued 2141: last satoshi (0.00000001 BTC) will be issued 52/68
  53. 53. What after 2141? • We are all dead ;-) • Switch over to a fee-based system: as block space is limited, market is already requiring a growing satoshi/byte fee to be included into a block • Switch to a different paradigm? Ferdinando Ametrano 2017 53/68
  54. 54. Table of Contents 1. Introduction 2. A Short History 3. Protocol and Currency 4. Money and Gold 5. Blockchain Without Bitcoin Ferdinando Ametrano 2017 54/68
  55. 55. What Makes Bitcoin Special? • Digital and scriptural: it only exists as validated transaction • Asset, not liability • Bearer instrument • It can be transferred but not duplicated (i.e. it can be spent, but not double-spent) • Scarce in digital realm, as nothing else before • Mimicking gold monetary policy • More a crypto-commodity then a cryptocurrency Bitcoin is digital gold this is the brilliant groundbreaking achievement by Satoshi Nakamoto Ferdinando Ametrano 2017 55/68
  56. 56. Trade Economy From Gold Standard to Fiat Money • Gold: the commodity money standard – scarce – pleasant color, i.e. resistant to corrosion and oxidation – high malleability – relative easiness of its purity assessment • Gold purity certification • Representative money • Fractional receipt money • Fiat money and legal tender Ferdinando Ametrano 2017 56/68
  57. 57. Money As A Social Relation Instrument 1. Human beings are born into a gift economy 2. Enlarged relationship circle requires exchange economy 3. Barter economy: coincidence of wants 4. Trade economy: money as medium of exchange 5. Global information economy: supranational digital money Ferdinando Ametrano 2017 57/68
  58. 58. Friedrich August von Hayek Denationalisation of Money • history of coinage is an almost uninterrupted story of debasements; history is largely a history of inflation engineered by governments for their gain • why government monopoly of the provision of money is regarded as indispensable? It deprived public of the opportunity to discover and use a better reliable money Blessed will be the day when it will no longer be from the benevolence of the government that we expect good money but from the regard of the banks for their own interest A Free-Market Monetary System, Gold and Monetary Conference, New Orleans, Nov. 1977, Hayek, F. A., Denationalisation of Money, The Institute of Economic Affairs, Ferdinando Ametrano 2017 58/68
  59. 59. Permissionless Innovation Fast and Effective • No centralized security mechanism, no barrier to enter, no editorial control – Email has not been designed by a consortium of postal agencies – Internet has not been developed by a consortium of telcos • Will a decentralized transactional economy be shaped by a consortium of banks? Ferdinando Ametrano 2017 59/68
  60. 60. Explain Money to an Alien fiat money • No intrinsic value (legal tender, social contract) • Currency based on paper/ink security • Discretionary governance • Wicksellian interest-rate approach bitcoin • No intrinsic value (digital gold) • Currency based on math/cryptographic security • Algorithmic governance • Deterministic supply Ferdinando Ametrano 2017 60/68
  61. 61. Bitcoin as (Digital) Gold in the History of (Crypto)Money gold • Its adoption was not centrally planned • For centuries it has been the most successful form of money • It has bootstrapped all monetary systems we know of • It has been surpassed by other kind of money without becoming obsolete bitcoin • Its adoption has not been centrally planned • It is the most successful form of cryptocurrency • It will bootstrap new monetary systems • It might be surpassed by more advanced type of cryptocurrencies without becoming obsolete Ferdinando Ametrano 2017 61/68
  62. 62. Alt(ernative) Coins Beware of Frauds and Pump&Dump Ferdinando Ametrano 2017 62/68
  63. 63. Table of Contents 1. Introduction 2. A Short History 3. Protocol and Currency 4. Money and Gold 5. Blockchain Without Bitcoin Ferdinando Ametrano 2017 63/68
  64. 64. “Blockchain – not bitcoin – will prove revolutionary in banking” Ferdinando Ametrano 2017 64/68
  65. 65. Bitcoin in 2014 Is Like Internet in 1994: Weird and Scary Marc Andreessen: American entrepreneur, investor, and software engineer. Coauthor of Mosaic, cofounder of Netscape Ferdinando Ametrano 2017 65/68
  66. 66. The Walled Garden Model • Controlled access to web content and services • Offered in the late ‘90s and early ‘00s by Compuserve, AOL (and to some extent MSN) • Corporates wanted to go online, but not in the wild unregulated internet, populated by anonymous agents • They eventually realized that perceived risks, which are real, are outweighed by benefits Ferdinando Ametrano 2017 66/68
  67. 67. Confucius, The Moon, and The Finger “When a wise man points at the moon the imbecile examines the finger.” (Confucius) “When a wise man points at the bitcoin the imbecile examines the blockchain.” (Ametrano) To the Moon! Ferdinando Ametrano 2017 67/68
  68. 68. Bibliography • Satoshi Nakamoto, Bitcoin: A Peer-to-Peer Electronic Cash System (2008) • Ferdinando Ametrano, Bitcoin, Blockchain and Distributed Ledger Technology: Hype or Reality? (2017) Ferdinando Ametrano 2017 68/68