Bitcoin and Blockchain Fundamentals: L2 - Bitcoin Paradigm in 5Ws - Part 1 (Why, Where, Who)
Bitcoin and Blockchain Fundamentals: L2 - Bitcoin Paradigm in 5Ws - Part 1 (Why, Where, Who)
Bitcoin and Blockchain Fundamentals: L2 - Bitcoin Paradigm in 5Ws - Part 1 (Why, Where, Who)
a.a. 2019-2020
2
Bitcoin in 5 Ws
§ Why?
Understand why Bitcoin has been created in the first place. Main topics covered: money features, cyberpunk movement, bitcoin
predecessors.
§ Where?
Understand what is the peer-to-peer architecture at Bitcoin basis. Main topics covered: P2P networks, Napster vs Bittorrent functioning,
Open-Source software
§ Who?
Understand how users are represented in the Bitcoin network. Main topics covered: Public-key cryptography, digital signature and money
authorization.
§ What?
Understand what is the underlying asset of the Bitcoin network. Main topics covered: digital scarcity, Proof of Work algorithm, difficulty
adjustment
§ When?
Understand how transactions chronology is kept decentralized. Main topics covered: blockchain role within Bitcoin and fee market.
3
• The question “what” is relevant in a system where economic value is transmitted while it is not relevant in a
system such as BitTorrent, which we mentioned, where we transfer digital contents.
• In the digital world, producing scarcity is very difficult. Digital information is not scarce, digital information tends to
be always infinitely reproducible: I have information, I pass it, now we have two copies of information.
• On the other hand, value does not work like that: to be scarce, value essentially needs a non-reproducibility. I
must be able to give something to you that you must not be able to reproduce again.
How can we create a protocol where every single peer can independently validate what is being transmitted,
without any kind of centralized “peg” or “promise”?
4
§ If the answer was “no condition at all”, then our system could not work: while in the context of content sharing
it’s not really so important which condition we set to upload new data in the context of a financial system this
question is actually paramount. Otherwise everybody would have strong financial incentives to initially
deposit an eventually infinite amount of value in each one of his original inputs, which would lead the
scarcity, and thus the market value, of the digital asset, eventually to zero.
• The deposit (or creation, or extraction, or issuance) condition must be temporal in nature, in order to determine a
rate of “money production” which is not going to diverge to infinite. The rate of deposit could be associated to
the rate some event which occurs outside the system.
Proof of Work
5
• But this is a requirement, not a bug. It’s by design, not by accident. The only way to make something hard to
produce, is to make it expensive to produce. There’s no other way around.
• First, energy in PoW is not any more “wasted” than in any other production process for any other (physical or intellectual)
good: it’s actually used.
• Second, the consumption of energy is likely going to remain lower than historical alternatives (order of magnitude less
than the energy consumption for gold extraction during the gold standard, for example).
• Third, entrepreneurs generating PoW in to get bitcoins aren’t incentivised to consume more energy: if anything, ceteris
paribus, they are incentivised to consume less energy for the same computation (for them energy is a cost, not a
revenue), increasing optimization and efficiency with new technological breakthroughs or with generation choices that can
have a waterfall effect on other energy-consuming industries.
9
• Whenever more bitcoins than a certain target are deposited on the register, then more computing power is
requested to make the next deposits. Whenever fewer bitcoins than a certain target are deposited on the register,
then less computing power is requested to make the next deposits.
• The difficulty target your hash has to meet, increases with the increase in production, decreases with the
decrease in production. This makes for an almost perfectly inelastic supply.
+
Algorithmic difficulty adjustment
• Every “era” of about four years, the stable supply rate is cut in half, eventually approaching a fixed stock with zero
flow. This makes bitcoin the first case in history of an asset with almost totally inelastic production compared to the
demand.
• The Bitcoin system always tends to make it harder to create new bitcoins, when there are many people who
compete to create new bitcoins, and to make it easier when there are fewer people competing, or anyway when
technological means are less developed.
11
• The number of “units” generated is set to decrease geometrically, with a 50% reduction every 210,000 deposits
(or approximately four years). There will be a maximum of 2,099,999,997,690,000 “atomic” elements of value
(named “satoshis”, in collective homage to the original creator), which are currently most commonly measured in
aggregated units of 100,000,000, known as “one bitcoin”.
• It’s important to note that is not necessary to spend “whole bitcoins”: the divisibility of bitcoin units is extreme,
since we can spend one hundred millionth of 1 bitcoin.
13
• A list of some of other people's transactions already signed and broadcasted in the network.
• This is very important because it means that, from the economic point of view, all the actors are incentivized to
converge on the same time-line, on a coherent version of the same chronology.
16
§ Since I have spent money, time, electricity, to find the correct hash, to solve the cryptographic puzzle, I
do not want, in the face of this expenses, to earn nothing.
§ I spent money to be a miner, I want to make money with the new bitcoins I deposited.
• Thus I have an incentive to create a block that is not invalid: this means if a valid transactions is included in a block by
a miner, the next block including that one, and the next one including both, and so on, will each guarantee an always
greater cost to change the past.
• Changing a transaction that has been “buried” under a block is relatively expensive, but changing a
transaction that has been “buried” under, say, 6 blocks, is extremely expensive and usually not feasible at all
from an economic point of view.
17
Miner Fees
20
• The way miner fees work in Bitcoin is this: the system grant permission to miners to include in their coinbase,
along with the current valid “block subsidy” of newly “minted” 12.5 bitcoin, also the difference between outputs and
inputs of all the valid transactions included in the block.
• From a technical point of view, what happens is that, instead of assigning to specific outputs all the bitcoins consumed
in your transaction inputs, you will save some. So when miners find a block, in their initial deposit transaction, they do
not just enter the new bitcoins to be put into circulation, but they also enter the whole difference between the
bitcoins consumed and the bitcoins received in all the transactions included.
• Every Bitcoin transaction spends zero or more bitcoins to zero or more recipients. The difference between the amount
being spent and the amount being received is the transaction fee (which must be zero or more).
21
• On the supply side, Bitcoin has a maximum block size that limits the maximum amount of transaction data that can be
added to a block. But blocks are not produced on a fixed schedule (the system targets an average of one block every
10 minutes over long periods of time but, over short periods of time, a new block can arrive in less than a second or
more than an hour after the previous block), so, as the number of blocks received in a period of time varies, so does
the effective maximum block size.
• On the demand side of Bitcoin's free market for block space, each spender is under unique constraints when it
comes to spending their bitcoins. Some are willing to pay high fees; some are not. Some desire fast confirmation;
some are content with waiting a while. Some use wallets with excellent dynamic fee estimation; some do not. In
addition, demand varies according to certain patterns, with perhaps the most recognizable being the weekly cycle
where fees increase during weekdays and decrease on the weekends.
22
§ A peer to peer network: This technology is used to make sure that there is not a single point of failure in the distribution of the data. Peers are equally
privileged, equipotent participants in the network. There is not a single server connected to many clients: every node of the network is, in a way, a
server for other nodes, and a client at the same time.
Problem solved: data centralization and single point of failure.
§ Decentralized source code: A free open standard (i.e. FLOSS development) is required to always be able to independently review and audit the
source code eliminating any central point of failure. This building block is not only technical but it’s legal as well. In order to leverage the decentralization
of source code, indeed, it’s not enough that many people are able to access it from a practical point of view, but it’s also important that they can share
their review freely without excessive legal concerns or risks.
Problem solved: code centralization and single point of failure.
§ Digital Signatures: This is a mathematical scheme used to verify the authenticity of digital messages or documents. No trusted parties are needed.
Problem solved: identity management and single point of failure.
§ Proof of Work: it is an economic strategy used to deter some service abuses, by requiring some computational work from the service requester.
usually meaning processing time by a computer.
Problem solved: digital scarcity.
§ Difficulty Adjustment (plus Halving): the Bitcoin protocol adjusts the difficulty of finding blocks by changing the range of the possible (random)
solutions that miners are trying to guess.
Problem solved: money supply elasticity.
§ Blockchain and Miner Fees: it is the data structured at Bitcoin basis composed of different block of transactions saved in a chronological way.
Problem solved: decentralization of chronology and single point of failure
23
N.B.
• Bitcoin addresses consist of random digits and uppercase and lowercase letters, with the exception that the uppercase
letter "O", uppercase letter "I", lowercase letter "l", and the number "0“, that are never used to prevent visual
ambiguity.
• Addresses starting with 1 or 3 are case-sensitive.
• For privacy purposes, a Bitcoin address should never be used twice.
• Bitcoin addresses should be always generated offline.
• A Bitcoin address is not the public key related to its private key, but a hashed version of it.
25
The original and most common An address secured in various A newer version of the P2SH
format for Bitcoin addresses. A unusual ways, for example format that improves security.
P2PKH address always start requiring more than a private Still not recognized by many
with 1. key to be managed. A P2SH Bitcoin services. A Bech32
address always start with 3. address always start with bc1.
Ex.
1BvBMSEYstWetqTFn5Au4m4 Ex. Ex.
GFg7xJaNVN2 3J98t1WpEZ73CNmQviecrnyi bc1qar0srrr7xfkvy5l643lydnw9r
WrnqRhWNLy e59gtzzwf5mdq
26
TX ID
RECIPIENT
SENDER
UNSPENT INPUT
29
TRADING WEB-BASED
PLATFORM WALLET
USER
ACCOUNT
37
M 20
A 1
Y 8
15
TH
Cryptocurrencies exchanges
Founded: 2017 Founded: 2014 Founded: 2013 Founded: 2014 Founded: 2017
Headquarters: Malta Headquarters: China Headquarters: China Headquarters: HK Headquarters: KR
Crypto traded: Crypto traded: Crypto traded: Crypto traded: Crypto traded:
100+ 100+ 100+ 30+ 100+
Daily Volume (est.): Daily Volume (est.): Daily Volume (est.): Daily Volume (est.): Daily Volume (est.):
2-4 billion 2-4 billion 1.5-3 billion 1-2.5 billion 1.2-1.3 billion
Accepts fiat: No Accepts fiat: Yes Accepts fiat: Yes Accepts fiat: Yes Accepts fiat: Yes
Founded: 2013 Founded: 2011 Founded: 2014 Founded: 2014 Founded: 2011
Headquarters: KR Headquarters: USA Headquarters: USA Headquarters: USA Headquarters: USA
Crypto traded: Crypto traded: Crypto traded: Crypto traded: Crypto traded:
20+ BTC, ETH, LTC, BCH 100+ 30+ 10+
Daily Volume (est.): Daily Volume (est.): Daily Volume (est.): Daily Volume (est.): Daily Volume (est.):
700-800 million 300-400 million 300-400 million 350 million 300 million
Accepts fiat: Yes Accepts fiat: Yes Accepts fiat: No Accepts fiat: No Accepts fiat: Yes
38
M 20
A 1
Y 8
15
TH
Breaking down Bitcoin mining: some numbers
N.B.: The hash rate represent the number of combinations tried per second to solve the Bitcoin block puzzle. 30
million TH/s means every second miners try around 30,000,000,000,000,000,000 combinations. Today, mining requires
specifically engineered hardware; reaching the same hash rate with commercial hardware would be almost impossible,
and terribly inefficient in terms of energy consumption. For example, 45 TH/s is the raw computational power that will be
provided by 100 billion PS4!
45
M 20
A 1
Y 8
15
TH
Breaking down Bitcoin mining: some numbers
Estimated Bitcoin Network Energy Consumption
(in TWh per year)
Source: DEVO Lab, 2018
60
50
40
30
20
10
0
8-ago-14 8-nov-14 8-feb-15 8-ma g-15 8-ago-15 8-nov-15 8-feb-16 8-ma g-16 8-ago-16 8-nov-16 8-feb-17 8-ma g-17 8-ago-17 8-nov-17 8-feb-18 8-ma g-18
N.B.: 50-60 TW/h per year is the range of electricity consumption of countries such as Czech Republic or Switzerland.
46
M 20
A 1
Y 8
15
TH
Breaking down Bitcoin mining: some numbers
47
nov-13 mag-14 nov-14 mag-15 nov-15 mag-16 nov-16 mag-17 nov-17 mag-18
Price Equilibrium price
48
M 20
A 1
Y 8
15
TH
Different market, different rules
16,477.60$
17,527.30$
Legal
Illegal
50
2010-2011
2012-2014
2015-2017
2012-2014
2015-2017
Today
53
2010-2011
2012-2014
2015-2017
Silk Road was an online black market and the first modern darknet
market, best known as a platform for selling illegal drugs, shut down
Today by the FBI in 2014. All the transactions happening on the Silk Road
were being conducted with bitcoins.
54
2010-2011
2012-2014
2015-2017
Crypto-based debit and credit cards allow their holders to spend bitcoins (or
other cryptocurrencies) in any POS-equipped shop. When purchasing, the
company that issues the card offers a real time conversion service between
fiat and crypto currencies. However, at the beginning of 2018, a breakdown
Today by Visa and other major international banking companies left many of these
services inoperative.
55
2010-2011
2012-2014
2015-2017
Today
56
Exercises 1 & 2
§Which of the following is a correct Bitcoin address?
a) 1M1ue2ugsCXIurUbuUNsCZB5YBHXZVKe8R
b) 3XxCukfv8wm2upzhAARdh2SspbXq862WiK1jrzYnkb0sYNp
c) bc1qwqdg6squsna38e46795at95yu9atm8azzmyvckulcc7kytlcckxswvvzej
d) bc3qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq
a) 1.26*10-29
b) 1.37*10-34
c) 6.84*10-49
d) 8.63*10-78
59
a)1.43*10-33
b)1.37*10-34
c)1.81*10-62
d)8.63*10-78
N.B. Do you really want to try finding Satoshi’s treasure? The website http://www.allprivatekeys.com/ hosts an on-the-fly database with
all the possible private keys for a Bitcoin address. Pay attention, however: the database is
1,157,920,892,373,161,954,235,709,850,086,879,078,528,375,642,790,749,043,826,051,631,415,181,614,943 pages long. Good luck!
60