1. Bitcoin – digital gold
2013-06-19
Lars Marius Garshol, larsga@bouvet.no, http://twitter.com/larsga
1
2. Bitcoin?
2
• A digital currency
– based on cryptography
• Created by “Satoshi Nakamoto”
– nobody knows who this really is
• Basically a P2P crypto network
– the network maintains the record of transactions
– self-regulating through Bitcoin protocol
• No central authority
– no central bank
– no central control of any kind
• But it works...
4. The promise of Bitcoin
• Cheap transactions
– fully digital in a decentralized P2P network
– cost of transactions low, no privileged parties,
should lead to low fees
• No central control
– no inflation
– no single point of failure
• Total freedom of use
– no interfering governments
– no party has the ability to block transactions
• Secrecy
– all transactions are pseudonymous
– identity of account holders hidden
4
5. Bitcoin as investment
5
Value of 1 Bitcoin in US dollars
http://bitcoincharts.com/charts/mtgoxUSD#rg360ztgSzm1g10zm2g25zv
8. Bitcoin
• A bitcoin is a chain of digital signatures
• To give a coin to you I sign
– hash of previous transaction, plus your public key
• Only I can do that
– because only I have my private key
• But anyone can check it
– because my public key is in
the transaction
• Secure because of how
cryptography works
8
9. The double-spending problem
• Cryptography cannot prevent me from
spending the same coin twice
– I buy a banana from you, and a newspaper from
someone else, using the same coin
• The solution to this is to make everyone
aware of all transactions
– that way, if I spend the coin twice, everyone will
know
• However, we also need to know which
transactions are accepted
– a kind of ledger of transactions
9
10. The block chain
• Bitcoin clients collect new transactions
– then issue a block containing the approved
transactions
– each block is cryptographically attached to the last
known block
• This chain of blocks is the ledger
– once you have the entire block chain you know who
owns what bitcoins
– only one transaction per bitcoin is accepted, thus
solving the double-spending problem.
10
11. A boot-strapping problem
• But if anyone can create a block, why can’t I
create one with my double-spending in it?
– you can, but then others need to build on it
– if others don’t extend the chain from your block,
your block will be lost
• But if anyone can create a block, why
doesn’t the chain fork into a billion strands?
– because blocks are difficult to create
– right now, you’d need roughly a year on a normal
laptop to create a block
– and only the block with the longest chain is
accepted
11
12. Creating a difficulty
• Each block contains a hash of its contents
– that hash is computed cryptographically
– that is, it’s deterministic but unpredictable
– and Bitcoin requires that it start with a certain
number of zeroes
• Making the hash come out right is hard
– let’s say the hash must begin with 20 zeroes
– this means only one in a million blocks will be
accepted
– clients must jiggle the nonce until the hash comes
out right
12
13. How difficult, exactly?
• The protocol has rules for the difficulty
– keeps the average block creation time at 10
minutes
– creation time goes up as computational resources
improve
• Each block contains a “reward”
– basically, some free bitcoin, as reward for creating
the block
• The 51% attack
– the rules + difficulty ensure that an attacker needs
more than half the CPU power in the network to
succeed
13
14. 51% attacks are real
• There is a whole raft of digital currencies
– not just Bitcoin
• On June 8th and 10th Feathercoin
succumbed to a 51% attack
• The same thing is possible with Bitcoin
– but far less likely
14 http://www.thegenesisblock.com/the-51-attack-what-
bitcoin-can-learn-from-alt-coin-experiments/
16. The network
• Bitcoin is basically a P2P network
– computers speaking the protocol find each other
and connect to one another
– transactions get distributed throughout the entire
network
• All you need to join in is a Bitcoin client
– Satoshi’s original client is still available
– start it up, and it downloads the entire transaction
history of all users
16
18. Exchanges
• These are a kind of Bitcoin bank
– basically, they allow you to use normal currency to
purchase bitcoins
– also allow you to keep accounts there
– saves you having to run your own client
• Other clients also exist
– both desktop and web-based
– usually called “e-wallet”
18
19. A deeply elegant design
• Just two concepts
– bitcoins
– blocks
• Public keys double as
– account numbers
– access control to publicly held resources (bitcoin)
• Blocks double as
– official record of transaction
– economic incentive to keep network running
• The whole thing is self-sustaining
19
20. 20
But how can a digital signature on a digital signature
on a digital signature serve as money?
22. A potted history of money
22
• The beginning: gold coins
– gold has intrinsic value1
– coins therefore valuable not just as money, but also in
themselves
• The next stage: symbolic money
– paper notes, and coins in cheap metals
– backed by the promise of free exchange against gold at
any time
• Fiat money
– paper notes and coins, backed by nothing
– nothing, that is, except legal requirements
• Digital money
– today, most money is bits
– that is, numbers in relational databases
– specifically, the account databases of banks
1Ok, not really, but it’s what people thought
23. What can be used as money?
23
• Basically anything
• Provided it is rare
24. An example of fail
"How can you have money," demanded Ford, "if none of you actually produces anything? It
doesn't grow on trees you know."
"If you would allow me to continue ..."
Ford nodded dejectedly.
"Thank you. Since we decided a few weeks ago to adopt the leaf as legal tender, we have, of
course, all become immensely rich."
Ford stared in disbelief at the crowd who were murmuring appreciatively at this and
greedily fingering the wads of leaves with which their track suits were stuffed.
"But we have also," continued the management consultant, "run into a small inflation
problem on account of the high level of leaf availability, which means that, I gather, the
current going rate has something like three deciduous forests buying one ship's peanut."
Murmurs of alarm came from the crowd.The management consultant waved them down.
"So in order to obviate this problem," he continued, "and effectively revalue the leaf, we are
about to embark on a massive defoliation campaign, and ... er, burn down all the forests. I
think you'll all agree that's a sensible move under the circumstances.”
24 The Restaurant at the End of the Universe, Douglas Adams, chapter 32
26. Money without banks
26
Following an industrial dispute, [Ireland]’s
banking system shut down for nearly seven
months, with customers unable to withdraw or
deposit money.Yet instead of the country
grinding to a halt as anticipated, people began
accepting cheques or IOUs based on their own
assessments of risk. So in a rich and developed
economy, albeit one with strong communal
links, institutionalised banking was replaced by a
personalised credit system – proving, he says,
“the official paraphernalia” of banks, credit cards
and notes, can disappear “and yet money still
remains”.
http://www.guardian.co.uk/books/2013/jun/09/money-biography-felix-martin-review
27. The functions of money
27
• A medium of exchange
– that is, you can use it to buy things
– instead of having to barter
• A unit of account
– it’s the unit in which you do book-keeping
– a unit of measurement of economic value
• A store of value
– you can use it to store value for when you need it
– an alternative to a hoard of gold
28. Scorecard
28
Currency Exchange Account Store Scarcity
Leaves Yes Yes Kind of Fail
Yap stones Yes Yes Yes Yes
Irish IOUs Yes Kind of Within
reason
Yes
Gold coins Yes Yes Yes Yes
Paper notes Yes Yes Yes Yes
Bank acc’t Yes Yes Yes Yes
Bitcoin Yes Yes Yes Yes
30. Bitcoin usage
30
• Total size of the economy
– 11,282,525 BTC
– 1,218,749,633 USD ≈ 1.2 billion USD
• Transactions last 24 hours
– 43,331
– volume: 60,034,876 USD
– (unknown % of this transfers between different
accounts with same owner)
• Effective GDP of Bitcoinia1
– 21,912,729,783 USD ≈ 22 billion USD
– 0.01% of United States GDP
– 4.5% of Norway GDP
– roughly same as Estonia
As of 2013-06-13, source: http://www.bitcoinwatch.com/
1GDP by multiplying last 24h
by 365, then converting with
USD exchange rate. Effectively
nominalGDP, without accounting
for self-to-self transfers.
31. Could Bitcoin replace national
currencies?
31
• In a word, no
– in most countries, the law requires the national
currency to be accepted “as payment for any debt”
– in many countries, the legal tender must be
accepted as payment for goods1
• Governments require insight into
transactions
– for purposes of taxation
– income tax, sales tax, ...
• National currencies are key to regulating
the national economy
– we will return to this, but basically it is not a right
that the state is going to let go of
1 In Norway: §14 of Sentralbankloven
32. Anonymity
• Bitcoin is pseudonymous, not anonymous
– basically, everyone knows which public keys hold
what bitcoins
– but not everyone knows who holds which keys
• Knowledge of all public key owners implies
– total awareness of all transactions
• In short, breaches of anonymity can
potentially be extremely embarassing
– may even cause legal difficulties
32
33. How secret are pseudonyms?
33
• Most e-wallets automatically create lots of
keys
– making it easier to hide your identity
• Researchers have shown that network
analysis can be surprisingly effective1
– for example establishing which keys have the same
owners
• Researchers have earlier shown that
anonymized data can be reversed
– revealing the identities of accounts
• Remedies have been proposed
– but not implemented
• Essentially, you can not rely on secrecy in
today’s Bitcoin
1 http://arxiv.org/abs/1107.4524
34. Speed of transactions
34
• Having your transaction accepted into a
block is not enough
– because the block chain forks all the time
• Need to wait until 5 more blocks added to
the chain
– since the longest chain is the one that’s used
• Average block time = 10 minutes
– secure transaction time = 1 hour
• Not so good for ATMs or physical stores
36. But what about that pub?
36
• They accept fast payments
• So, basically, they’re taking
the chance that a customer
will double-spend
– probably this is fairly safe at the
moment
– and if they ever get scammed,
they only lose a few pounds
– the publicity is probably worth
more than that, anyway
• The customer is safe
– once the pubco’s servers see the
transaction, they get their beer
– double-spending attacks affect
the seller, not the buyer
http://www.wired.co.uk/news/archive/2013-06/17/london-bitcoin-pub
"By not waiting for a block, we are
vulnerable. On the other hand, my
attitude is if they do, they're standing
right here.They've got a pint in front of
them.You can go and take it off them.
People [in pubs] hang around after a
purchase, rather than walking out, so I
think the risk of a double spend is
minimal.” --Stephen Early, owner
“So far, his pubs have taken
around £750 in Bitcoin
payments in the few weeks
he's been accepting them.”
37. Immature infrastructure
37
• Stories of users losing bitcoin managed on
their desktops appear all the time
– generally, their machines are compromised
– attackers then steal public keys, abscond with BTC
• Not all exchanges are trustworthy
– or, they are honest, but run into problems
– see stories of people having problems with
exchanges again and again
• The protocol is secure, but the
infrastructure is not
38. Bitcoin is not alone
• Ripple ?
• Litecoin 40 million USD
• Feathercoin 1 million USD
• Namecoin 5 million USD
• PPcoin 4 million USD
• Terracoin 1 million USD
• Novacoin 1 million USD
• Ven 2 million USD
• Bitcoin 1.2 billion USD
38
It’s not a given that
Bitcoin will be the one
to succeed, but it is the
biggest, by a good
margin.
39. Outcompeted via mining?
• Will people abandon Bitcoin for other
currencies because mining other currencies
becomes more attractive?
• The bigger Bitcoin gets, the harder mining
becomes
• Mining a smaller currency might be more
cost-effective
– even if it’s smaller, and the currency of lower value
39
40. Currency stability
40
• The value of Bitcoin has been fluctuating
wildly
• Not ideal when combined with slow
transactions
– value of the currency may change before the
transaction has completed
• Caused by two issues
– small size of Bitcoin economy,
– no central bank to adjust currency value
• One of those issues may go away
41. No government control at all
41
• Is that really likely?
– governments can certainly control money flows in
and out
– perhaps they can control even more, if they want
• Does allow money to “escape”
– think of Cyprus
– Turks protesting by taking money out of banks
– ...
• But are major money flows outside gov’t
control really a desirable thing?
– can it be stopped simply because it’s not desirable?
42. No central bank
• Bitcoin has a fixed total size of the currency
– the fee for new blocks decreases over time,
eventually to zero
– after that time (2021) there will be no new bitcoins
• This follows from the design of the protocol
– having a totally decentralized system was a key
design principle
– this does not allow for any central bank
• Libertarians love this aspect
– means “no Fed” (which they hate)
– also “no debasing the coinage” (ditto)
• But...
42
44. The economy grows faster than the
monetary base
44
Value of 1 Bitcoin in US dollars
This is deflation!
45. Inflating and deflating
45
• Inflation
– when the value of money decreases over time
– when 1 XXX buys less next year than this year
• Deflation
– the opposite
– your money grows more valuable as it sits in your
pocket
• Sounds like “inflation good, deflation bad”
– but it’s not that simple
47. The effect of inflation
• Inflation erodes the value of savings
– savings in cash, that is
• Encourages spending
– investment in real estate, business etc is safer
– or just buying anything at all
• Economic growth is measured in GDP
– falling GDP is bad for everyone
– GDP is essentially a measure of the velocity of
money
– because my spending is your income, and your
spending is my income
• Deflation has the opposite effect
– why buy a new whatever now, when the same
money will buy more tomorrow?
47
49. A little inflation is a good thing
• Central banks generally aim for ~2%
– for a healthy balance between spending and saving
• Most of theWestern world now runs below
that
– a consequence of the economic crisis
• Japan has run below for two decades
– essentially fell into a hole because a real estate
bubble burst (sound familiar?)
• Massive money-printing has not solved the
problem
– Japan has tripled its monetary base, to no effect
– the US has doubled its mb, with same result
49
50. Life in Bitcoinia
• Basically, Bitcoin is designed for a stagnant
economy
– one where people sit on their bitcoins
• A national economy based on Bitcoin is
therefore a horrible idea
– it would, in effect, be like going back to the gold
standard
– or adopting the Euro
• But could it work as a “side currency”?
– a kind of alternative Paypal?
– yes, probably
– if they fix the problems with it
50
51. Bitcoin as “side currency”
• Doesn’t this make Bitcoin simply a
competitor to Paypal?
• If so, does it need to be a currency at all?
• What about a Paypal with non-reversable
transactions?
– might be just as cheap and attractive?
• To be decided by competition, perhaps...?
51