Tuesday 20 March 2018

Cryptofinance I – Campbell R. Harvey -- How bitcoin works?


This blog is based on the lecture notes of Professor Campbell R. Harvey in Fuqua School of Business, Duke University.

Bitcoin is the leading cryptocurrency, with a market capitalization 30 times as large as the second one (Ripple). Actually, there are over 500 other crypto-currencies and the first one came out in the 1980s. What’s special about bitcoin? How it works?

Decentralization
Conventional financial intermediates are centralized and for-profit business. In contrast, bitcoin and others are for peer-to-peer (P2P) transactions. They don’t need financial intermediates and the transactions are done directly between the involved two parties.  The conventional financial intermediates build up (also control) the trust system. In the world of crypto-currency, the trust system is built upon cryptographic algorithms, not the governments, nor corporations.

Double Spend Problem and Triple-Entry Accounting
The early cryptocurrencies failed because of the “double spend problem”. Think, when we transmit a document, we are not actually transmitting the document itself, but a copy of it. This doesn’t matter for documents. However, this would be a nightmare for transmit assets, such as currency, intellectual property rights and other rights. The meaning of transmit a sum of money from me to you is that I cannot use it anymore and cannot do a same transaction later.
The way bitcoin solves this “double spending problem” is the “triple-entry accounting”. In addition to the traditional double entry accounting, there is a third entry. Every transaction goes into a repository of common knowledge, which is called the “blockchain”. It could be thought as a public ledger. Blockchain is highly secure and maintained by everyone on the network.

How is new bitcoin created?
Every time someone wants to send bitcoins to some else, a transaction occurs and it will be recorded in the blockchain. Every 10 minutes, a new block contained transactions in the preceding 10 minutes is created. Miners compete in solving cryptographic “proof of work” to add a new block to the chain. Only the first miner who solves the problem get new bitcoins. As the difficulty of solving the code increases with more codes being broken, the production speed of bitcoins will be slowed down.

Security
It is blockchain network that validate transactions, not any tradition intermediates. Suppose Alice wants to buy something from Bob using 1 bitcoin. The network will first check if Alice has 1 bitcoin to transfer. If so, the transaction occurs and it is recorded to the blockchain. Each block and its previous blocks are sealed by miners with s computational code.  Contrary to traditional recording keeping, it is the transactions, not the balances that are kept in the blockchain.

Privacy and Transparency
How could we maintain privacy and transparency at the same time? Each transaction involves a public+private key. For the Alice-Bob example above, Bob sets up a digital public key, say a QR code, and sends it to Alice. Alice signs the transaction by using a private key that is unforgeably tied to the public key. The linkage is to be solved by the miners. After it is solved, the block is sealed and added to the blockchain, which becomes common knowledge on the networks. This common knowledge will be used when next time Bob wants to spend this 1 bitcoin.