Written by Grant Ralph

Decentralized recording of data

The Bitcoin system produces a sequentially ordered digital ledger of every bitcoin transaction that has ever occurred between Bitcoin addresses. From the ordered ledger we get a record of which Bitcoin address owns which bitcoin (or fraction of a bitcoin). These addresses are created and controlled by individuals or institutions           

A representation of the sequentially ordered digital ledger of bitcoin transactions between Bitcoin addresses. Each block of new transactions updates the list of unspent outputs (user balances).

Unlike the current financial system which is administered and controlled by central and retail banks, the Bitcoin system doesn’t provide any specific institutions or people with exclusive rights to update and maintain the ledger.

Rather, Bitcoin has a way for anyone anywhere in the world to update the ledger and maintain its validity without ever needing the permission to do so. Information is recorded and preserved in the ledger in a decentralized and permission-less manner.

This Part 2 describes the decentralized and permission-less way in which changes in ownership of bitcoin are recorded in the ledger. Part 3 will then build on these ideas in order to provide answers to the questions that the ‘math and software’ or ‘Blockchain’ explanation can’t answer.

Step 1: Users transact

 Bitcoin users generate transactions when they spend, send or transmit bitcoin. Transactions are initiated in the system by smart phone applications or computer software when they communicate the details of the transaction (i.e. the spender, the receiver, the amount etc.) to peers (other people running the Bitcoin software) in the system. Most of the time this communication is done over the internet (but it can also be done over radio transmissions).

The transaction must be recorded in the Bitcoin ledger

In order for ownership of the specific bitcoin to transfer from one Bitcoin address to another (i.e. from one person or organisation to another), the transaction must be recorded in the Bitcoin ledger. Much like any other form of money, a change in ownership must be recorded in the ‘master ledger’ so that the correct person has the right to spend the bitcoin in the future and the person’s property rights can be recognised and enforced.

Central and retail banks control and administer the ledger of who owns what fiat money (the money that we use today, which has been made legal tender by government decree). In the case of Bitcoin, anyone can update and maintain a copy of the ledger and there are many copies of the ledger stored on computers around the world. Running the Bitcoin software and storing and updating a copy of the Bitcoin ledger is referred to as ‘running a Bitcoin full node’.

The map shows the concentration of reachable Bitcoin nodes found in countries around the world. It is important to note that 10854 is the number of ‘listening’ Bitcoin nodes. Due to the fact that these nodes are open to connection, they are more visible. The number of full nodes around the world that are storing and updating a copy of the Bitcoin ledger is closer to 100 000. Source: https://bitnodes.earn.com

Full nodes enforce the same set of rules for how their copy of the Bitcoin ledger can be updated with new transactions. These rules are referred to as the ‘consensus rules.’ By enforcing the same set of rules, full nodes stay in sync with one another and maintain consensus as to the state of the ledger, and therefore who owns which bitcoin.

Full node operators are economically incentivized to ensure Bitcoin works

Full nodes are operated and controlled by people who store wealth in bitcoin and/or transact using bitcoin (the Bitcoin ledger’s native currency). Due to the fact that these people or organisations use bitcoin, they are economically incentivized to ensure that bitcoin continues to be good money. This is because only if bitcoin stays good money will it be valued by other members of society, and therefore be able to function as a store of value. The following examples demonstrate this economic incentive.

If there were to be a departure from the system’s predetermined issuance schedule (the set times at which set amounts of new bitcoin enter circulation), then people could legitimately question bitcoin’s ability to be scarce (which is an attribute of a store of value and good money) and people would probably, therefore, be less likely to store wealth in bitcoin.

Alternatively, if people were allowed to double spend bitcoin (use the same coins to make multiple payments which would leave a supplier of goods or services out of pocket) then people would also question bitcoin’s ability to perform the functions of a money and they would therefore store less wealth in bitcoin.

If, as a result of bitcoin being bad money, less wealth is stored in bitcoin, bitcoin’s price (purchasing power) would decrease and bitcoin investors (people storing wealth in bitcoin) would be less wealthy. Of course, full node operators (who store wealth in bitcoin) do not want this to happen. In addition, there are also millions of people around the world who own bitcoin without running a full node. These people also don’t want bitcoin to be bad money and even though they don’t run a full node, their expressed preferences and economic significance influences full node operators to enforce the consensus rules.

Full node operators are therefore economically incentivized to see to it that Bitcoin works so that the system’s native currency, bitcoin, continues to be valuable and stores value. In particular, full nodes see to it that only valid (as opposed to fraudulent) transactions are cleared and settled and that bitcoin continues to have the important monetary attributes of durability, portability, fungibility, verifiability, divisibility, scarcity, a growing established history and the ability to resist censorship.

On the other side of the coin, as much as full nodes are economically incentivized to ensure that nothing goes wrong, they are also incentivized to see to it that things happen as people expect them to.

With this in mind, you can understand that provided the consensus rules are met, full nodes will without fail add new blocks of transactions to their copy of the Bitcoin ledger, thereby clearing and settling the valid transactions, updating the registry of which address owns which bitcoin and ultimately enabling Bitcoin users to enjoy their property rights.

By enforcing the consensus rules together, full node operators act as the custodians of Bitcoin.

Step 2: Miners work to produce eligible blocks and incur costs in order to do so

The most significant consensus rule is that the full nodes will only update their copy of the ledger with a batch of new transactions once they receive a correct answer to a specific mathematical puzzle that needs solving. This correct answer to the mathematical puzzle is referred to as the ‘proof of work’.

The enforcement of this consensus rule has a big influence on how and why Bitcoin works. Its influence is introduced in this section and Part 3 builds on these principles to describe the economic incentives and their effect in more detail.

In order to provide the poof of work that the full nodes require, participants in the Bitcoin network, known as ‘miners’, use computer hardware to solve the simple mathematical puzzle. A correct answer (the ‘proof of work’) has the effect of converting a batch of new transactions into a block of data that can be added to the Bitcoin ledger.

A correct answer (the ‘proof of work’) is difficult and expensive for the miner to compute but once the answer is found it is very easy and inexpensive for the full nodes to verify that it is in fact a correct answer.

Full nodes then use the eligible block of data to update their copy of the ledger (add a new block of data to the Bitcoin blockchain). On average, every 10 minutes at least 1 miner will solve the mathematical puzzle that produces an eligible block.

Miners are economically incentivized to produce eligible blocks  

Importantly, the computer hardware that miners use to produce the proof of work is application-specific, i.e., it can’t be used for any other economic purpose, and these computers burn electricity in the process of producing the proof of work. Therefore, producing eligible blocks involves capital investment and operational expenditure.

Producing proof of work requires application specific hardware and the burning of electricity. 

Like anything else in the world, people won’t incur these economic costs for no reason at all. The same reality applies here.

Miners only make the investment and incur the ongoing costs because they can expect to receive the bitcoin that the full nodes award to the miner (or mining pool) that produces a valid block of data that can add the new transactions to the ledger.

Miners create value for full nodes / Bitcoin users by performing the computational work that has the effect of converting a batch of new transactions into a block of data that can be added to the Bitcoin blockchain. Full nodes / users pay for the value created by rewarding the miner with newly created bitcoin and paying them transaction fees.

As an incentive for producing an eligible block, full nodes allow the successful miner to create and include in the new block one additional transaction that credits newly ‘minted’ bitcoin to an address that the miner controls. This reward is currently 12.5 new bitcoin for every new block. This is how new bitcoin enters circulation in the Bitcoin system.

At present, 12.5 new bitcoin enters the system every 10 minutes through the reward to the miner who produces a valid block and proof of work for that block. In May 2020 this amount will reduce from 12.5 to 6.25. This is referred to as the ‘Bitcoin halving’. The halving happens every 4 years and will continue to happen until all 21 million bitcoin have entered circulation by 2140.

In addition, if any of the transactions included in the new block pay a transaction fee then the miner can also ascribe that amount of bitcoin to their chosen address. Transaction fees are a discretionary payment made by the spender/sender of bitcoin and are used to incentivize the miners to prioritize your particular transaction over other user’s transactions that also need to be cleared and settled.

This computational work of producing eligible blocks to receive newly created bitcoin is called ‘bitcoin mining’ because in a similar way to how traditional mining involves working and incurring expenses to gather precious metals from the earth’s crust, receiving newly created bitcoin involves costly computational work to receive newly created bitcoin and transaction fees paid in bitcoin.

Global overview of the geographic location of bitcoin mining operations. Miners are always looking for the cheapest electricity. Source: CoinShares Research, the Bitcoin Mining Network June 2019 update.

Step 3: Full nodes add the eligible blocks of new transactions to their copy of the ledger

The step by step process that I’ve been describing was initiated by a user generating a transaction (step 1 above). Miners then work to include this transaction along with other transactions in a block that complies with the consensus rules (step 2 above). As soon as a miner solves the mathematical puzzle that produces the proof of work, it distributes the eligible block to the full nodes that it is connected to (step 3 described in this section).

Upon receiving the block from the miner, the full nodes set about verifying the proof of work and they will also check that the block, and the transactions in the block, comply with the other consensus rules. Some of the other rules are:

  • Does the bitcoin being spent exist in a prior block of the ledger?
  • Is it the owner that is spending the bitcoin or has someone else tried to fabricate the transaction?
  • Has the bitcoin not already been spent?
  • Does the spender own at least as much bitcoin as they are now trying to spend?
  • Has the miner rewarded themselves with the correct amount of new bitcoin?

If the block and the transactions in the block comply with the consensus rules then full nodes will add it to their copy of the ledger and they’ll also pass it onto their peers in the network so that these other full nodes can also verify the block and update their copy of the ledger accordingly.

By way of example, node 1 receives a block from a miner that it is connected to and it immediately sets about validating it. If valid, the block is passed on to other nodes that it is connected to. Blocks are passed through the peer to peer network from one full node to another much like how news would pass from one person to another.

If, however, the block isn’t a valid one then the full nodes will discard it and they will wait for another block to be submitted to them by another miner. As described above, all miners are economically incentivized to produce valid blocks so it will only be a matter of time until a valid block is submitted by another miner.

Cryptography and a blockchain data structure make the verification possible

The independent verification by full nodes is made possible by Bitcoin’s use of cryptographic hashing, asymmetric-key cryptography, digital signatures, and a blockchain data structure. When an explanation of why Bitcoin works include a reference to the ‘math’ and/or the ‘software’ and/or ‘the Blockchain’, this is what is being referred to.

Cryptographic Hashing –

Cryptographic Hashes are used in many places throughout Bitcoin. Some of these areas are digital signatures; creating transactions and adding blocks of data to the ledger and ‘chaining’ those blocks together.

A Cryptographic Hash Function converts any form of digital data (file, photo, text etc.) into a unique string of text known as a Cryptographic Hash.

In the same way that human beings each have unique fingerprints, digital data (which could be a file, photo, text, etc.) has a unique Cryptographic Hash. Hash Functions only operate one way, so if you want to find the input for a given output Hash, you need to guess and check every possible input. This is essentially what miners do to produce proof of work.  

The same digital data will generate the same Cryptographic Hash but if you change the data even slightly the Hash will change completely in a way that’s impossible to predict. In addition, the chance of finding two different inputs (pieces of digital data) that provide the same output Hash is equal to, in percentage terms, the amount of space that 1 atom occupies in relation to all other atoms in the universe.

Asymmetric-Keys and Digital Signatures –

Every bitcoin or part of a bitcoin in circulation is cryptographically linked to a Public Key. A Public Key is itself generated by a Cryptographic Hash Function using the Private Key as the input data. The cryptographically linked Private Key is kept secret and is used to encrypt transactions spending or sending the bitcoin linked to the Public Key. The encryption of the transaction data is known as the Digital Signature for the transaction.

Using the known Public Key, full nodes decrypt the Digital Signature and if the decryption produces the same transaction details that accompanied the Digital Signature then the full nodes can be sure that:

  • the transaction was generated by the person/entity that owns the bitcoin; and
  • the transaction details were not tampered within the period of time between: (1) when the transaction was created by the owner of the relevant bitcoin and; (2) the transaction details reached the full node.

A Private Key, therefore, acts as the tool to generate something akin to the password (the Digital Signature) that full nodes require before they will allow the particular transaction to be cleared and settled (included in a block that is added to their copy of the Bitcoin ledger).

A Private Key is kept secret and is used to encrypt the transaction spending or sending the bitcoin linked in the ledger to the Public Key. The spender/sender produces a Digital Signature (encryption) by inputting the Private Key and transaction details into a Hash Function. Full nodes then decrypt the Digital Signature using the Hash Function and Public Key. Only if the output of the decryption matches the details of the transaction will full nodes accept the transaction as valid.

Blockchain data structure –

In order to be able to always verify whether or not the Digital Signature for a given transaction is valid, full nodes need a record of the Public Keys that own (are cryptographically linked to) each bitcoin (or part of a bitcoin) in circulation. This is where the blockchain data structure comes in.

As part of enforcing the consensus rules, full nodes require miners to group new valid transactions in a block of data and cryptographically link the block (using a Cryptographic Hash Function) to the previous valid block in the chain. That previous block is also itself cryptographically linked to the block before it, and so on. In this way, a ‘chain’ of blocks of data (transaction data) is created – hence the name ‘blockchain’.

A blockchain data structure’s primary benefit is that it immediately highlights if anything in the previously recorded information (historical transaction data) has been changed / tampered with.

The blocks of the ledger are ‘chained’ together because the Hash of the data in the previous block is included in the subsequent block in the chain. Any change in the data in a prior block will announce itself because the chain will be broken.

Due to the fact that full nodes can rely on the authenticity of the data in previous blocks (because any change to the previously agreed state will immediately announce itself), they are able to independently enforce the consensus rules listed in the bullet points under the heading “Step 3: Full nodes add the eligible blocks of new transactions to their copy of the ledger” above.

Note, however, that the blockchain data structure alone does not make the data immutable (unchangeable) and therefore trustworthy. The immutability of the data in Bitcoin’s blockchain is as a result of Bitcoin’s decentralization and the strong economic incentives.

Don’t get overwhelmed by the technology –

As stated in Part 1, all of these technologies, the ‘math and software’ and/or ‘the blockchain’, are not the focus of this article because alone they wouldn’t have enabled Bitcoin to thrive as it has. If someone hammers on about these technologies while they are explaining why Bitcoin works, then tell them to stop because the technologies have actually been around for ages. Linked lists go back to the 1950’s, public-key cryptography came about in the 1970’s and proof of work is from the 1990’s. This alone should help one understand that these are not the things that make Bitcoin special.

But I digress… Back to the economic incentives, the interesting information and the stories that help us engage with these principles.

Difficulty adjustment consensus rule protects the issuance schedule and scarcity.

The repetitive cycle of the new transactions going into a block and a new block being added to the ledger occurs on average every 10 minutes.

This timing does not change all that much in response to how much computational power (mining equipment) is working to solve the equation (produce the proof of work) because as part of enforcing the consensus rules, after every 2016 blocks, the full nodes in effect adjust the difficulty of the equation to make it harder or easier so that if the amount of computational power mining bitcoin stays constant for the next 2016 blocks (about 2 weeks) then proof of work will be produced by one of the miners on average every 10 minutes. This adjustment every 2016 blocks is referred to as the ‘difficulty adjustment’.

Bitcoin’s predetermined issuance schedule and scarcity is therefore guaranteed by the fact that (1) miners are only able to solve the mathematical problem as fast as full nodes permit them to; (2) the miner reward is the only way that full nodes permit new bitcoin to enter the system; and (3) full nodes don’t allow miners to reward themselves more bitcoin than is provided for in the predetermined issuance schedule.

We can of course expect that the rise in the value of any money will lead to more resources being dedicated to the production of that money and thus an increase in its supply. However, due to the difficulty adjustment in Bitcoin, as bitcoin’s value rises and the incentive to produce bitcoin increases, the continued enforcement of the difficulty adjustment by full nodes sees to it that no more bitcoin can be produced than is provided for in the predetermined issuance schedule. Genius!

Read part 3: Credible answers to some important questions