Skip to content

B is for Bitcoin (Chapter 3)

This is the 3rd installment of the serialisation of the book B is for Bitcoin by Daz Bea and Seb Bunney.  

Link to:  Chapter 1 \ Chapter 2

Buy the Book:  Independent / Amazon

 

Chapter 3 - Section 1: Miners

Key Questions Answered:

  • What is Proof of Work?
  • What are miners? 
  • Can we measure the computational effort of all Bitcoin miners?

Now that we have a deeper understanding of Bitcoin Mining from chapter two let’s look at the people, organizations and hardware that perform the act of bitcoin mining. But first, let's solidify some mining terminology and introduce the concept of Proof of Work.

What is Proof of Work?

Proof of Work (PoW) is the name given to the process by which miners secure the Bitcoin blockchain. As you will recall, miners expend energy hashing in an attempt to get their “Block Hash” below the target value. The first miner to do so can simply show that their “Block Hash” is below the target value, which is “Proof” that a certain amount of computational effort or “Work” has been completed. Why is this proof? There is no other possible way to get the “Block Hash” below the target value than expending energy through the random guessing game of hashing. Hence the term, Proof of Work.

“But why can we rely on work in the first place? The answer is threefold. We can rely on it because computation requires work, work requires time, and the work in question — guessing random numbers — can not be done efficiently.” - Gigi

What are miners?

These days, miners are computers that specialize in hashing. In the early days of Bitcoin, it was possible to mine bitcoin with a standard PC. However, as the price of bitcoin grew, so did the monetary incentives behind mining. As a result of this, and due to the increased processing power of newer machines, miners' computational output and efficiency increased, and the processing chips miners used became more and more specialized. 

In 2013, we saw the introduction of Application Specific Integrated Circuits (ASICs). These contraptions are explicitly designed for hashing bitcoin and significantly increase efficiency. At this moment, it became virtually impossible for the little guy to compete using an at-home computer.

Figure 3.11: A Bitcoin Miner31

Can we measure the computational effort of all Bitcoin miners?

The rate at which the network of miners collectively hashes is called the hash rate32. Bitcoin's hash rate is currently33 221.74 million TH/s (terrahashes per second), and this has been increasing steadily since its inception. With a terrahash being 1,000,000,000,000 hashes, that means all of the miners globally are currently hashing 221,740,000,000,000,000,000 times per second. As more miners compete to validate transactions, the network becomes ever more secure. Therefore, we can view the hash rate as a measure of security. The higher the hash rate, the more secure the Bitcoin network is and the less vulnerable it is to attack.

Fun fact: Many bitcoiners tend to check metrics such as Bitcoin hash rate and indicators of global adoption as far more accurate indicators of Bitcoin’s increasing value than its price on any given day.

So who runs these miners?

A wide variety of companies and individuals alike choose to partake in Bitcoin mining. Different types of mining include:

Home mining - When an individual chooses to run mining equipment within their home. Fun fact: These days, people are finding ways to use the heat from the miners to heat their homes, replacing traditional heating systems.

Mining pools - A conglomerate of individuals who proportionately split mining proceeds based on the hash rate they’ve contributed.

Hosted mining/Co-located mining - When individuals or companies choose to let a hosted mining facility host their mining hardware. The individual owns the machine but pays a fee to the mining facility. Why? Mining facilities typically have access to cheap energy.

Commercial mining - When smaller companies make use of unused office space, commercial units or data centers, converting them into mining operations.

Industrial mining - When large-scale mining operations use repurposed industrial facilities or purpose-built facilities. 

Figure 3.12: An Industrial Bitcoin Mining Operation34

Although a significant proportion of the overall hash rate is from large mining companies, it is still common for individuals to participate in mining pools and hosted mining. 

Is it profitable to mine bitcoin?

The answer to this question is, it depends. A lot of variables need to be considered when it comes to mining bitcoin, most of which fall outside the scope of this book. In saying that, under the right conditions and circumstances, mining can be very profitable since if it weren't, nobody would do it. However, the critical factor to consider is input energy costs. If you lack access to a cheap energy source, Bitcoin mining will most likely be uneconomical.

Fun fact: Bitcoin has many incentives built into it. One of these is the potential to make money mining bitcoin if you have access to cheap input energy. This has led to a quickly developing industry connecting bitcoin mining equipment to ‘stranded’ forms of energy (energy that has no other use). This is changing the economics of the energy industry and also encouraging the use of ‘green’ energy.

Why can’t we just add more computers and find all the bitcoin?

Initially, when more miners come online and the network's hash rate increases, blocks are solved more quickly than the target time of 10mins. However, as mentioned previously, for every 2016 blocks, the Bitcoin Protocol assesses the average time taken per block and adjusts the difficulty accordingly– if blocks were being mined faster than 10 minutes, the difficulty increases and vice versa.

In May 2021, the Chinese government banned Proof of Work mining due to its perceived impact on the energy grid. A mass exodus of Chinese-based miners ensued. Mining operations shut down almost overnight and fled China in search of mining-friendly jurisdictions. This sudden drop in active miners immediately caused a decline in the hash rate and increased time between each block. However, this increase in the block time only lasted two weeks. Just as it is programmed to do, after 2016 blocks, the protocol adjusted difficulty making it easier to mine Bitcoin and the block time returned to ~10mins.

Figure 3.13: Evolution of Network Hashrate35

This event was one of the greatest tests of the resiliency of the Bitcoin network. The hash rate of Bitcoin saw a 50%+ decline, yet the functionality of Bitcoin never skipped a beat! Over time, the lost hash rate returned, and the Bitcoin Protocol continued to adjust its difficulty every 2016 blocks to maintain that steady, predictable release rate. 

Section Summary

With the mining industry rapidly evolving and expanding, what works one day, may not work the next. Case in point, in Bitcoin's early years, anyone could mine bitcoin successfully on their home PC. Unfortunately, that is no longer the case. 

However, that is not to say we don't have options... 

For the Bitcoin enthusiast, this article has hopefully demonstrated not only the resilience of the miner network but the many ways to get involved in mining. We could purchase a miner, contribute to a mining pool, pay for hosted mining, etc. That said, whether your desired path to mining is profitable is another question.

Now, let’s look at one of the other integral parts of the network… the nodes.

For further readings, we highly recommend:

“Bitcoin Mining” - NYDIG






Chapter 3 - Section 2: Nodes, Developers & Consensus

Key Questions Answered:

  • What are nodes?
  • Who can run a node?
  • Do I need to run a node?
  • How are changes made to Bitcoin?

Nodes are one of the most important aspects of the Bitcoin network. They are really the most fundamental element of what makes Bitcoin so hard to break, co-opt, control or coerce. 

Let’s dive in.

What are nodes?

Nodes, in addition to the miners, are what make Bitcoin decentralized and maintain its integrity. 

What’s more, it is the role of the nodes to enforce and decide on the network rules. If you don't play by the rules, your tran saction may be denied, or as a miner, your block rejected. 

It is the nodes that keep the Bitcoin network honest. They're continuously checking in with one another to ensure their version of the blockchain matches that of the majority.

You may still be wondering, “I get what they do, but what is a node?”

Simply but, a node is a computer that runs the Bitcoin software. Running this software means the node downloads and maintains an up-to-date copy of both the entire Bitcoin blockchain and the rule set. 

There are many iterations of the Bitcoin Software, with Bitcoin Core36 being one of the more popular examples.

Who can run a node?

Absolutely anyone. As long as you have access to a basic computer, sufficient hard drive capacity and an internet connection, you can run a node. That means whether you have a standard PC, Laptop, Macbook, Windows or Linux Machine, running a node is easily accessible. 

Alternatively, you can build your own dedicated node using a hard drive, Raspberry Pi (a miniature credit card-sized computer) and an internet connection. This enables you to separate your node from your standard computer. 

Figures 3.21 and 3.22 are two examples of nodes. The first is a prebuilt, ready-to-go Raspberry Pi node (in a nice case) by a company called Umbrel and the second is a homemade node, also a Raspberry Pi, built by one of the great Bitcoin educators in the space, Arman the Parman.

Figure 3.21: An Umbrel Node37

Figure 3.22: Raspberry Pi Node38

 

And in figure 3.23 is a screenshot of the Umbrel node in action.

Figure 3.23: Umbrel Node Software

Why would you run a node?

There are a number of reasons people choose to run a node. Those include:

  1. Participate in the network: Running a node allows you to participate in the first true peer-to-peer, digitally native, cash-like payments system. It will enable you to vote on the changes you believe should be implemented.
  2. Decentralization: By running a node, you are contributing to the decentralization of the Bitcoin blockchain. The more people that run a node, the more distributed the Bitcoin ledger.
  3. Analyze: By running a node, you have access to every Bitcoin transaction that has ever taken place. If desired, this allows you to analyze the movement of bitcoin to and from wallets and the flow of capital into and out of the network.
  4. Management: Most node software offers tools which assist you in managing your keys, payments, transactions and UTXOs.
  5. Verification: Operating your own node allows you to monitor your own transactions, ensuring your bitcoin are indeed your bitcoin. This illustrates a central principle of Bitcoin: "Don't trust, verify."

 

Let's expand a little on a few of these thoughts.

Firstly, by running a node, you are contributing to the decentralization of the Bitcoin Blockchain. Every node connected to the network makes it that little bit harder for bad actors to impact the functionality of Bitcoin.

Why?

Bitcoin is not static. As a node, you have a say in what new rules and changes are implemented. This decision is made through consensus. If only a few nodes made up the Bitcoin network, someone could easily set up a handful of new nodes, obtaining majority voting power. This may allow them to implement undesirable changes to the Bitcoin code. 

On the flip side, having a decentralized distributed network with thousands of geographically dispersed nodes makes it practically impossible to create undesirable changes without consensus. 

In saying that, if the community cannot agree on a change, there is a mechanism known as a hard fork. This will separate the two opposing sides into separate assets, preserving the original values of Bitcoin prior to any undesirable changes. However, as we will soon explain in more depth, the community tries to avoid hard forks as they usually lead to fracturing within the community.

But more on this in a second.

Secondly, one of the major attractions of running a node is that you can personally verify all Bitcoin transactions, including your own. 

Typically, if you hold bitcoin on an exchange or in a third-party wallet (we explain these in the next section), you rely on that third-party's node to search the blockchain, find your addresses and tally up your account balances. Not only do you give up privacy regarding your account balances, but you also have to trust that the balance the third party displays is correct. By running a node, you can personally verify your transactions and account balance without giving up privacy.

Do I need to run a node? 

What makes Bitcoin so powerful is that the decision to run a node is up to the user. 

In saying that, running a node isn't for everyone. We understand that, depending on the approach, running a node can involve technical skills that fall outside some people's desire or capability. Even if you decide against running a node, you can still participate in the bitcoin network, buy bitcoin, custody bitcoin, interact with the blockchain and verify transactions. You just forfeit the ability to participate in consensus and give up privacy when verifying transactions.

You may still be wondering, what does participating in consensus mean?

As mentioned above, Bitcoin is not static. The core Bitcoin protocol has stayed true to its original intent. There has always been only 21 million bitcoin, a four-year halving cycle, a difficulty adjustment regulating the supply of bitcoin to the market, etc. However, as the technology surrounding privacy, security and cryptography is always advancing, Bitcoin needs a way to keep up, ensuring improvements are implemented and vulnerabilities to the protocol can be addressed. 

With this in mind, there is an active community of Bitcoin developers that are constantly working on improving the Bitcoin protocol.

How are changes to Bitcoin proposed and made?

The Bitcoin community uses something called the BIP system, which stands for the Bitcoin Improvement Proposal. There are generally four stages when it comes to changing the Bitcoin protocol:

  1. A BIP is put forth by a developer(s) or participants who feel a change or improvement to the Bitcoin code is warranted. Within a BIP, you’ll find the developer’s proposed update, justification and other relevant information (All previous and current BIPs can be found on GitHub39, a hosting site for shared software development). 
  2. After a BIP has been proposed and before it is put forward for implementation, it will be rigorously debated, and other developers will review, pick apart, interrogate and try to find faults in the code. This can take months, if not years, to go through.
  3. Once the majority of developers agree upon a BIP, we see another level of consensus called “signalling of support.” Miners signal their intention to support these changes by including messages of support within the blocks they mine (i.e. recently, there was an upgrade to improve the privacy and efficiency of the network called Taproot. For Taproot to be approved, 90% of miners had to signal their support)
  4. When the minimum predefined support signalling level is reached, the decision is passed over to the nodes. It is the nodes who decide whether to adopt the newly proposed changes or not. If they decide to adopt the changes, they simply run the newest version of the code. Alternatively, they stick with their current code version if they want to reject the changes.

 

But what if the nodes can’t come to a consensus?

As briefly discussed above, when the nodes don’t agree to changes, there are two potential paths forward, depending on the changes being proposed:

Soft Forks

Usually, upgrades to bitcoin are attempted through something known as a soft fork. This simply means that when a change is proposed, it is backwards compatible with older software versions. In other words, nodes that might not agree, or have yet to upgrade their software, are still compatible with the new version proposed. When a soft fork takes place, there is no interruption to the “tick-tock-next-block” functionality of Bitcoin. 

A soft fork is the desired path when proposing changes to the Bitcoin protocol due to its backwards compatibility with previous instances of the software.

Hard Forks

A hard fork, on the other hand, is a radical change to the protocol whereby the change is not backwards compatible. All nodes or users must upgrade to the latest version of the protocol software to continue using the protocol.

A hard fork ensues when there is a lack of consensus, as the nodes cannot agree on whether to implement a BIP. As a result, two blockchains are formed, one with the original protocol and one with the new protocol. The minority blockchain becomes a new asset.

With both blockchains operating as separate assets, it is up to the free market as to which blockchain reigns supreme. But more on that in a second… 

Due to the conflict and community fracturing during a hard fork, backwards-compatible soft forks are the preferred upgrade option.

However, sometimes a hard fork is the only option.

One of the more contentious hard forks was during an event known as the Block Size Wars.

Long story short, a handful of influential individuals, exchanges, developers and mining companies proposed a change to increase the number of transactions that can be processed per block. This would be achieved by increasing the size of a Bitcoin block. Hence, the name Blocksize Wars. Even though discussions were had, the community could not reach a consensus. A hard fork ensued, and we saw the emergence of Bitcoin Cash (BCH) alongside Bitcoin. 

In the end, Bitcoin, as we know it today, proved to be the superior asset, continuing its meteoric rise in market cap, price and network adoption, while Bitcoin Cash was slowly left behind.

What is interesting about hard forks is that if you were an owner of the token before the hard fork, post-hard fork, you would now own both tokens. In this instance, Bitcoin and BCH. If you do not align with the changes made by BCH, you could sell your BCH tokens and invest the proceeds back into Bitcoin, or vice versa. It is now up to the free market to decide which protocol is superior. 

You could liken a soft fork to adding a new word to a language. You may not understand this new word, but you still speak the same language. Therefore, not learning this new word (upgrading your software) doesn’t interrupt your ability to communicate with others who speak the same language.

A hard fork, on the other hand, is like creating a completely new language. If your node adopts this new language, it can no longer communicate with nodes running the original language.

Section Summary

We feel it is essential to understand the tradeoffs between running a node and relying on others, but ultimately, the decision on whether to run a node is up to you. That said, if you support Bitcoin as a savings or investment vehicle, one of the best things you can do as an individual is to run a node and further distribute the Bitcoin network.

This section was most likely a heavy one. However, we cannot stress the importance of the nodes enough. It is through the nodes and their consensus mechanism that we can update Bitcoin while simultaneously preventing centralized entities from wandering in and making changes to the protocol without consensus from the community– something we have lost in traditional banking. 

Without the many thousands of nodes, we wouldn’t have the resilient and secure network and asset that is Bitcoin. Instead, we would have something that was co-opted and centrally controlled a long time ago. 



Chapter 3 - Section 3: On-Chain & Off-Chain

Key Questions Answered:

  • Why is Bitcoin limited in the number of transactions it can process per second?
  • What do on-chain and off-chain mean?

 

On-chain and off-chain are terms that help describe some of the innovations in, around and on top of Bitcoin. We need to set the scene here to illustrate why these different chains are essential.

It may sound counter-intuitive, but the Bitcoin network is very deliberate in its slow and steady approach to development and scalability. The reason for this is to prioritize security and decentralization. 

In doing so, however, Bitcoin's usability and scalability have often been criticized. 

Generally, the critics fail to realize that innovative usability and scalability solutions are already available and in use, and more continue to emerge. 

Being that most of this innovation is off-chain, in order to preserve security and decentralization, there is often some confusion:

  • Why are there on-chain and off-chain transactions?
  • Why can't I locate my bitcoin transaction on-chain? 
  • Am I still sending bitcoin if I am transacting off-chain?

 

As we will see, these questions tend to stem from a misunderstanding of the various ways to transact using bitcoin. With that said, let's explore the idea behind "Block Space," as this will lay the groundwork for understanding on-chain and off-chain transactions.

Block Space

Each block on the Bitcoin base chain has a maximum size (around one megabyte in size). However, with each block being limited in size, there is an upper limit to how many transactions Bitcoin can process per second on the base layer. At this time, that limit sits around seven transactions per second (tps). 

You may be wondering, “how can Bitcoin possibly compete with networks such as Visa or Mastercard that transact at 1,700 tps?”40

The answer is simple. It is not competing with them.

Comparing Bitcoin to Visa or Mastercard is like comparing an international container ship to a checkout at a local hardware store.

The container ship is intended for infrequent bulk transactions, whereas a checkout is built around high-frequency, small transactions. Although both move goods, comparing them is like comparing apples to oranges. 

With this in mind, Bitcoin offers trustless, permissionless transactions with final settlement, while Visa and Mastercard provide convenience and ease of use. However, that is not to say Bitcoin doesn’t offer these things too. It just doesn’t try to achieve them on the base chain or base layer as it's commonly known.

Let’s explore what this means…

Layers

When inspecting any monetary system, there are often different methods, or layers, of transacting, with each method offering various benefits to the user. 

The layers of transacting in our current monetary system include:

Layer One

This layer often involves high-value transactions with low throughput, meaning it is limited in how many transactions can be processed per second. 

Examples of layer one transactions in our traditional monetary system include bank wire transfers and Fed Wire interbank transfers. Both are used for high-value transactions; however, they tend to be slow and costly, with wire transfer fees anywhere from $10 to $50 and processing times often taking many days.

Although layer one transactions can be incredibly secure and reliable, layer one methods of transacting fall short in their ability to meet the needs of consumers looking to transact in smaller denominations or for timely, cost-effective transactions. 

Layer Two

This layer often involves low-value transactions with high throughput, meaning many transactions can be processed per second. It also features high-speed transactions, taking only a few seconds, as well as offering lower fees, generally around 1-3% of the transaction value. 

Examples of layer two transactions in our traditional monetary system include credit and debit card payments and gift card transactions, to name a couple. 

 

Where does Bitcoin fit into layer one and layer two transactions? 

Bitcoin can be thought of as a great alternative to layer one. Although it may not be able to match the speed of a layer two Visa payment, Bitcoin can be used to transfer upwards of $1,000,000,00041 at a fraction of the speed and cost of traditional layer one methods. In addition, and more importantly, it does so in a permissionless and trustless manner, without the need for intermediaries.

However, that is not to say Bitcoin cannot compete with layer two transaction methods. 

Just like our traditional monetary system has layer one and two transactions, so does Bitcoin. 

If you're looking for a reasonably quick (but not instant), cost-effective and secure way of sending a large amount of money, then Bitcoin is your best bet. Whereas, if you're looking to transact near-instantaneously and for fractions of a cent, then you will want to direct your attention to some of the technologies built on top of Bitcoin. These can be thought of as layer two methods of transacting and include innovations such as Lightning.

On-chain & Off-chain

Any Bitcoin transaction processed over the base layer/layer one is classified as an on-chain transaction. This means you can locate the transaction and confirm whether and when it was processed in the Bitcoin block explorer (history of all transactions). 

If, however, we transact using a layer two solution, although we are still sending and receiving bitcoin, it is no longer classified as "on-chain." If we attempt to search for our transaction in the block explorer, our transaction would be nowhere to be found. We would therefore say that the transaction is "off-chain."

 

Why would you transact off-chain?

As mentioned above, transacting off-chain or using layer two solutions often significantly reduces the transaction fees and greatly increases the speed of the transaction, albeit with reduced security. 

Let's look at a hypothetical example… 

Dan and Josh work, adventure, hang out together and are both passionate Bitcoiners. During a typical week, Dan may pay for gas while Josh will grab food and coffee. With this in mind, there are two approaches they could take to settle up with one another:

  1. They could settle up after each transaction. Let's assume for this example that the fee for transacting on-chain is $1 and that Dan and Josh share three transactions per week. That means that after a month of settling up after each transaction, Dan and Josh will have spent $12 on transaction fees (4 weeks x 3 transactions per week). 
  2. Alternatively, they could keep a tab on how much each has spent and settle up at the end of the month. By keeping a tab, Dan and Josh know how much was spent and by whom, but more importantly, they don't have to incur the transaction fee after each transaction. Instead, they settle once at the end of the month for a total of $1 in fees.

 

In both situations, Dan and Josh are made whole. However, in the second situation, Dan and Josh save $11 in fees by using an ongoing tab to track each other's balance rather than settling up after each transaction. Additionally, they maintained greater privacy in their spending since their transactions were not recorded on-chain.

Although the technology may vary between different off-chain transaction methods, the idea is the same. Rather than transacting on-chain for each transaction, there is an off-chain ledger of record which records who owns what. And when a user wants to head back to the main chain, the balance is settled through a final on-chain transaction.  This makes off-chain transacting not only faster but significantly cheaper. 

*Side Note: Lightning is currently the most popular of the layer two solutions. So much so that when El Salvador declared Bitcoin to be legal tender, they chose the Lightning Network for the day-to-day transactions of the populous.

Unsure whether to use on-chain or off-chain? Here is a handful of scenarios and the ideal method of transacting, assuming the transacting party accepts bitcoin: 

  • Buying a coffee - Off-chain (Layer 2) 
  • Transferring upwards of a few thousand dollars - On-chain (Layer 1)
  • Ensuring a non-immediate payment gets to its destination with final settlement - On-chain
  • Paying for dinner at a restaurant - Off-chain 
  • Purchasing a car - On-chain
  • Purchasing something from an online marketplace - Off-chain 
  • A payment is significant enough to warrant spending the Bitcoin transaction fee of $0.70 to $2 - On-chain
  • Sending $100 back home to your family - Off-chain 
  • Transferring your savings to cold storage - On-chain

 

To conclude, people often incorrectly compare Bitcoin to Visa, failing to realize that off-chain technologies such as lightning exist which have drastically increased Bitcoin's scalability.

As should now be evident, comparing Bitcoin to Visa is like comparing a Ferrari to a bus. They both serve different purposes.

Next time you hear someone criticize Bitcoin's speed, you’re now ready to explain the misunderstanding.

For further readings, we highly recommend:

Layered Money” - Nik Bhatia

Visa and Lightning, how do they compare?” - Nicolas Burtley




Chapter 3 - Section 4: The Mempool

Key Questions Answered:

  • What is the Mempool?

Throughout this book, we have mentioned the mempool on multiple occasions. For many, this may have gone in one ear and out the other, but for the curious ones, we wanted to give a little more information on what this mempool is and what you can do with it.

Let’s dive in…

The memory pool, mempool for short, is the limbo state where unconfirmed transactions sit after they have been initiated but before they have been confirmed and added to the blockchain. 

We can view the mempool block explorer in action at www.mempool.space or at https://bits.monospace.live/ 

 

Figure 3.41: The Mempool

 

At first glance, the mempool can be a little confusing and so here is a breakdown:

(1.) Unconfirmed Transactions 

All the transactions to the left of the white dotted line are unconfirmed. 

What does this mean? If you were waiting to receive 0.001 BTC from a friend, your wallet would most likely pick up the transaction the moment it is initiated. However, until the transaction is processed and confirmed, it will sit in the mempool as an unconfirmed transaction. As a result, you will not have access to these funds until it is confirmed. 

(2.) Confirmed Transactions

All the blocks and their transactions to the right of the white dotted line are confirmed.

These transactions are essentially irreversible. However, for cautionary reasons, most exchanges will wait for six blocks before allowing users to access their funds. 

Why do they wait for six blocks? If you recall, from “Blockchain, Hashing & Mining,” miners build off the longest chain. That means in the rare occurrence that two blocks are mined at once, there can be confusion as to which chain is the longest. In this scenario, there is a chain split. Some miners build on one chain while the remainder is on the other. This split will continue until one chain is clearly longer than the other. At that point, the miners on the shorter chain abandon their blocks, and their processed transactions from the split onwards are added back into the mempool (these discarded blocks are known as orphan blocks). This reverses the status of these transactions from confirmed to unconfirmed. 

For this reason, we say Bitcoin is essentially irreversible, as, in certain scenarios, there is a slim possibility for newly confirmed transactions to be reversed shortly after they are confirmed. 

(3.) The Block Height

The block height of a particular block indicates the number of blocks preceding that block in the blockchain. Another way to think of it is the number of blocks since Bitcoin’s inception. For instance, a block height of 735,799 would mean it is the 735,799th block since Bitcoin began.

(4.) Transaction Count

As we are sure you’ve guessed, the transaction count is the total number of transactions inside a specific block. For instance, in block 735,798, there were 2,981 transactions.

(5.) Block Size

As there is a variance in the size of Bitcoin transactions (depending on the complexity of the transaction), and transaction volume, not every block is identical in size. 

Although each block “technically” has an upper bound of 1mb in size, if one block contains more complex transactions or is confirmed during a period of increased transaction volume, it’ll most likely be larger than a block processed during a period of lesser use.

We say “technically,” a block has an upper bound. However, due to an upgrade called SegWit, the concept of block size was replaced with block weight, so, in practice, blocks can be slightly larger than 1MB, as shown above with block 735,798.

Moreover, mempool.space goes one step further and colours the blocks. This indicates how full a block is, i.e. block 735,797 is 521.53 kB in size and only partially coloured. This tells us that there was still significant space in that block for more transactions.

(6.) Average Transaction Fee

With the fees for bitcoin transactions varying, each block indicates the average fee paid by all the transactions within the block. For example, in block 735,799, we see ~16 sats/vB. This tells us it costs 16 satoshis (0.00000016 bitcoin) per virtual byte. If a transaction were 200 virtual bytes in size, it would cost 200 x 16 = 3,200 satoshis or roughly $1 at today's prices.

(7.) Transaction Time

Transaction time shows us either when the block was processed if the block is to the right of the white dotted line or an estimation of when the block will be processed when the block is to the left of the dotted line. 

A transaction time of 44 minutes in block 735,797 simply tells us that it has been 44 minutes since the block was processed. Remember, blocks are released every 10 minutes on average, sometimes they are slower, and sometimes they are quicker. 

And that is the mempool…

Section Summary

If you’re curious to look under the hood of the Bitcoin blockchain, then the mempool is the best place to start. Regardless of whether you own Bitcoin or not, the mempool is where anyone can see the blocks and transactions being processed in real time. 

What’s more, if you really want to get your hands dirty, you can dive into each of these blocks and start following the trail of bitcoin from one account to another. Although, that's for another book.

Hopefully, this intimidating website with colours, numbers and far too much information now makes a little more sense.

In the next couple of sections, it is time to explore the available options for purchasing and securely storing Bitcoin.






Chapter 3 - Section 5: Acquiring bitcoin

Key Questions Answered:

  • What are the three primary ways to acquire bitcoin?

Now that we have dug into the mysterious founder, Satoshi and explored the ins and outs of the Bitcoin network and examined the various players involved. It is time to move on from the theory and into the practical applications of Bitcoin.

To start, let’s answer arguably the most important question:

How do I acquire bitcoin?

Unlike many other assets, one can acquire bitcoin in several different ways. These include:

  • Purchasing it
  • Working for it
  • Receiving it as a gift
  • Mining it
  • Winning it (by playing games for sats or getting a sats-back rewards card)

However, for the sake of brevity, we are going to focus on the three primary ways individuals purchase bitcoin:

  • Centralized Exchanges
  • Decentralized Exchanges & Peer-to-Peer exchanges.
  • Bitcoin ATMs

Let’s dive in…

Centralized Exchanges

Your standard online exchange is a centralized market operator that makes it easy for people to buy and sell bitcoin. This removes the problem of locating a counterparty to buy from or sell to. Instead, you simply set up an account and interact directly with the exchange through their mobile or desktop software/website.

Most countries and jurisdictions have both bitcoin-specific and crypto exchanges that offer bitcoin. 

Exchanges are, by and large, the most common way to purchase bitcoin. Once you create an account, submit the required personal details and jump through the required hoops, you'll be able to deposit fiat currency into the exchange. After the exchange has received your deposit and updated your account balance, you'll be given a myriad of options for purchasing and selling bitcoin.

These options usually include but are not limited to:

  • Market Order - The ability to buy/sell bitcoin at the current market price.
  • Automatic Recurring Buys - The ability to pre-set a purchase interval for which to buy bitcoin, i.e. $10 every week on Tuesdays. Also known as dollar cost averaging (DCA).
  • Traditional Order Types - Order types, such as limit orders, stop orders, good-till-date, good-till-cancelled etc., give you much greater control. For instance, with a limit order, you can predefine a price at which you feel comfortable buying bitcoin. The moment this price is hit, the purchase order is automatically triggered.

If you have previously had the privilege of investing in the stock markets, you should be familiar with these concepts, as you would go through a similar process to buy a share in a company.

Any entity operating as an investment and financial services company (facilitating the exchange of bitcoin) must follow certain rules. With centralized exchanges falling under this category, they must follow KYC (Know-Your-Customer) and AML (Anti-Money-Laundering) regulations. In addition, regulated exchanges must comply by providing the governments, tax agencies or regulatory bodies with your personal details and the information surrounding your bitcoin purchases.

Decentralized Exchanges & Peer-to-Peer exchanges

A decentralized exchange connects two parties, a buyer and seller, looking to exchange bitcoin.  They remove the challenge of independently locating a local counterparty with which to transact.

One way to think about peer-to-peer exchanges is simply a Craiglist of sorts for Bitcoin. A place to find people looking to buy and sell bitcoin.

Once two counterparties connect with one another and coordinate the specifics of the transaction, these exchanges serve as intermediaries through the use of smart contracts. The buyer and seller send their money or bitcoin to a specified holding account (An escrow account). The exchange then releases the funds once both parties have met the terms of the trade.

Decentralized exchanges, being relatively new, are in somewhat of a grey zone regarding regulation. Therefore, some comply with KYC and AML practices, while others may not.

Why use a peer-to-peer exchange? As there is no intermediary, peer-to-peer exchanges often allow users to bypass the KYC/AML regulations. If you are privacy-focused or prefer to interact with individuals rather than exchanges, p2p exchanges are a great option.

We highly recommend you become familiar with the rules and regulations in your jurisdiction and transact with bitcoin before exploring decentralized and p2p exchanges, as they are not without risk.

Bitcoin ATMs

Similar to a traditional ATM, the only difference is that you input cash, a debit or credit card, select the amount you wish to purchase, and the machine gives you bitcoin in return. 

Some ATMs will provide a paper receipt with a public and private key. Others allow you to send the bitcoin directly to a wallet via a QR code.

While most Bitcoin ATMs only allow users to purchase bitcoin, some more sophisticated ones let users both buy and sell it safely and securely.

Bitcoin ATMs can be found in many locations around the globe, but in many countries, they are still hard to come by. There tend to be higher concentrations in cities and areas that are Bitcoin-friendly.

Since centralized businesses usually own these Bitcoin ATMs, most of the time, they must follow the KYC and AML practices mentioned above. In saying that, if you’re lucky, you may stumble across some of the earlier ATMs that allow you to purchase Bitcoin without entering personal details—a sought-after commodity in the Bitcoin world.

…and those are the three primary ways to purchase bitcoin.

Conclusion

Like running a node, the decision on where to purchase bitcoin is up to you, your needs and what is available in your jurisdiction. 

However, as should be evident, every purchasing method has drawbacks. For this reason, we hope this section has laid out the advantages and disadvantages of each method so you can make a more informed decision, minimize any potential for loss, and reduce any unnecessary headaches. 

Now that we understand the various ways to purchase bitcoin, let's move on and look at how we can safely and securely store our bitcoin.


Chapter 3 - Section 6: Custody

Key Questions Answered:

  • What is a digital wallet?
  • What is a custodian?
  • What is self-custody?
  • How do I back up my seed phrase?
  • What are the primary solutions for self-custody?
  • What are hybrid custody solutions?

Side Note: The goal here is not to be an all-encompassing breakdown of existing offerings on the market but rather an attempt to offer a high-level overview of the various forms of custody, alongside their advantages and disadvantages. 

Throughout your time exploring the Bitcoin community, you have probably heard the term “custody” or the often-used saying, “Not your keys, not your coins.” This section is about understanding what it means to take custody of your bitcoin, and more importantly, what options are available and the trade-offs between them.

To start, let’s define some terms:

Custody

The word custody quite literally means “the protective care or guardianship of someone or something.” In the world of bitcoin, when we talk about custody, we are referring to how we take possession of our bitcoin. 

“Shall I use a custodian to look after my bitcoin?”

“Shall I take ownership myself?”

“Or would it be best for me to use some form of a hybrid solution?”

These are all questions surrounding custody.

 

Wallet

Although a digital wallet, in practice, is similar to a traditional wallet like the one in your pocket, in actuality, they are quite different. A physical wallet stores coins and notes/bills, while a digital “wallet” does not store bitcoin. Instead, it holds the private key that gives access to your bitcoin. 

A physical wallet can quickly become quite cumbersome once you have a handful of coins and a dozen notes/bills. On the other hand, a digital wallet storing one satoshi will be no different in size from one holding 21 million satoshis.

Like most technologies, there is usually a myriad of solutions, all with various benefits and trade-offs. It is, therefore, important to understand these trade-offs to make a more informed decision on which solution best meets your goals. 

When examining any custody solution, we must evaluate how it performs in each of these five categories: 

  • Security - How safe, secure, and up-to-date with industry-standard security practices is this custody solution?
  • Convenience - How easy is it to access your bitcoin?
  • Ease of use - How easy is the custody solution to operate?
  • Privacy - How privacy-focused is this custody solution?
  • Risks - What are the primary risks surrounding this custody solution?

 

*Important Note: Before purchasing bitcoin, we highly recommend researching which custody solution works best for you and your specific situation.

 

In general, there are three types of custody solutions:

  • Custodians (Someone else controls your private key) - These solutions require putting trust in a third party. This third party then becomes the bearer of your private key (bitcoin).
  • Self-Custody (You control your private key) - These solutions put the owner of any bitcoin in charge of looking after their own bitcoin. You are responsible for safeguarding access to your private key because it is not stored anywhere else.
  • Hybrid Solutions (You control some or all of your private key(s)) - These solutions use a mixture of custodians and self-custody to store bitcoin. 

 

Let’s explore each of these solutions in more depth:

Custodians - Someone else controls your private key

How do you know whether your wallet is custodial or self-custodial? 

When setting up a new wallet, if it asks you to write down a 12 - 24 word seed phrase. Or, when you go to the app security settings, you have access to your seed phrase or private key, then you are taking self-custody of your bitcoin. 

If you cannot locate your seed phrase or private key, you are most likely using a custodial wallet.

Exchange Wallets & Centralized Apps

For most people, you will more than likely have purchased your bitcoin through an exchange. Therefore, a custodian is likely the first wallet you'll ever interact with, and the wallet type most people will be familiar with, whether they are aware of it or not. 

When you first purchase bitcoin through an exchange, the exchange/app creates a bitcoin wallet for you. Although you pulled the trigger on buying the bitcoin, while your bitcoin is left on the exchange, they are the custodian. 

The problem with this is that, in essence, you do not hold your bitcoin. You have an IOU for your bitcoin. This is where the term “Not your keys, not your coins.” comes from. If you do not hold the private key/seed phrase to your bitcoin, say goodbye to your bitcoin if the exchange becomes insolvent.

How does the exchange store its customer's bitcoin? More often than not, they manage their customer's account balances through a backend central ledger which indicates who owns what. This is similar to the ledger of a bank.

When you buy bitcoin on an exchange or centralized app, it is most likely an off-chain transaction. Although the user experience gives you the impression that you have your own unique bitcoin wallet, in reality, the exchange has a few master wallets containing all of its customers' funds, and your account balance is simply what is indicated on the backend ledger. 

This benefits the exchange and the users in two ways:

  1. Reduces transaction fees
  2. Removes the hassle of managing the private keys of every one of their customers

 

These master wallets can be seen when you send bitcoin to your exchange wallet and locate the transaction on mempool.space. You'll notice that the bitcoin is usually sent to a large exchange wallet, often containing a lot more bitcoin than would be in your account. 

Moving on, let's look at the five categories listed above:

 

Security 

With an exchange, you are at the mercy of the exchange's security practices, as well as your own security measures, i.e. the safe keeping of your login information. 

Questions to explore when it comes to exchanges:

  • Is the exchange a well-known and trusted exchange? 
  • Do they follow standard industry security practices and provide details on managing their private keys/funds? 
  • Has the exchange been previously hacked? 
  • Do they have 1:1 bitcoin holdings to claims? In other words, they do not rehypothecate (create more bitcoin than they have in reserves)

 

Ease of Use

An exchange wallet is often considered easier to use than other custody solutions because you don't have to manage your private key. To access your bitcoin, you just need your login details and any Two-Factor-Authentication information (which we HIGHLY recommend you enable).

 

Convenience 

Most exchanges offer both desktop and mobile applications. This means your bitcoin is often at your fingertips when you need it. 

 

Privacy 

Exchanges can see your personal information, transactions and balances held within your account. These details can, therefore, be forwarded to government agencies upon their request/demand. Why? As mentioned previously, exchanges must follow KYC (Know-Your-Customer) and AML (Anti-Money-Laundering) regulations. 

 

Risks

The significant risks associated with exchanges usually include forgotten passwords, exchange hacks, exchange private key mismanagement, loss of privacy, malware/phishing attacks etc.

In 2022 alone, we saw three major exchanges declare bankruptcy, FTX, Celsius and Voyager. In all three situations, many customers lost their life savings through no fault of their own other than putting faith in the exchange. This, therefore, brings us to self-custody solutions.

Self-Custody - You control your private key

RECOMMENDED!

As mentioned above, self-custody signifies you are the one in possession of your bitcoin because you control the private key. You, therefore, take on the responsibility of safeguarding your private key because it is not stored anywhere else. 

This is what it means when you hear, "Bitcoin allows you to be your own bank." Through self-custody, you are the only one who can access your bitcoin. Although this is the logical next step after using a custodian and removing any third-party risk, that doesn't mean there aren’t risks involved with self-custody. 

When it comes to self-custody, securely storing your private key is of the utmost importance. If someone gains access to your private key, they have control of your bitcoin. That said, before diving into the self-custody solutions, let's first go over the very important step of how to back up your seed phrase.

Seed-phrase Backups.

Backing up your seed phrase is a vital step in the journey of taking self-custody of your bitcoin. Learning effective seed-phrase backup practices is imperative to eliminate single points of failure.

When you set up a self-custody wallet, you are given your 12 or 24-word seed phrase. Write down your seed phrase on a piece of paper (usually provided). Once you have confirmed that you've correctly recorded your seed phrase, you can proceed to send funds to the wallet. 

However, your work is not done…

You need to secure that backup properly

There are several ways you can do this42. For instance, etching your seed phrase into steel will give your wealth an extra layer of protection from fire and flood. A quick google search will assist you in finding a solution that works best for you.  

 

Figure 3.51: Metal Seed Plate Made By CoinKite43

 

And finally, once you have securely backed up your seed phrase, it is vitally important that it is kept secure or hidden, such as in a safe or locked filing cabinet.

Why is seed phrase backup and storage so important? 

Quite simply, with great power comes great responsibility. Taking part in a decentralized financial ecosystem with no intermediaries comes with one major shortfall. There is no "undo" button when it comes to transactions, and there is no help desk to call when you can't find your seed phrase.

If your hardware wallet is damaged, lost or stolen, and you forgot to backup your seed phrase, your assets are gone. 

*Side note: It is important to physically record this phrase. Never make a digital copy of your seed phrase, i.e. phone notes, online, or through a screenshot/picture. If you do and someone hacks your digital device, they will have access to your bitcoin. 

 

Back to self-custody… 

Primary Solutions for Self-Custody

Let's take a look at the three primary solutions for self-custody:

  • Cold Wallet - Often referred to as "cold storage," cold wallets are a way of storing bitcoin in an offline hardware device. By storing your bitcoin in an offline device, such as a Cold Card, Ledger or Trezor, investors reduce the risk of hackers accessing their holdings through conventional channels, such as exchanges that are at times vulnerable to attack.  
  • Hot Wallets - The "hot" part of the term "hot wallet" refers to the fact that these wallets are on a desktop or mobile connected to the internet. Because they are connected to the internet, they have a greater risk of being hacked over a cold wallet. Therefore, while a hot wallet is often superior to a cold wallet in terms of ease of use and convenience, it is not deemed the most secure option for taking custody of your bitcoin.
  • Brain Wallets - With a brain wallet, another form of cold storage, you store your bitcoin by memorizing your private key as a seed phrase. We do not advise this method because of the ease of forgetting your seed phrase and thereby losing your bitcoin. A brain wallet should be your last-ditch option for storing your bitcoin in emergencies, i.e. fleeing a war-torn country.

Figure 3.52: Examples of Various Hardware Wallets44

Let's now look at how self-custody performs in the five categories listed above:

Security 

You are no longer at the mercy of the exchange's security practices with self-custody. However, you take full responsibility for storing your private key/seed phrase. This poses its own issues, but generally, as long as you take good care of your seed phrase and store it securely, you remove any third-party risks, such as those experienced through an exchange. In saying that, hot wallets generally have greater exposure to hacks and security threats due to being located on a mobile device or desktop computer.

 

Ease of Use

Technology is rapidly improving, with the user experience of many self-custody solutions today indistinguishable from their centralized exchange counterpart. However, in terms of ease of use, hot wallets on your phone or desktop tend to be easier to use than their cold storage siblings. However, there is an increased security risk in return for this ease of use.

 

Convenience 

Similar to ease of use, hot wallets allow users to quickly and easily transfer funds and perform daily transactions, albeit with slightly reduced security over their cold wallet sibling. Cold wallets, on the other hand, although relatively easy to use, are usually more time-consuming, given that you have to locate your hardware device to sign and validate the transaction.  

Depending on the cold storage hardware wallet, some manufacturers will provide proprietary software to manage your bitcoin. Others allow you to use their software or a software wallet of your choice.

 

Privacy 

Self-custody solutions are, by and large, the best way to ensure privacy when transacting. Because of their "be your own bank" nature, they are permissionless. You are not passing over personal information to a third-party or requesting access from someone else to move your bitcoin. 

 

Risks

The major risks associated with self-custody solutions revolve around forgetting or losing your private key/seed phrase or malware/phishing attacks.

Hybrid & Alternative Solutions - You control some or all of your private key(s)

These solutions usually require a mix of self-custodial and custodial solutions.

Let's explore the most common alternate solution, multi-signature wallets.  

 

Multi-signature a.k.a Multi-sig

One of the primary issues with the self-custody solutions listed above is that you have a single point of failure. If someone locates your seed phrase, they have access to your funds. One way to eliminate this is to use what is known as a multi-signature wallet. 

A multi-sig wallet secures your bitcoin behind multiple private keys, whereby a pre-set combination of these keys gains you access to your bitcoin, i.e. two-of-three, three-of-five, five-of-eight etc. These different variations symbolize how many keys out of the total amount of keys are needed to sign the transaction. For instance, in a three-of-five setup, any three out of the five keys can be used to sign a transaction. 

What makes multi-signature wallets so secure is that there are endless possibilities for storing these private keys, e.g., you could geographically disburse each key so that no one location houses all the necessary private keys to access your funds. Alternatively, you could share each key with a friend or family member so that to them, each key is worthless, but combined, you still have access to your funds. Or, for inheritance planning, you could leave one of the keys with a lawyer.

Why take all the trouble to disperse your keys? Let's say you have a two of three multi-signature setup, and someone locates one of your private keys, or in the example above, your trusted friend or family member turns on you. Even though they have access to one of your private keys, there is no way for them to access your bitcoin unless they manage to obtain the pre-set amount of private keys, i.e. two out of three, three out of five etc. A much harder task.

Why are multi-sig wallets sometimes classified as a hybrid solution? How you store your keys will dictate whether your multi-sig wallet falls under hybrid or self-custody. If you control all your private keys, this would be classified as a self-custody solution. 

However, if you store one or more of your private keys with custodians, although there is no single point of failure, you're inviting a third party into your custody solution. It would, therefore, be considered a hybrid solution.

As there are many variations to multi-signature and hybrid wallets, all with varying advantages and disadvantages, we won't explore the security, ease of use, convenience, privacy and risks we have with the other options.

However, we will say that if you are looking to store your bitcoin long-term and want to minimize single points of failure, a geographically dispersed multi-sig approach is one of the safest options. That said, with current technology, setting up a multi-sig solution requires an understanding of best practices and technical knowledge, so it is best to seek guidance during your initial setup.

Section Summary 

Tying up chapter three, it can be easy at first to see bitcoin as this thing that you buy and sell. However, as we have explored, there is so much more to it than this. 

Whether you're interested in mining bitcoin, getting involved in consensus, monitoring blockchain activity, taking self-custody, or experimenting with both on-chain and off-chain transactions, Bitcoin caters to everybody.

That said, no matter where your interests lie, we all have to decide how to custody our Bitcoin. You may, therefore, be wondering, "what custody solution is best for me?"

Unfortunately, as this article has shown, there is no single answer to this question. 

How you take custody is unique to you, your technical know-how and the amount being custodied. 

We highly recommend people to self-custody, but we also recognize that for some, self-custody is not a viable option. With this in mind, here are some general guidelines:

  • Exchanges are great for purchasing bitcoin, hot wallets are great for everyday transactions, and cold or multi-sig wallets are ideal for storing your long-term bitcoin savings. 
  • Consider a hot wallet the same way you consider your physical wallet, and only keep as much bitcoin in it as you would in your regular wallet. 
  • You can think of your cold wallet or multi-sig setup as your savings account– money that doesn't require frequent access, and its long-term safety and security are the priority. 

 

If you're exploring what self-custody solutions may be best for you, we highly recommend checking out Ben from BTCsessions45 on YouTube.

In the final chapter, we will go through a fictional example of the lifecycle of a bitcoin and then conclude with our final remarks. 

See you in the last chapter.