Upload
lars-marius-garshol
View
813
Download
1
Tags:
Embed Size (px)
DESCRIPTION
An overview of what Bitcoin is, how it works, and an analysis of problems with the currency.
Citation preview
1
Bitcoin – digital gold2013-06-19Lars Marius Garshol, [email protected], http://twitter.com/larsga
2
Bitcoin?
• 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...
3
If people will giveyou beer for it,it’s real money.
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
5
Bitcoin as investment
Value of 1 Bitcoin in US dollars
http://bitcoincharts.com/charts/mtgoxUSD#rg360ztgSzm1g10zm2g25zv
6
Looking good, but does it live up to the promise?
7
The protocol
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 howcryptography
works
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
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.
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
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
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
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
http://www.thegenesisblock.com/the-51-attack-what-bitcoin-can-learn-from-alt-coin-experiments/
15
Bitcoin mining rig
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
17
The Satoshi client
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”
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
20
But how can a digital signature on a digital signatureon a digital signature serve as money?
21
The nature of money
22
A potted history of money
• 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
1 Ok, not really, but it’s what people thought
23
What can be used as money?• 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.”
The Restaurant at the End of the Universe, Douglas Adams, chapter 32
25
Stone money
Yap islanders carrying a coin to a festival, 1964
26
Money without banks
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
• 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
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
29
Promises and problems
30
Bitcoin usage
• 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/
1 GDP by multiplying last 24hby 365, then converting withUSD exchange rate. Effectivelynominal GDP, without accountingfor self-to-self transfers.
31
Could Bitcoin replace national currencies?• 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
33
How secret are pseudonyms?
• 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
• 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
35
Fast transactions are not secure
http://eprint.iacr.org/2012/248.pdf
36
But what about that pub?
• 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
• 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
It’s not a given thatBitcoin will be the oneto succeed, but it is thebiggest, by a goodmargin.
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
40
Currency stability
• 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
• 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...
43
A little economic theory
44
The economy grows faster than the monetary base
Value of 1 Bitcoin in US dollars
This is deflation!
45
Inflating and deflating
• 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
46
Hyperinflation = disaster
The cost of one beer in Harare, Zimbabwe, November 24, 2007
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?
48
49
A little inflation is a good thing• Central banks generally aim for ~2%
– for a healthy balance between spending and saving
• Most of the Western 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
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
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...?
52
Conclusion?
I don’t have one yet.