I’m a little late to the party: blockchains and cryptocurrency have been around for a while now. Bitcoin has been making headlines recently with its unprecedented growth. Nevertheless, it’s better late then never.

I started playing around with the code from this article. It’s a nice intro to the topic, particularly if you’re already familiar with hash functions. In case you’re not, here’s my quick summary of hash functions:

  1. A hash function is a deterministic one-way function: calculating hash(x) for any x is easy, but going the other way is extremely hard.
  2. A small change to the input causes a large change to the output: hash(x) and hash(x+1) yield completely different results.

My two main takeaways from the original article are:

  1. cryptocurrencies use the blockchain for book-keeping
  2. cryptocurrencies create scarcity via requiring a “proof of work”.

The first part is reasonably straight-forward. The blockchain consists of series of blocks. Each block contains a list of transactions, like a ledger. Importantly, each block includes the hash of the previous block. Including the hash allows one to detect if the blockchain has been tampered with. For example, say our chain consists of two blocks, b1 and b2. If somebody changes the transactions in b1, then hash(b1) no longer matches the hash contained in b2. This makes the blockchain a reliable record-keeping tool, with many applications beyond cryptocurrency.

The second part, scarcity, is what actually lets cryptocurrency be a currency. Scarcity is an important quality for currency: it must be difficult to obtain. Early currencies, e.g. rare metals such as gold and silver, are naturally scarce. Existing currencies (e.g. dollar, euro, yen) are scarce because they are exclusively issued in limited numbers by a designated authority. This scarcity is enforced legally: for example, even if you have your own printing press, printing your own US dollar bills is a crime.

Cryptocurrency takes a different angle on scarcity: it requires you to solve cryptographic puzzles. Solving these puzzles require significant computing power, making it difficult (but not impossible). On the other hand, verifying that a given solution is correct is very easy. If you solve a puzzle, you get a unit of currency, e.g. one bitcoin, or some part thereof. These puzzles are different for each cryptocurrency. For example, for Bitcoin, the puzzle is known as Hashcash. The general technical term for these puzzles is proof of work. I interpret it as “proof that you’ve spent time working on a problem”. Obtaining these proofs (solving the puzzles) is known as “mining”.

Here’s where things get a little fuzzy for me, and I end up having more questions than answers. From here, in theory, you can use cryptocurrency just like any normal currency, to pay for goods and services. The transactions you make go in the blockchain. Here come the questions:

  1. Does everybody end up having their own copy of the blockchain?
  2. How do you reconcile multiple blockchains without losing any of the transactions?
  3. What affects the exchange rate of, for example, Bitcoin to the US dollar? Why is it so high now?
  4. Why is Bitcoin limited to 7 transactions per second?
  5. How does Bitcoin guarantee that it is finite?

Answers to the above may be a single Google search away, but that’s all the time I have for cryptocurrency this week. Till next time!