Coin Pocket Wallets by Mens Leather Wallets (An Unit Of X L Enterprises Limited) Kolkata
Understanding Blockchain - finance-watch.org · • Wallets can be web, hardware, software, or...
Transcript of Understanding Blockchain - finance-watch.org · • Wallets can be web, hardware, software, or...
Understanding BlockchainTechnology ‘Teach-In’ & Introduction
Tony Willenberg, Co-founder/CTO, [email protected]
PGP: 716E E331 2D94 51AC 6FFE 9B67 5772 7AB5 F78A 4920
Finance Watch, FinTech Workshop #1Leopold Hotel, Rue du Luxembourg 35, 1050 Brussels, Belgium
09:00-10:30, 14th November 2017
Making finance serve society
Outcomes
I The Bitcoin Story • Understand what got us to this point.
II Distributed Ledger Technology• Understand the implications this technology has for
our world.
III Key Concepts• Understand the key concepts, sufficiently well, so as
to think through the impact on citizens, businesses, and governments.
IV Issues to Explore • Understand the current issues in the debate.
I. The Bitcoin Story
A long time ago…(in Internet time, that is)
Transactions• Trusted third parties intermediate long-range transactions
(strangers).
• Trust is centralised: Visa, Sony, SWIFT, central bank, government.
• These actors provide us with valuable services.
• Intermediation involves clearance, settlement, verification, escrow, privacy, integrity, authentication, non-repudiation.
• Intermediation is friction. Friction is inefficient. Friction can be frustrating.
• Data and logic are independent.
Transaction NetworksCentralised
(e.g. Web Sites, e-Government)
Decentralised
(e.g. Skype, SWIFT, BitTorrent, Intel)
Then…
August 2008bitcoin.org is registered
November 2008Bitcoin paper is published
January 2009
“The Times 03/Jan/2009 Chancellor on brink of second bailout for banks.”
Satoshi Nakamoto → Hal Finney, 10 BTC
First bitcoin transaction takes place
January 2009
• Bitcoin software, free/open source.
• a.k.a. Node, Bitcoin Software, Node Software, Wallet Software, Reference Client, Satoshi Client.
• Originally called: Bitcoin, then Bitcoin-Qt, then Bitcoin Core.
• Need about 145 GB of disk space.
Wallet Miner
Blockchain Network
Bitcoin
“Bitcoin is a collection of concepts and technologies that form the basis of a digital money ecosystem. Units of currency called bitcoin are used to store and transmit value among participants in the bitcoin network.”
Source: Antonopoulos, M. (2014)
Revolutionary• Mathematical relationships to relate transactions to people/machines
• Arrange transaction data so transactions are tamper-proof
• Algorithm to replicate the ledger of transactions globally
• Method for arriving at a consensus on the global state of the ledger
• Become a user of bitcoin by downloading a wallet
• Proving you have done “work” shows your investment in the network
• Transaction fees mean it costs you to be mean to the network
Now…
Adoption• Bitcoin (BTC); Litecoin (LTC); Ethereum (ETH); Zcash
(ZEC); Dash (DASH, formerly Darkcoin); Ripple (XRP); Monero (MXR); more than a thousand digital currencies now in existence
• Total market capitalisation: US$ 200B (or in the top 25 on the S&P 500)
• Chicago Mercantile Exchange establishes a cryptocurrency futures trading fund (US), the Bitcoin Reference Rate (BRR) and the Bitcoin Real Time Index (BRTI)
• Commodities Futures Trading Commission sets up Derivatives Clearing Organisation with Swap Execution Facility for fully collateralised digital currency swaps (USA)
Source: https://coinmarketcap.com, updated: November 8 2017 @ 6:02 pm
Adoption• One can buy bitcoin in all post offices (source)
(Austria)
• FinCEN Fines levied $700,000 fine against Ripple Labs Inc. for violation of requirements under the Bank Secrecy Act (source) (USA)
• Regulatory limitations on use of cryptocurrencies to prevent money flight (China)
• Countries encourage cryptocurrencies for legal commerce (Japan, South Korea, Russia)
Source: https://www.blockchain-austria.gv.at/; https://blockchainhub.net/blog/tag/blockchain/
Extended Bitcoin Network
Source: Figure 8-3, Antonopoulos, M. (2014)
From Bitcoin came…
Transaction Networks TodayCentralised Decentralised Distributed
(e.g. Web Sites, e-Government) (e.g. Skype, SWIFT, BitTorrent) (e.g. Bitcoin, Ethereum, etc.)
II. Distributed Ledger Technology
(DLT)
DLT
Source: Based on Birch (2016) cited in “Distributed Ledger Technology: Beyond Blockchain”, Government Office for Science, Government of the United Kingdom.
How many copies?
Who can use the copies?
Who integrates the ledger?
[anyone]
[group of owners] e.g. a clearing and settlement
network
[one]e.g. personal bank account
[many]
[any user, by untrusted consensus]
[trusted ledger owners or by validation] e.g. Ripple (XPR) (a global
financial transactions system),
consortium chains
Bitcoin (BTC), Ethereum (ETH), Litecoin
(LTC), Monero (XMR)
Functional Components
Distributed Ledger Technology
1. Shared Ledger 2. Smart Contracts 3. Tokens
Shared Ledger
• Transactions are linked together into blocks (Merkle Tree | Binary Hash Tree).
• Blocks are chained together into the blockchain.
• Tampering with a transaction, invalidates the block and the blockchain from the falsified transaction onwards.
• The blockchain is replicated (think of BitTorrent).
• Every record in the ledger is timestamped and cryptographically signed, thus making the ledger an auditable history of all transactions in the network.
• Transactions can be anything, but there is a size limitation.
• It is not necessarily a database.
Smart Contract• A.k.a. cryptocontract.
• Is a program that contains instructions for transfer of cryptocurrency. Data inside the program & logic for how to change the data are now indivisible, sealed in a cryptographic unit on the blockchain.
• Live on the blockchain at a unique global address, are open for reading, but cannot be tampered with.
• Transactions represent either: (a) transfer of token to a person, or (b) transfer of token to a cryptocontract to execute.
Smart Contract
Alice
0x9a9A5a2A5a3D72fC85172BF4F0F7CaD12be341fb
10 ETH
Bob
0xa0c5E63Fb3a15d9495d086e4a31fC8265E2F9C0bSmart Contract
0xAf8DC764af536cEA2f35Ec7BF79145C932929384
Tokens• Bitcoin is a token.
• You get tokens by mining them, receiving them in transaction fees, created in a smart contract, or someone sends (pays) them to your A
• Virtually implemented by virtue of the UTXO and wallet software.
• Private keys enable spending, public keys enable receiving.
• The ERC20 token standard can represent anything that can be digitised.
III. Key Concepts
The Double-Spend Problem
• Is the Byzantine General’s Problem (1982): solutions attempted before, largely centralised solutions.
• Solved with novel tools (at least 4):
• (a) proof-of-work (game theory),
• (b) cryptography (mathematics),
• (c) peer-to-peer database replication (computer science),
• (d) transaction fees (economics).
Source: http://marknelson.us/2007/07/23/byzantine/
Proof-of-Work
• A way of signalling an investment in and concern about the best interests of the ecosystem.
• Do a computation and if you find the solution first, the network mints Bitcoin and gives it to you as a reward.
• “A proof-of-work (POW) system (or protocol, or function) is an economic measure to deter denial of service attacks and other service abuses such as spam on a network by requiring some work from the service requester, usually meaning processing time by a computer.”
Source: https://en.wikipedia.org/wiki/Proof-of-work_system
Proof-of-Stake
• In Proof-of-Stake-based cryptocurrencies the creator of the next block is chosen via various combinations of random selection, wealth, and age (i.e. their stake in the ecosystem).
• Those guarding the coins, own the coins.
• NXT, Blackcoin, Peercoin, Ethereum
Private-Public Key• Symmetric Cryptography = both parties must
know a shared secret first;
• Asymmetric Cryptography = parties keep a personal secret (private key) linked mathematically to something that can be shared (public key).
• Private keys are just big numbers: 1 up to ≈2256-1. The size of bitcoin’s private key space, (2256) is an unfathomably large number. It is approximately 1077 in decimal. For comparison, the visible universe is estimated to contain 1080 atoms.
Your Private Key
ABCDEFGHIJKLMNOPQRSTUVWXYZ
WXYZABCDEFGHIJKLMNOPQRSTUV
4R Caesar’s Cipher
Encoded:
Source:
FINANCE WATCH IS AWESOME
BEJWJYA SWPYD EO WSAOKIA
Private-Public Key
PrivatePublic
ECDSA
Elliptic Curve Multiplication• Using a special set of curves,
move from initial point k to a final location on the curve K => trapdoor function.
k
Private Key
K
Public Key
A
Bitcoin Address
Elliptic Curve Multiplication Hashing Function
Source: https://en.bitcoin.it/wiki/Secp256k1; Standard for Efficient Cryptography 2 (SEC 2), Certicom Corp. (2010).
• Can be performed on mobile and IoT devices. We have used it in WAP security. NIST/Certicom Corp.
Hash Functions• “fingerprints” = hash codes = hashes = digests = hash values = message
authentication codes => integrity
• Cryptographic functions (1-way) are a subclass of hash functions (2-way).
• Examples:
• SHA: Secure Hashing Algorithm
• RIPEMD-160: Research and Development in Advanced Communications Technologies in Europe (RACE) Integrity Primitives Evaluation
• The ideal hash function has three main properties:1. easy to calculate a hash for any given data.2. computationally difficult to reverse.3. unlikely that two slightly different messages will have the same hash.
Hash FunctionsExample (SHA-256)
Input Output
the quick brown fox jumps over the lazy dog
1153a4080f1fcb04425aa0b841c2b14606fe6df25d9076d2a1face2d5af57129
the quick brown fox jumped over the lazy dog
57385e0f6d48919ae32d0b155c86210a74a0a477b8260ad21eae65b13f146df6
Addresses
• A has built-in checks to make transcription easier.
• A comes from the k (via K).
• (Bitcoin address) A => Allows receiving bitcoin.
• (Private key) k => Allows spending bitcoin.
k
Private Key
K
Public Key
A
Bitcoin Address
Elliptic Curve Multiplication Hashing Function
Signing & Validating
Signing: Private Key + Transaction = Signature
Validating: Public Key + Transaction = Valid Signature
Nodes
• Wallet (W), miner (M), blockchain (B), & networking (N)
• W|M|B|N = “reference client” node
• W|N = “lightweight wallet” node
• B|N|M = “solo miner” node
• B|N = “full blockchain” node
Source: Figure 8-1, Antonopoulos, M. (2014)
Wallet
NetworkBlockchain
Miner
Wallets
• Wallets contain private keys, not coins.
• Wallets can be web, hardware, software, or paper.
• Early wallets were “random” wallets. Bitcoin Core uses a random wallet.
• The latest and safest wallets are “hierarchically deterministic”: effectively a keychain, e.g. Ledger, Trezor, (see BIP-32, 39, 43, 44).
• Wallets need to be backed up to “cold storage”.
• Generate the private keys (k), the corresponding public key (K), and then the easy-to-remember bitcoin addresses (A).
Wallets
Wallets know which transactions on the blockchain have been sent to bitcoin addresses the wallet controls - wallets read the blockchain, tally up unspent transactions and, in this way, know how much bitcoin is held in the wallet.
Wallets
Source: Based on Figure 2-4, Antonopoulos, M. (2014)
Transaction ID: f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2
INPUTS (From) OUTPUT (To)
0.1005Joe BTC
0.0005 BTCTx Fee0.1000Alice BTC……………………
……………………
……………………
………….
Transaction ID: 0934213e4fc4d9b63ed0327dc5ddec6562c11cb7581e7e575fb0f77103bb7b3d
INPUTS (From) OUTPUT (To)
0.1000Alice BTC…………………… 0.0500Bob BTC……………………
0.0005 BTCTx Fee ……………………
0.0495 BTCAlice’s Change ……..
………….
Transaction ID: a88844c4e6cdea15cce689578e3408fa78de862e1408c4d00ee49062283a04a6
INPUTS (From) OUTPUT (To)
0.0510Celine BTC………………… 0.0500Alice BTC……………………
0.0010 BTCTx Fee ……..
tn-2
tn-1
tn
Alice’s Wallet Balance: 0.1000 BTC
Alice’s Wallet Balance: 0.0495 BTC
Alice’s Wallet Balance: 0.0995 BTC
Mining
• Proving that you’re honest by doing work that benefits the ecosystem.
• Earn coinbase & transaction fees.
• Application specific integrated circuits (ASIC) dedicated to mining.
• Mining pools group resources, shared rewards and fees.
Consensus
5 Steps...
1. Propagation of transactions.
2. Verification of transactions (long list of criteria).
3. Aggregation into new blocks based on a proof-of-work.
4. Verification of new blocks and assembly into chain.
5. Selection of the most computationally intensive chain.
Forks• Occur regularly, any time two miners find a block at nearly the same time.
• Occur intentionally when node software is modified with new rules (e.g. 1st August 2017 => BTC and BCH (BIP 91)).
FormatBTC
FormatBTC
FormatBTC
FormatBTC
FormatBTC
FormatBTC
FormatBTC
FormatBCH
FormatBCH
FormatBCH
FormatBCH
Bitcoin nodes that don’t upgrade software.
Bitcoin nodes that upgraded.
Word 97-2003
.doc
Word 97-2003
.doc
Word 97-2003
.doc
Word 97-2003
.doc
Word 97-2003
.doc
Word 97-2003
.doc
Word 97-2003
.doc
Word 2007.docx
Word 2007.docx
Word 2007.docx
Word 2007.docx
Users that don’t upgrade Word.
Users that upgraded Word.
Smart Contracts
• Can be simple logic, such as “pay at time” (say, BTC) or complex logic such as a Decentralised Autonomous Organisation (DAO) (say, ETH).
• The vision of Ethereum (ETH) is “an unstoppable censorship-resistant self-sustaining decentralised world-scale computing platform”.
• Computer programs live on the blockchain, they compute whenever they are given ‘gas’ (via a transaction), and change the state of entities that live
on the blockchain.
• Smart contracts are also known as “dApps” or Distributed Applications.
V. Issues to Explore
Classification• Store of value?
• Finite supply (21 million by 2140). Algorithmically determined.
• Investment? Token?
• Unbacked, but so are most floating fiat currencies.
• No monetary policy “levers” - no fractional reserve banking.
• Volatile now, but steadily decreasing.
Identity• ‘Permissioned’ networks critical for delivery of government services. Who
is permitted to get what and how much?
• Therefore, citizen identity will be fundamental to adoption.
• Maintenance of privacy precarious in centralised model - distributed gives back citizen control over information (which we try to mirror in our systems today, anyway).
Complexity
• Perhaps obviously, it was not until an application my Grandmother could use to make voice-over-IP calls, could one say: voice-over-IP technology has gone mainstream.
• Wallets need to be easy to use: HD-wallets (BIP-32, 39, 43, 44).
• All or nothing - lose the keys, lose the cryptocurrency, forever.
Legal Coding
• New jobs will emerge, like legal coding.
• Judicial branches of government will need systems, training, resources.
• Contracts will span one or more jurisdictions regularly.
• Digital audit trails will often be presented as evidence.
• Constitutions, laws, regulations will need re-thinking.
• Lawyers will need to understand the technology.
• Countries will need to adopt or be unable to participate.
Capital Raising
• Only a few dozen working finished products & platforms.
• Concepts are attracting millions in seed funding.
• Initial Coin Offerings (ICO) not regulated in the same way that IPOs are.
Data Custodianship
• Data lives “everywhere”, no departments, no divisions, global jurisdiction.
• Private-public Keys and Smart Contracts provide the “garden wall”.
• If we accept cryptocurrency, then physical boundaries are moot.
Energy
• Mining puts computers to work on a problem, but the problem is meaningless outside the cryptocurrency network => wasted energy.
• “Environmental disaster”
• = Slovakia, Ireland
• Homes: 2,479,349 (Bitcoin) v 50,000 (Visa)
• SETI @ Home (UCB), Einstein@Home (Max Planck Institute), Folding@Home (Stanford) => uses what would otherwise be, wasted energy.
Source: https://digiconomist.net/bitcoin-energy-consumption
26.78 TWh projected for 2017
Thank You