Financialy
Financialy
to Digital Currencies
Introduction to Module 2
• CyberCash
• Launched in 1990’s that pioneered the CyberCoin
• Problem: every user needed to obtain a certificate to verify their identity
• Declared bankruptcy in 2001
• Technology was eventually acquired by PayPal.
Graveyard of Failed Online Currencies
• DigiCash
• Used CyberBucks
• Clients were anonymous
• Patented a blind-signature scheme that has some similarity to Bitcoin’s
protocol
• Merchants were not anonymous and needed to register with a bank
• No user-to-user transactions
• DigiCash declared bankruptcy in 1998
• Technology eventually acquired by InfoSpace
Graveyard of Failed Online Currencies
• Magic Money
• Created by a members of a mailing list called Cypherpunks
• Violated the patent of DigiCash
• Cypherpunks was the group out of which Satoshi emerged
Graveyard of Failed Online Currencies
• Lucre
• DigiCash but without the patented technology
“ A lot of people automatically dismiss e-currency as
a lost cause because of all the companies that
failed since the 1990’s. I hope it’s obvious it was
the centrally controlled nature of those systems
that doomed them.”
— S ATO S HI NAKAM O TO , BI T CO I N DE V E L O P E R
TH
FEBRUARY 15 , 2009
Problems a Decentralized Currency Must Solve
• Who possess rights within the system, while still maintaining anonymity?
• How do you prevent this from being so cumbersome that individuals do not
want to join? (recall DigiCash...)
Property Rights in Bitcoin
• What is a signature?
• An object with the following properties:
1. Only you can make it (unforgeability)
2. Anyone can verify it
3. It’s permanent
The Digital Signature
• A digital signature:
1. A private key, generated at random
2. A protocol for affixing the private key to an electronic message (this is the
actual written signature)
3. A protocol for verifying that your signature is valid
• Without revealing your private key
• This is where the public part of your signature comes in
The Digital Signature
• “Random-number generators”
• Software that produces a string of random numbers
• Computer-generated random numbers are “pseudo-random
numbers”
Summary
• Satoshi’s solution
• In previous attempts to decentralize, creators focused on making it
impossible to tamper with the ledger
• Satoshi realized that it was sufficient (and much easier) to have incentives
not to tamper with the ledger
Bitcoin Innovation: Incentives
• Blockchain is the same idea but with cryptography so that it is hard to work
around
• Blockchains store large groups of transactions into blocks, not just one at a
time
What is Blockchain?
• Pointer
• A language object that stores the memory address of another value located
in computer memory
• Linked list
• A linear collection of data elements such that each element contains a
pointer that points to the next
• The elements might be in entirely different places, but they are connected
by pointers
• The pointers turn a collection of objects into an ordered list
• Could be a list of financial transactions → a ledger!
The Hash Function
• Hash function – takes an input of (virtually) any size and returns an output of a
fixed size
• In this case a 256-bit number
The Hash Function
• It is a linked-list
• With a hash pointer instead of a pointer linking objects
• The objects are not individual transactions, but rather blocks with several
thousand transactions
• A hash pointer is the hash function applied to the previous entry when it was
created
Summary
• There are no safeguards in the system to prevent Sophie from spending the
coin twice
Avoiding the Double-spend Attack
• JamesCoin
• Like MariaCoin, but with one key difference
• All transactions in the ledger must be signed by James to be valid
1. James creates JamesCoin
2. James writes a message “Pay Sophie with this coin.”
3. Sophie can then write a message “Pay Geoff with this coin.”
4. Both Sophie and James sign off on this last message
• Because James has signed the message “Pay Geoff with this coin” his
software “knows” that Geoff is the valid owner
• It will not let him sign off on a contradictory message
Avoiding the Double-spend Attack
• MariaCoin
Maria Sophie
Avoiding the Double-spend Attack
• MariaCoin
Geoff
Maria Sophie
Avoiding the Double-spend Attack
• MariaCoin
Geoff
Maria Sophie
Mike
Avoiding the Double-spend Attack
• MariaCoin
• MariaCoin
Geoff
Maria Sophie
Mike
Avoiding the Double-spend Attack
• MariaCoin
Geoff
Maria Sophie
Mike
Avoiding the Double-spend Attack
• MariaCoin
Geoff
Maria Sophie
Mike
Avoiding the Double-spend Attack
• MariaCoin
Geoff ?
Maria Sophie
Mike ?
Avoiding the Double-spend Attack
• MariaCoin
Geoff
Maria Sophie
Mike
Avoiding the Double-spend Attack
• MariaCoin
Geoff
Maria Sophie
Mike
Avoiding the Double-spend Attack
• MariaCoin
Geoff
Maria Sophie
Mike
Avoiding the Double-spend Attack
• MariaCoin
Geoff
Maria Sophie
Mike
Avoiding the Double-spend Attack
• MariaCoin
Geoff
Maria Sophie
Mike
Consequence: Transaction Latency
• MariaCoin
Geoff
Maria Sophie
Mike
Consequence: Transaction Latency
• MariaCoin
Geoff ?
Maria Sophie
Mike ?
Consequence: Transaction Latency
• MariaCoin
Geoff
Maria Sophie
Mike
Consequence: Transaction Latency
• MariaCoin
Geoff
Maria Sophie
Mike
Consequence: Transaction Latency
• MariaCoin
Geoff
Maria Sophie
Mike
Consequence: Transaction Latency
• MariaCoin
Geoff
Maria Sophie
Mike
Consequence: Transaction Latency
• MariaCoin
Long term consensus
Geoff
Maria Sophie
Mike
Summary
• Eventually, the system reaches consensus on one chain, with near certain
probability
• There is always some probability that an abandoned fork could be picked up
again
• Property rights in Bitcoin are inherently probabilistic
• This may make them more stable than the sovereign-dependent rights we
are used to
Cryptocurrency and Blockchain: an Introduction
to Digital Currencies
Proof of Work
• Ideally like to do is only pick honest nodes, and never pick malicious ones
• This is impossible
• Nodes do not have identities
• What if you could somehow turn a node into an honest node?
• Impossible for two reasons
• There is no such thing as computer-generated randomness
• It would require a centralized computer to generate the randomness,
and everyone would need to agree on it
Proof of Work
• Rely on the fact that nodes behave honestly unless incentivized otherwise
• Malicious nodes are out for their own good
• Not assuming that:
• malicious nodes are designed for the destruction of the system
PoW Concept 1: Block Reward
• Why is this?
• I, Jessica, propose a block that exhibits self-dealing
• The next node chosen to propose a block (Alice)
• Would Alice accept my block, rewarding my malicious behavior?
• Alice also wants to receive the block reward!
• Accepting my block makes it less likely that her block will be accepted
in the next round
• She needs to be both malicious and without self-interest
• In the background: a prevailing view that most nodes are acting honestly,
because all incentives are for them to do so
Summary
• The greater the computing power of the node, the more likely it is to solve the
hash puzzle
• When it solves the hash puzzle, it proposes the block, with the potential to
receive the block reward (if the block is accepted)
• It has thus “mined” new bitcoins
• Important: all nodes can verify that a given node has solved the puzzle
Proof of Work and Randomness
• For two competing nodes with roughly equal processing power, there is no way
to predict which node will solve the puzzle first and get to propose its block
• Is block selection random?
• Unpredictable? Yes.
• Only way to predict which one will win is by having as much computing
power as the two nodes combined
• Nondeterministic? No.
• Note: a process can be both deterministic and random (Henri Poincare in
the 19th century)
Currency Creation
• Block rewards
• Only way within the Bitcoin reference software for new coins to be
mined
• Even block rewards are limited
• Every 210,000 blocks, the block reward is cut in half
• Occurs every 4 years (approximately)
• Implies the total number of bitcoins will converge to 21 million
Total Bitcoins in Circulation
Currency Creation
• The creation of new bitcoins allows the currency to be in limited supply at the
beginning and the supply to grow and then to converge
• It does not imply that Bitcoin is subject to deflationary pressures
• It does imply that Bitcoin supply cannot be manipulated by a central bank
The Transaction Fee
• What if a node succeeds in gaining a majority of the CPU power across all
nodes?
• This node would be the first to solve all the hash puzzles
• This node could then build the longest chain in the blockchain
• The system would then revert to being centralized
PoW Challenge 1: The 51% Attack
• A weaker version of the 51% attack is what would happen if a small number of
nodes were to control all mining power
• As bitcoin mining has become industrialized, this has been occurring (see the
white paper “Analysis of Large-Scale Bitcoin Mining Operations.”)
• Miners could form a cartel and charge high transaction fees
• Could be seignorage, under another name
PoW Challenge 2: Resource Intensity