Responses to Bitcoin Interview Questions

I recently did an interview with Ryan Ringer, a computer science student and technologist, in which I answered questions about Bitcoin. Below are some of my answers to his questions.

RR: Why is bitcoin of any value?

JO: This is a simple question with a surprisingly complex answer. To figure out what gives bitcoin value, we first have to think about what gives currency value. It turns out, currency as a concept isn’t all that valuable. Instead, it REPRESENTS something of value.

I’ll use an example. Let’s say you and I wish to perform a transaction. I sell beaver pelts and you sell eggs. If we use a straight barter, then if you don’t want beaver pelts or I don’t want eggs then we can’t trade. However, what if there was something we could trade for that EVERYONE wanted — like gold? I can trade my beaver pelts for gold, and then trade that gold with anyone for anything else I want or need.

The gold itself has value simply because it is universally accepted and trade-able. Almost anyone will accept gold for their wares, and so you can use that gold to purchase anything you need. It acts as an abstraction of value — allowing you to convert one beaver pelt into eggs, and any other items you’ll need, through trade.

Other forms of currency have existed in the past. Some, like gold and silver, have alternative uses and derive extra value from there. However, others have no intrinsic value in and of themselves. Their value is simply in the fact that they can be used for trade. These are called “fiat” currencies, and represent the “paper” currency in use in the world today (including the US Dollar).

So why would someone use bitcoin instead of “regular” paper fiat currency (the currency of legal tender in their country)?

There are many different reasons — some economical, some political, and some technological. I’ll address a few of them here:

1. Bitcoin allows for trade between two un-trusting parties without a 3rd party mediator / escrow agent over the public Internet.

2. Bitcoin supply cannot be artificially inflated, and new bitcoin cannot be created by any entity (no such thing as quantitative easing)

3. Bitcoin transactions are incorruptible (nobody can seize bitcoin from a wallet)

http://money.visualcapitalist.com/infographic-the-properties-of-money/ https://study.com/academy/lesson/the-four-basic-functions-of-money.html

This ability to easily and securely transact over the Internet with anyone in the world without the need for a 3rd party intermediary (or permission from a 3rd party) in itself gives bitcoin value.

RR: What does it mean to “mine” cryptocurrency?

JO: Bitcoin is basically a giant log book of each transaction ever made on the network. All over the world, people are making bitcoin transactions by adding an entry into that logbook. This entry is digitally signed and sent to the nearest bitcoin “node”, which is ultimately just someone running the bitcoin program on their computer.

When those transactions are received, they’re placed into a giant “block” of transactions. Every 10 minutes, a new block is created and each bitcoin node assembles a bunch of transactions and puts them into a block. The node then generates a SHA-256 hash of the transactions in that block. That SHA-256 hash is used to validate that the block of transactions hasn’t been tampered with — kind of like putting them in a box with a tamper-proof seal. If that same block of transactions is submitted by another node later on with a different SHA-256 hash, then the rest of the nodes in the network will reject it. No two blocks of transactions will generate the same SHA-256 hash, they are impossible to fake, and very easy to validate, making them perfect for this. Every block that gets submitted for “approval” to the global record of blocks (called the block chain) must have a valid SHA-256 hash.

Every node that successfully hashes one of these blocks receives a reward of bitcoin. The reward started at 50 bitcoin and halves every 4 years (it’s currently at 12.5 bitcoin as I’m writing this). Typically, performing a SHA-256 hash is very easy (a standard CPU can perform hundreds-of-thousands of those hashes per second) — which would mean adding a huge number of computers would allow someone to easily and quickly hash all of the transactions available into a single block. This would effectively give a single person control of the entire bitcoin network — a centralized authority — which is one of the stated reasons that bitcoin was created to oppose.

So, how does bitcoin prevent a single authority from simply mining all of the transactions?

Bitcoin adds a twist to the SHA-256 hashing function. It adds something called a “difficulty”, which completely changes the game. SHA-256 hashes are very easy to compute, but they are completely irreversible. It’s impossible to start with a hash and extract a set of transactions from it. The only way to generate the hash is to have the original transactions and run it through the program again. Hashes are completely random, so there’s no way to guess what hash might be produced from the given input. If you wanted to create a hash that had a specific set of properties (for example, an input that produces a hash that starts with 0), the ONLY way to find that input would be to brute-force guess-and-check until you found the magical combination of inputs that produced a SHA-256 hash that starts with a 0.

The twist that bitcoin adds is this: In order to claim the reward (and to have your block of transactions added to the network), you have to add one more input to your SHA-256 hash of the block of transactions. This input, called a NONCE, is simply a 32-bit number. Your goal is to find a SHA-256 hash of your transactions that, combined with the NONCE, is less than or equal to a target hash. Basically, it’s a puzzle to try every single possible NONCE value, SHA-256 hash it with your block of transactions, and check it to see if it matches a given hash value.

A simple formula might look something like this

If SHA256(NONCE + TRANSACTIONS) < 5000000000000 THEN YOU WIN THE LOTTERY

All of this is designed to make it impossible to submit fake or duplicate transactions while ensuring that the supply of bitcoin released over time stays consistent.

RR: Where does the Bitcoin Blockchain exist?

JO: When a new node runs, it downloads the entire history of bitcoin — every transaction ever made since the very first one. Every single node has a copy of this giant ledger / database of transactions, and adds to it every 10 minutes as new blocks are “mined” / validated. The blockchain is basically a giant distributed database that runs on computers all over the world, and contains features that ensure that the database is consistent across all of these computers. New transactions must be “agreed” upon by over 51% of the network in order to become valid — a concept called “consensus”.

RR: How do you secure your wallet?

JO: There are many different ways to secure a wallet. Rather than tell you the specifics of mine (which is a security risk for me), I’ll say that you can generate many different bitcoin wallets from a single master key (called a Deterministic Private Key). To prevent accidental deletion, the master private key can be re-generated by using a 24-word keyphrase.

My recommendation for most people is to purchase a hardware wallet such as those available by Trezor and Nano, and use that to securely store the private and public keypair that grant spend access to your bitcoin. Use a trusted exchange and transfer the coins as quickly as possible off of that exchange to your private wallet.

RR: Is a cryptocurrency capable of being secure enough to exist without the need for banks or government regulation?

JO: Cryptocurrencies were developed as a response to the insecurity and instability of currency which is generated by governments and managed by banks. The protocols used to secure bitcoin are more secure than those used by banks to govern transactions between individuals. Whereas bank transactions are modifiable, bitcoin transactions are not. Where banks can, at will, remove or add money to bank accounts, bitcoin remains stable and incorruptible by anyone once they’ve been added to the network. Where bank transactions are shrouded in secrecy and un-auditable by customers, making fraud difficult to discover, Bitcoin transactions are completely transparent and available for anyone in the world to inspect, making fraud immediately apparent.

Bitcoin is impossible to regulate by a government simply because it is not run by a government — it is a democratic currency run by a worldwide network of volunteers in the same way the Internet is. Those using bitcoin use it because they choose to — not because they are forced to by their government.

Every single true fiat currency in history — every currency where the supply was not directly backed by some physical asset with limited supply — has devalued and failed. The currently most popular iteration — the US Dollar — which represents approximately 63% of the reserve holdings of banks around the world, has only existed as a true fiat currency since 1973. Before that it was tied to the US Supply of gold, which is a finite resource. Since then, the US has accrued over $20 trillion dollars in debt — which means the US has printed over $20 Trillion without providing any economic output for those dollars. This means that every man, woman, and child living in the United States owes the other countries and citizens of the world $66,666 worth of economic output.

Bitcoin is designed to combat this by making it impossible for any government to tamper with the currency — by adding or removing more of it from circulation — for political ends. It can only be acquired by mining, trading, and transaction fees for using the network.

Banks themselves only exist to help facilitate transactions. In a transaction between two people, where neither party trusts the other, a bank serves as a trusted 3rd party to mediate and ensure that the money is transferred reliable between parties. In their purest form — not as an avenue for speculative investment — bitcoin makes banks unnecessary

Entrepreneur. Engineer. Educator.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store