Bitcoin Investing
How Bitcoin Works
Two inventions from the 1990s are the secret sauce powering the Bitcoin Network and the Bitcoin Core code that runs the show
This is one of three articles on bitcoin investing, and it provides background for the main article, “Is Bitcoin Immutable and Safe, or Fragile and Risky?”
Famed money manager Jeremy Grantham recently wrote that cryptocurrencies are “so technically complicated …that normal people simply can’t comprehend [them] and must take [their value] on trust.” It’s my hope that, with a bit of effort, even us non-technical “normies” can learn enough about how the Bitcoin Network works to appreciate why enthusiasts believe bitcoin to be safe, indestructible, and trustworthy.
Enthusiasts’ trust in bitcoin comes from the way that Satoshi implemented bitcoin’s blockchain and proof-of-work (PoW) cryptographic algorithms. Blockchain and PoW algorithms were both invented in the 1990s and refined for almost two decades before Satoshi went live with the Bitcoin Network. Let’s take a look how Satoshi’s invention works.
The Bitcoin Network
Bitcoin is a decentralized electronic currency that can be sent directly from one digital wallet to another via the Bitcoin Network in a “trustless” fashion, without needing the involvement of a third party like a bank or escrow company to resolve disputes or fix glitches — because there are none. Every bitcoin transaction that zips across the Bitcoin Network is permanently recorded in a public, decentralized ledger called a blockchain. This ledger is propagated throughout the world to thousands of network nodes that can’t be tampered with, thanks to the consensus-based PoW algorithm at the heart of the Bitcoin Network.
The Bitcoin Network is the first peer-to-peer value transfer system ever launched. Bitcoin was invented in 2008 by an unknown person or group using the name Satoshi Nakamoto, the pseudonymous author of the famous bitcoin whitepaper. In 2009, Satoshi released the Bitcoin Core, the open-source software that governs how the Bitcoin Network operates. Satoshi mined the initial genesis block and was awarded the first 50 bitcoins ever created, which were worthless at the time. The first-ever transaction took place a couple of days later, when Satoshi sent some bitcoins to a colleague and fellow cryptographic pioneer, Hal Finney — the second person after Satoshi to run the Bitcoin Core in what was then a network of just two computers.
Two kinds of entities make up the Bitcoin Network and cooperate to maintain its security and integrity, nodes and miners. In the description below, you’ll learn about validation, verification and confirmation — three pillars of the PoW protocol that Satoshi invented.
Nodes police the network, enforcing rules crucial to its security and sharing information about every new transaction with other nodes. When a node receives a new transaction, it validates that the transaction meets the Bitcoin Network’s rules (for instance, that the sender’s wallet holds enough coins). Nodes can do this because they maintain up-to-date copies of the entire digital ledger or blockchain. This means they know the path taken by every coin and fraction of a coin from transaction to transaction, and wallet to wallet, all the way back to the day Satoshi received 50 bitcoins in the genesis block.
After validating a new transaction, the node saves it in its “mempool” of pending transactions awaiting their chance to be added to the blockchain and confirmed. It also propagates this validated transaction to eight other randomly selected nodes, to be independently validated by them. If a node receives an invalid transaction, it won’t get propagated and it will die. If a misbehaving node continues sending invalid transactions, other nodes will simply block it.
Miners are responsible for legitimizing bitcoin transactions by aggregating them into blocks that are eventually confirmed by the network and linked together on the blockchain. This requires enormous computing power, for which miners earn rewards in newly minted bitcoin that they can sell for a profit. This is how new bitcoins enter into circulation.
Miners seek their rewards by first gathering one megabyte worth of valid transactions from a nearby node’s mempool, with each miner choosing their transactions independently. Then, they compete with each other by racing to “seal” their chosen transactions into a new block that is linked to the previous one. This requires miners to use their computing muscle to solve a complex cryptographic puzzle, the numerical answer to which is based on the specific transactions they selected, as well as the seal of the preceding block (a cryptographic process called “hashing”). Generating this hash value is what proves that the miner did, indeed, perform the work required by the PoW protocol. This hash value is what seals the new block.
The first miner that seals their block earns a block reward plus the fees attached to individual transactions within it (the higher the transaction fee, the faster the transaction will be selected by the miner and executed). The block is then propagated to nodes throughout the network. Each node checks that the block was properly sealed — an important step called verification. Once a sufficient number of nodes verify the block the transactions inside it are confirmed and the sending and receiving wallets are alerted of this. The chronological order of verified transactions is now set in stone. Just like transactions, blocks that aren’t verified don’t get propagated across the network.
For extra security, some wallets require up to five more blocks to be confirmed on top of the block in question before they will finalize a transaction sitting inside within. Importantly, the “deeper” a block is in the blockchain, the more secure it becomes, as it has been repeatedly confirmed by the addition of blocks on top of it. This is because every new block is linked to the previous one, and new puzzles can’t be solved without this linkage being made. Thanks to the enormous hashing power required to mine a new block, reversing previously verified blocks and the transactions inside them is virtually impossible (we get into this in the main article that looks at bitcoin threats). This is the reason why bitcoin wallets are often programmed to wait for multiple confirmations before accepting bitcoin transactions.
The following is a graphic view of the bitcoin transaction lifecycle we just covered.
In the beginning, mining could be performed using an off-the-shelf computer. Today mining is big business. As bitcoin’s price increased, this motivated miners to deploy more powerful mining rigs to boost their hashing power. Today, large miners operate giant data centers located near low-cost energy sources such as hydroelectric plants, and many mining entities are publicly traded corporations.
During the 13 years that the Bitcoin Network has been up and running, miners have earned almost 19 million bitcoins and created almost 725,000 blocks, all chock-full of transactions. Around 14,000 all-important nodes enforce the rules and maintain copies of the entire blockchain.
(Fun fact: Unlike mining, anyone with a powerful computer and fast internet connection can run the Bitcoin Core as a standalone node. Individuals and entities run nodes because they share a common interest in strengthening the Bitcoin Network).
The Bitcoin Network has never failed or been fooled (although, as you’ll read in the main article, it escaped a couple of close calls years ago, when it was smaller and more vulnerable). Supporters point out that the network is now so large and its hashing power so immense that the bitcoin blockchain is the most secure electronic database on the planet. They say this makes it immutable, meaning that it is nearly impossible to counterfeit bitcoins. This is one reason why proponents describe bitcoin as digital gold (for more on this, see the companion article, “Is Bitcoin Sound Money and Why Should You Care?”).
Of course, as the price of bitcoin climbs, more miners join the network, and they need increasing amounts of computing power to compete for block rewards. This is a feature of a PoW blockchain, not a bug, as it hardens the network against attack. Currently, bitcoin mining consumes roughly the same amount of electricity as the nation of Thailand. Some miners are trying to harness economic sources of green energy and use stranded energy supplies, but this is a slow process. Still, bitcoin enthusiasts point out that mining can actually help to balance and stabilize electrical grids by creating demand that can be curtailed whenever the grid is stressed. Some have even suggested that bitcoin is akin to “digital energy,” in that mining can absorb energy in one location and transmit it to another region to be released by selling bitcoin to purchase energy storage and generation infrastructure elsewhere.
The Bitcoin Core Code
Bitcoin’s code is fully open-source and decentralized. Anyone can use it, and any software engineer can verify exactly how it works. According to bitcoin.org, an informal information hub for bitcoin developers, thanks to this transparency, “Much of the trust in bitcoin comes from the fact that it requires no trust at all.”
Like any open-source software project, nobody owns the Bitcoin Core. And no one person or central authority dictates how the code should evolve. Anyone is free to propose, develop, review, test, and document changes to the Bitcoin Core, but only a handful of people have “commit access” to upload changes to the public repository that hosts the official version. These maintainers earn their privileges by working their ways up, accumulating a large number of “commits,” or accepted code changes. Of course, all proposed code changes go through a laborious review and testing process.
The final quality check on a new release of the Bitcoin Core comes from nodes themselves, as nodes are free to choose whether or not to run it. Most new releases are backward-compatible with prior ones, though sometimes a development team releases a version that makes large changes to the protocol that are not. Big, new releases like this are called “hard forks,” because they split the blockchain into two chains with different rules. Hard forks force nodes to choose whether to stick with the old protocol or embrace the new one.
Bitcoin has undergone small number of planned and debated hard forks during its brief existence, each of which spawned new blockchains with different features, protocols, and tokens. The most successful hard fork created bitcoin cash, a new token based on a forked blockchain that increased the size of each block to speed up transactions. But the original bitcoin blockchain remains by far and away the strongest, and the original bitcoin token the most popular.
********************
That wasn’t too complex to understand, was it? Now you enough about how the Bitcoin Network works to appreciate why enthusiasts believe bitcoin to be safe, indestructible, and trustworthy, and you are ready to return to the main article, Is Bitcoin Immutable and Safe, or Fragile and Risky?
Join Coinmonks Telegram Channel and Youtube Channel learn about crypto trading and investing