A Beginner’s Guide to Bitcoin and the Blockchain

Bitcoin is one of the hottest subjects in the financial world today.  Some people think it is a highly valuable property[1] and others think it is all speculation[2].  Articles talk about and around bitcoin, but they tend to not explain what it is.

The Basics

From a user’s standpoint, bitcoin feels just like “real” money such as the Dollar or the Euro[3].  The only thing you cannot do with bitcoin is to pull a roll of paper money or a handful of coins out of your pocket because bitcoin is all electronic.  A person can buy, sell, and use bitcoin like any other national currency[4].

There are several ways to get bitcoins: from bitcoin exchanges, by doing a specific type of work called mining on the bitcoin computer network, and by getting paid in bitcoins for providing goods or services[5].

You can use “real” money to buy bitcoins at online coin exchanges or even from bitcoin ATMs[6].  You can also sell bitcoins at these exchanges to get “real” money back.  This is basically the same as if you travel from U.S. to Europe and need to exchange U.S. Dollars into Euros, and when you travel back, exchange your leftover Euros back to U.S. Dollars. You can exchange your Euros to British Pounds and then to U.S. Dollars if you wish.  You can do all of this with bitcoins at bitcoin exchanges.  You can even do a private cash exchange and get bitcoins from your friend or cousin or, really, anyone.

Another easy way to get bitcoins is getting paid in bitcoins if you provide goods or services.  You convert into bitcoin (using the current exchange rate) the price of the item you are selling or the service you are providing, and you take your payment in bitcoins[7].  You pay and get paid electronically, via a computer or a smartphone app[8].  Note that right now, one bitcoin is worth many thousands of U.S. Dollars, so in reality you would be paid by a fraction of a bitcoin. Each bitcoin can be divided into one hundred million parts, and each part is called a satoshi[9].  You would, then, most likely be paid in satoshis.

The third way to get bitcoins is through mining.  The concept of mining is somewhat complicated and will be explained below, but for now, think of mining as helping with a specific type of upkeep of the bitcoin computer network[10].  As in real life, if you do work, you (hopefully) get paid.  If you do work on the bitcoin network, you get paid in bitcoins[11].  Bitcoins are rewarded to miners by the network, so, in a sense, the coins appear from thin air.  Even this is not unusual compared to “real” money because, sometimes, governments simply print more money when they need more money[12].

Once you have some bitcoins, you keep them until you spend them.  With “real” money, you keep them in cash or keep them in a bank.  With bitcoin, though you have an electronic wallet, your ownership of bitcoins and the amount you own are only recorded on a unique database called a blockchain[13].  The information on a blockchain cannot be deleted or easily changed, so for all practical purposes, if the blockchain says Person A owns x bitcoins, that information is permanently recorded on the blockchain[14].  Later on, the blockchain may show that Person A has spent all his bitcoins, but the fact that Person A used to own x bitcoins is forever memorialized on the blockchain[15].

To transfer bitcoins from one person to another, a payor uses his electronic wallet[16].  When a payor presses the “pay” button, a series of mathematically complicated steps are initiated, ending with a difficult-to-alter record on the blockchain that says the payee now owns y bitcoins[17].  The payor and the recipient do not see these complicated steps.  The only extra thing the users see is that the payor has paid an additional transfer fee to complete the transaction[18].  After payment, one waits for a confirmation that the new ownership information has been permanently recorded on the blockchain, and then the transaction is complete[19].

The Technical Explanation: The Blockchain

So far, using bitcoin is not all that different from using “real” money[20].  What makes bitcoin special is the blockchain and the multiple layers of encryption used to protect various parts of the blockchain.  Note that the concept of blockchain can be used for other purposes[21], but it was first invented for use with bitcoins[22].  The bitcoin blockchain has one purpose: to keep track of who owns which bitcoin[23].

As an initial matter, the blockchain is set up on a peer-to-peer network[24].  Although there is only one bitcoin blockchain, many computers on the bitcoin network—called nodes—contain full copies of the blockchain[25].  When the blockchain is changed on one node, as long as the change follows the rules of the blockchain network, the change will quickly propagate through the network until every node on the network contains the changed blockchain.[26]  Because there are so many copies of the blockchain on the network, the blockchain cannot be easily destroyed.

The word blockchain describes what it actually is—a series of blocks (of information) linked to each other using complex mathematics to form a chain[27].  The older blocks are at the beginning of the chain and newer blocks are near the end of the chain[28].  The newest block is attached to the end of the chain.

Each block in the chain contains two main compartments of information: the header and the data[29].  The header is used to link the blocks to each other to form the blockchain and has other information that identifies it as a specific block in the blockchain[30].  The data section contains the record of who owns how much bitcoin—i.e. bitcoin transaction information[31].

Each data section can contain many transactions[32], and each transaction consists of a statement like Person A transferred to Person B x bitcoins (so Person B now owns x bitcoins)[33].  The actual names of the payor and payee are hidden through encryption, so the identities of owners are somewhat secure (but it is not 100% secure for other complex mathematical reasons)[34].

So that Persons A does not spend bitcoin he does not have, the bitcoin network keeps another list that says Person A has y bitcoins[35].  The number y changes every time Person A spends or acquires bitcoins until Person A has zero bitcoins.  At that point, Person A’s name drops from that list.  (However, the fact that Person A used to own y bitcoins is forever recorded in the blockchain.)  If a person tries to transfer bitcoins and their name is not on that list (or if they do not have enough bitcoins), then the transaction is rejected and is never memorialized in a block.[36]  Every time a transaction is made, the system checks this list as well as the blockchain records to make sure that people do not spend money they do not have.

In addition to the data section, each block on the blockchain has a header section.  To form a new header, you encrypt the information of the data section of the current block to get one number[37], take the header of the previous block (which is another number), and run both numbers through yet another encryption algorithm to form a third number[38].  This third number then becomes the header of the new block.  This means the header of the newest block depends on all the headers of all the blocks before it, and so are “chained” to each other.

This chaining and dependency on all previous blocks is why it would be extremely difficult to try to hijack the blockchain from the middle of the chain—to insert the hijacking block, a hijacker would have to change all the encryption of the blocks between the hijacking block and the newest block (which is constantly being generated about every ten minutes)[39].  From a practical standpoint, it would take too much computing power, so the effort would likely not be worth the bitcoins stolen that way[40].

It takes work to make the next block in the blockchain.  Specifically, someone needs to buy the computer and pay for the electricity to run the computer to make the header of the new block.  People who do this work are called miners[41], and they are paid in bitcoins. For now, every time a miner correctly encrypts a new block to add to the blockchain[42], the system pays the miner a set number of bitcoins and everyone who’s transaction is recorded in this new block also pay that miner their transaction fee[43].

The number of bitcoins awarded for every new block changes over time and eventually will be zero[44].  Then, the miners would be paid for making the new block only through transaction fees.  The transaction fee is set by the user of the bitcoin, and it can be any amount[45].  Naturally, because people want to be paid more, the transactions with the higher fee get placed into the next block faster than the ones with the lower fees[46]. In this way, the transaction fee would naturally increase so that the miners can make money when working on the blockchain.

Closing Words 

This article is a short and high-level introduction to bitcoin.  When you transfer “real” money, your bank is always involved to make sure you actually do have the money to transfer and that you have not spent the same money twice.  With bitcoin, you do not need a bank because how much bitcoin you own is recorded in the blockchain for all to see, is checked and the change recorded onto the blockchain, and this record is very difficult to alter because of all the encryption involved.  This was why the inventor of bitcoin invented this system—to make it unnecessary to involve a bank on money transfers.

REFERENCES

[1] “Is Bitcoin a Good Investment,” Bitcoin Magazine, last modified May 05, 2017, 03:26:01 PM EDT,  https://www.nasdaq.com/article/is-bitcoin-a-good-investment-cm785230 .

[2] Montag, Ali, “Warren Buffett Explains One Thing People Still Don’t Understand About Bitcoin,” CNBC Money, last modified May 01, 2018, 1:00 PM ET https://www.cnbc.com/2018/05/01/warren-buffett-bitcoin-isnt-an-investment.html

[3] “What is bitcoin,” Frequently Asked Questions, bitcoin.org, last accessed June 8, 2018, https://bitcoin.org/en/faq#what-is-bitcoin

[4] Bitcoin.org, “What is Bitcoin.”

[5] “How does one acquire bitcoins,” Frequently Asked Questions, bitcoin.org, last accessed June 8, 2018,  https://bitcoin.org/en/faq#how-does-one-acquire-bitcoins

[6] https://bitcoin.org/en/exchanges

[7] “How to accept bitcoin, for small businesses: Setting Prices,” Bitcoin Wiki, last accessed June 8, 2018, https://en.bitcoin.it/wiki/How_to_accept_Bitcoin,_for_small_businesses#Setting_Prices

[8] “How to accept bitcoin, for small businesses: Accepting Payment,” Bitcoin Wiki, last accessed June 8, 2018, https://en.bitcoin.it/wiki/How_to_accept_Bitcoin,_for_small_businesses#Accepting_Payment

[9] “Denominations,” Technical Glossary, bitcoin.org, last accessed June 8, 2018, https://bitcoin.org/en/glossary/denominations

[10] “What is bitcoin mining,” Frequently Asked Questions, bitcoin.org, last accessed June 8, 2018,  https://bitcoin.org/en/faq#what-is-bitcoin-mining

[11] “Mining: Introduction,” Bitcoin Wiki, last accessed June 8, 2018, https://en.bitcoin.it/wiki/Mining#Introduction

[12] The money is merely backed by the “full faith and credit” of that country’s economy.

[13] “Blockchain,” Bitcoin Wiki, last accessed June 8, 2018, https://en.bitcoin.it/wiki/Block_chain

[14] Bitcoin Wiki, “Blockchain”

[15] Bitcoin Wiki, “Blockchain”

[16] “How difficult is it to make a bitcoin payment,” Frequently Asked Questions, bitcoin.org, last accessed June 8, 2018,  https://bitcoin.org/en/faq#how-difficult-is-it-to-make-a-bitcoin-payment

[17] Bitcoin Wiki, “Blockchain”

[18] “How much will the transaction fee be,” Frequently Asked Questions, bitcoin.org, last accessed June 8, 2018,  https://bitcoin.org/en/faq#how-much-will-the-transaction-fee-be

[19] “Why do I have to wait 10 minutes,” Frequently Asked Questions, bitcoin.org, last accessed June 8, 2018,  https://bitcoin.org/en/faq#why-do-i-have-to-wait-10-minutes

[20] If you ignore the economics behind what makes money valuable.

[21] Blockchain is especially useful in chain of title or chain of custody type applications, where you need to keep track of who owned what and in what time order.  Therefore, it can be used to, for example, track a shipment of bananas from the farm to the grocery store display, with who had possession of the goods at which time.

[22] Marr, Bernard, “A Very Brief History of Blockchain Technology Everyone Should Read,” Forbes, Feb. 16, 2018, 12:28 AM, https://www.forbes.com/sites/bernardmarr/2018/02/16/a-very-brief-history-of-blockchain-technology-everyone-should-read/#65dc38c57bc4

[23] See, generally, Nakamura, Satoshi, “Bitcoin: A Peer-to-Peer Electronic Cash System,” https://bitcoin.org/bitcoin.pdf

[24] A peer-to-peer network consists of many computers connected to each other where they all work together to perform some function.  Each computer performs some part of the greater project, but there is no central computer that controls all the other computers.

[25] “Block Chain,” Bitcoin Developer Guide, bitcoin.org, last accessed June 8, 2018, https://bitcoin.org/en/developer-guide#block-chain

[26] Bitcoin Developer Guide, “Block Chain”

[27] “Block Chain Overview,” Bitcoin Developer Guide, bitcoin.org, last accessed June 8, 2018, https://bitcoin.org/en/developer-guide#block-chain-overview

[28] Bitcoin Developer Guide, “Block Chain”

[29] “Block,” Technical Glossary, bitcoin.org, last accessed June 8, 2018, https://bitcoin.org/en/glossary/block

[30] “Block Chain,” Bitcoin Developer Reference, bitcoin.org, last accessed June 8, https://bitcoin.org/en/developer-reference#block-chain

[31] “Transaction Data,” Bitcoin Developer Guide, bitcoin.org, last accessed June 8, https://bitcoin.org/en/developer-guide#transaction-data

[32] Bitcoin Developer Guide, “Transaction Data”

[33] The actual transaction data is far more complex and contains many layers of public key/private key encryption, where only the holder of the correct key (i.e. owner of the coin) can make subsequent changes to the coin data. It is this right/ability to make such changes that defines who is the owner of the coin.  “TXOUT,” Bitcoin Developer Reference, bitcoin.org, last accessed June 8,  https://bitcoin.org/en/developer-reference#txout  For a detailed explanation, see “Transactions,” Bitcoin Developer Guide, bitcoin.org, last accessed June 8, https://bitcoin.org/en/developer-guide#transactions

[34] “Protect Your Privacy,” bitcoin.org, last accessed June 8, 2018, https://bitcoin.org/en/protect-your-privacy

[35] Technically, the list says Person A has q, r, s bitcoins which add up to y coins.  If Person A later spends coin q, then the database will show Person A now only has r and s coins.  See, Bitcoin Developer Guide, “Block Chain Overview”; see also “What are the mechanics of verifying that an output transaction is not spent?” question on stackexchange.com, answered on January 15, 2018, https://bitcoin.stackexchange.com/questions/68598/what-are-the-mechanics-of-verifying-that-an-output-transaction-is-not-spent/68604#68604

[36] Bitcoin Developer Guide, “Block Chain Overview”

[37] In reality, you repeatedly encrypt the data of the transaction section to form a “merkle root of a merkle tree.”  However, that mathematics is too complex to go into for this article.  For details, see, Bitcoin Developer Guide, “Transaction Data”

[38] Bitcoin Developer Guide, “Block Chain Overview”

[39] Bitcoin Developer Guide, “Proof of Work”

[40] Bitcoin Developer Guide, “Proof of Work”

[41] Anyone can be a miner.  You just have to have a computer connected to the internet and download some open source programs available for free on the Internet and join the bitcoin network. “How Does Bitcoin Mining Work,” Frequently Asked Questions, bitcoin.org, last accessed June 8, 2018, https://bitcoin.org/en/faq#how-does-bitcoin-mining-work

[42] This is a race between all miners.  Only one block can be added to the blockchain at a time, so all the bitcoin miners work to look for the correct encryption. The first one who finds the correct encryption “wins” and is “awarded” the bitcoin. “Bitcoin: Mining Rewards,” Bitcoin Wiki, last accessed June 8, 2018, https://en.bitcoin.it/wiki/Bitcoin#Mining_rewards

[43] Frequently Asked Questions, bitcoin.org, “How does Bitcoin Mining Work”

[44] Bitcoin Wiki, “Bitcoin: Mining Rewards”

[45] “Transaction Fees and Change,” Bitcoin Developer Guide, bitcoin.org, last accessed June 8, 2018,  https://bitcoin.org/en/developer-guide#transaction-fees-and-change

[46] Bitcoin Developer Guide, “Transaction Fees and Change”