Bitcoin economics & network security - Bitcoin developers conference

By Lizette Louw | 21 July 2021
Bitcoin economics & network security - Bitcoin developers conference

Are you pining to go back to the days of meeting fellow Bitcoin developers in person? So are we!

As we wait for in-person events to resume, we’re making the most of our developer resources by sharing popular Bitcoin SV DevCon presentations in written format.

In this presentation, Bitcoin Association Training and Development Manager Brendan Lee gives participants of the inaugural Bitcoin SV DevCon an overview of the function of nodes on the BSV network and the role of economics in Bitcoin’s game-changing incentive system.

To watch the full presentation, head over here.

Economic incentives and the Bitcoin Network 

One of the most game-changing aspects of Bitcoin is the system of economic incentives that it creates which causes it to spontaneously form into a robust and useful system that everyone in the world can depend on.

Bitcoin: A Peer-to-Peer Electronic Cash System

Bitcoin is a peer-to-peer cash system underpinned by a set of economic incentives. The implication is that Bitcoin is a low cost, reliable public ledger, but it is not only designed for transactions. It facilitates all kinds of data exchange and offers many types of novel computing and data storage systems. These functions are all applied on top of a versatile cash layer. It is that cash system we use when we implement these other things that sit on top of Bitcoin.

This cash system is built on top of an economic incentive system that encourages network operators to compete honestly and collaboratively. Due to its design, a dishonest node cannot compete against a node that practices the openness and honesty that the network prescribes without being severely disadvantaged.

Bitcoin’s incentive system enables unbounded scaling, versatility, removal of centralised control

It also creates a network that is highly scalable, versatile and one that can exist without any centralised control. When I say that the network is not decentralised, it means there is no centralised organisation calling the shots.

The meaning of decentralisation

Decentralisation does not mean that the system’s operations must be spread across countless nodes across the globe. Instead, it is a type of system where consensus is distributed amongst the nodes participating in that cooperative competition to operate the network honestly. The network’s incentive system encourages miners to participate in and to ensure their long-term survival. To do this, they must scale the network as a group (they do this in lockstep) to maximise their profit. To act against the network is dangerous to the rogue node itself.

Steps to run the Bitcoin network, or ‘Bitcoin directives’

To understand Bitcoin’s economic incentives, we have to return to the white paper .


Source: https://craigwright.net/bitcoin-white-paper.pdf

Section five outlines the set of steps to run the network. If you look at them in detail, you’ll realise they aren't steps to running the network in the usual sense. Instead, they are a list of instructions that help you be the best possible participant in the network. The reality is that network participants can act in any way they like, and it is up to the rest of the consensus nodes to decide whether or not their participation is correct and honest and valid. But by following these steps, you can be assured you're participating most competitively.

Step 1: New transactions are broadcast to all nodes

The first step is to broadcast new transactions to all nodes, which refers to when you generate a transaction in your wallet, and you pass it to a merchant or a processor to send it to the network.

There is great urgency to broadcasting the transaction, as it becomes essential once Bitcoin has scaled into a colossal system handling millions of transactions per second. When a node finds a block, it must propagate that block and all its content to every other miner without any delay. Any time spent trying to find a competitor to that block is an opportunity lost at securing the reward that block contains.

Many people are under the impression that there is an economic incentive for nodes to hold transactions and not broadcast them out to all other nodes. But when you look at it from the perspective of how a node needs to announce its reward to the rest of the network, it does not make any economic sense for them to do that.

The image you see above illustrates what we call a ‘small world network’ that forms at the network’s core. The name 'small world network' refers to a network where nearly all the nodes are connected to almost all the other nodes.

If you look closely, you'll see that not all the nodes in this graph are connected to all others. Yet, they are all within one hop of each other. That is what we see happening at the core of the Bitcoin network: it is a very dense cluster of high-capacity computing systems with very high bandwidth. It's designed this way to ensure those nodes combine into the most competitive systems possible and to ensure that they have the best chance of retaining the rewards they have earned for building their block and being first to broadcast it to the network.

Step 2: Each node collects new transactions into a block

Each time a Bitcoin node constructs a block template, they create what is called a coinbase transaction. That coinbase transaction holds all the rewards the winning miner will collect if they are first to solve the hash puzzle and get to publish their block to the blockchain. The reward includes any transaction fees as well as the new coin distribution. The new coin distribution happens over time in tandem with the creation of each new block, slowly reducing and petering out sometime in the next century.

In that coinbase transaction, the miner identifies themselves using a technique we call miner ID. They can advertise the price for including transactions into their next blocks, allowing them to publish their value proposition to the network's users openly. The coinbase transaction is one of the mechanisms that incentivises competing enterprises to reduce their prices to win more of the network's traffic while improving the user experience at the same time.

As the network registers more incoming transactions, the Merkle tree is extended with an additive approach. As a result, they don't have to rebuild the hash tree each time the Merkle tree grows. This becomes very important at scale. As blocks are built over 10 minutes on average but updated once every few seconds, it would become cost-prohibitive to recalculate the entire hash tree every few seconds once blocks contain tens or hundreds of millions of transactions.

A Merkle tree is an efficient structure as it makes it very easy to add more transactions. The orange nodes in the image above are the nodes that will have to change. The green ones are the ones that we're adding to the system. Each time we add new nodes to the system, we update the coinbase transaction stipulating the reward.

Step 3: Each node works on finding a difficult proof-of-work for its block

As the hash tree grows bigger and we keep publishing new templates, the node works on finding what we call 'proof-of-work'. Proof-of-work is a hash of the block header that includes an immutable record of all the transactions in that iteration of the Merkle tree. It is important to understand that there are two parts to proof-of-work. There is the proof that you, as a node, can generate a large Merkle tree and handle the volume of transactions and solve the hash problem of that block. The second part of proof-of-work is the propagation of that hash solution to the rest of the network.

The Merkle tree is a scalable data structure that enables nodes to capture as much of the traffic that is broadcast into the network from users all around the world. As the network grows, the incentive drives each node to scale to handle the total amount of traffic coming into the network. The competition is between the fastest, most capable network nodes. Any node who wants to participate must be capable of gathering, processing and storing every transaction happening on the network globally in real-time.

In Bitcoin SV, we are laser-focussed on scaling , and so we ensure that the network’s software and hardware is designed with that in mind. Bitcoin SV is built to handle high volumes of transactions of different sizes and types reliably and cost-effectively, any time of the day and any day of the week. That is not something you see in a lot of the other blockchain networks around.

Step 4: When a node finds a proof-of-work, it broadcasts the block to all nodes

Once a node finds a proof-of-work, the next step is to broadcast the block to all nodes, including the solution to the hash problem and all the transactions they have been capturing for the other nodes to validate.

The broadcasting of the block is where the node captures the value of the block - the reward - and it is probably the most important step. The node has just spent a fair amount of computing power and energy on building a block and solving the hash puzzle . In order to be rewarded for its effort, it must solve the hash problem and be the first to announce that block to the rest of the network. Any energy that other nodes have spent trying to find an answer results in an orphan race for their block.

An orphan race happens when two nodes find competing solutions for the same block. Therefore it is critical for a node to spread their announcement across the network, that hyperdense small world network at the core of the Bitcoin network, as quickly as possible. As soon as the winning node's message reaches other nodes, they know they can stop building their blocks.

Once a node has found another block on top of this, its chance of securing the reward grows as, before a node can claim its prize, 100 blocks must be built on top of their own.

You can see there is a powerful incentive for nodes to play this game in a manner that you could call open misère, which means with their cards facing up on the table: 'These are the transactions I have. This is the order they're in.' There's another myth called 'selfish mining' that people used to talk about quite a bit. If you understand how that works, you will see that the act of selfish mining would ignore this step, 'directive number 4', and in so doing, put yourself behind honest nodes.

Selfish mining is the premise that a miner could find a valid proof-of-work and withhold it from the rest of the network, only broadcasting it to its sub-network of selfish nodes. It would then try to find a solution to the next block so that if another node found a different solution, they could propagate their first solution before them. In doing so, they would be able to conduct something similar to a 51% attack with less than half of the hash on the network.

When you look at the hyperdense connectivity at the centre of the network, you can see how this attack would be foiled. But the maths that supposedly proves selfish mining works does not take this into account: that the nodes at the centre of the network transmit messages between themselves almost instantaneously.

Because this selfish node has a fair amount of hash power connected to it, by necessity, all the other nodes will also be connected to it. So, this will be a well-known node on the network. It is very likely that the enterprise that operates it would also be known to the other network nodes. If another node finds a block, it would have to announce it to the selfish node. The selfish node would then have to tell all the other selfish nodes to broadcast the selfishly mined block. But before that can happen, the same node that announced its block to the selfish node would already have declared it to most of the rest of the network. The selfish node might beat one or two of the other nodes and trick them into mining their selfish block, but the honest one will always get ahead.

Step 5: Nodes accept the block only if all transactions in it are valid and not already spent

The next step is the validation of the block. Nodes accept the block only if all the transactions within it are valid and not already spent. There's two parts to this step. First, the node must get the block header containing the Merkle root of the Merkle tree . To validate that Merkle root, the node must also have a complete list of all of the transactions in that block as well as their correct order.

Early in the lifetime of the network, when the blocks are not so big, it is okay to receive that transaction and transaction ordering information after the block announcement because it is relatively quick to rebuild that Merkle tree and check that that Merkle root does form part of that block header that is announced across the network. However, as the network scales, it will become extremely difficult to transmit all the necessary information to validate that block and stop spending money trying to compete.

The way we are working to overcome this issue is to let nodes begin to transmit the information about their block before they have found the correct solution. Each time they lock in a block template with a coinbase transaction and start doing proof-of-work on it, they will transmit the order of all the transactions to all of the other nodes in that central consensus. And they do this so that as soon as they find that correct block solution and announce their block to the rest of the network, those nodes don't have to spend time and energy building that Merkle tree to validate the block. They've already done that part of the work, and they can accept that block straight away and start mining on top of it rather than the previous block.

All of this is done to prevent nodes from expending unnecessary energy competing with a valid block. As soon as the message of a successful block reaches other nodes, they stop spending their energy on finding a solution to a block that might potentially end up in an orphan race. For this purpose, each node will carry copies of all the other Merkle trees of every other node in the network. This is another case where being open and honest with the rest of the network translates into a benefit for each node.

You can see that the Bitcoin network is not just an extraordinarily robust and densely connected network but one that operates with the utmost openness and honesty. This is something that we don't see on the Internet or any financial networks. Most databases in the world today operate in secret and with data encryption. But the Bitcoin network operates with complete openness. The Bitcoin blocks and the transactions are all unencrypted, plain text and published entirely publicly . I'm optimistic that having a layer at the centre of the network that promotes such a level of openness and honesty will propagate similar behaviour out to the users of the network.

Step 6: Nodes express their acceptance of the block by working on creating the next block in the chain, using the hash of the accepted block as the previous hash

The final directive of the white paper, Section 6, is that nodes express their acceptance of the block by working on creating the next block in the chain, using the hash of the accepted block as the previous block.

This describes how the network builds on valid transactions to support the validation done by other nodes and eventually release the coinbase transaction earned for processing transactions in that block.

Key takeaways

You can see that when we talk about proof-of-work , there's more to that than just hashing the block. There's work in being open and in scaling the network. It's a combination of all of those elements that enable nodes to be the best possible competitors.

All these steps, or directives, incentivise the network in a spontaneous, leaderless manner to form a highly reliable and robust network.

These incentives drive Bitcoin to scale, and it's easy to see that if it doesn't grow to process huge numbers of transactions with ample fees over time, the network cannot survive . If it does scale successfully, there will come the point when the transaction fees eclipse the current block reward. That will be when we can see that the network has achieved long-term viability and has become self-sustaining.

We also see that honesty and openness are the best way to profit in Bitcoin, and there is no way of competing in the network by being dishonest.  Although it's quite a paradigm shift, it will improve outcomes for many people around the world.

Proof-of-work is only partially related to the energy-intensive activity of hashing to find the block solution. It has as much to do with the construction of the block prior to hashing and the communication with the network by broadcasting the transactions - the constant updating of other nodes on what is being included in its block.

Although the network is open to anyone to participate in an attempt to build blocks, only somebody who can openly display that they have invested the money required to perform the proof-of-work will be able to profit from their participation.

Network density increases as the rewards grow in value. On the other hand, the network can also implode if the rewards disappear. Therefore, it is incredibly important for the network to keep balancing short-and long-term incentives by encouraging the market to constantly produce vast numbers of transactions to ensure a constant influx of money and investment in the network.

Attend Bitcoin SV DevCon for free

If you’ve found this presentation valuable, you are sure to benefit from attending the next Bitcoin SV Developers Week. Sign up to be notified about the next event to make sure you don’t miss it.

 

Get BSV DevCon Updates

Sign up for news and information about BSV DevCons and other Bitcoin Association initiatives.