What is a Blockchain?
Fundamentally a blockchain is a list (chain) of items or tokens, grouped into blocks. In the case of cryptocurrencies, the tokens represent transactions or balances. Often this is described as a ledger, similar to a checkbook or credit card statement. A more technical way to think of it is as a structured log file or append-only database.
The tokens in the chain may indicate something other than currency, such as ownership of physical property or an NFT, or executable code as in smart contracts. Once a token is in the blockchain it cannot be removed. A future item could supplant the original but would not erase it from the chain. So if a token represents an item you could search the chain to note all transactions involving that item.
Where blockchain gets interesting is in the mechanisms to ensure that the data in the chain is correct, authentic, valid, and unchangeable. Without these assurances anyone could add random transactions to the chain.
Digital signature cryptography is used to ensure that only the person with the specified account could possibly have created a list item. A cryptographic hash function is used to ensure that none of the data can be modified or tampered with after creation.
There is still a possibility that a valid account could create fraudulent transactions. One such type of exploit is called ‘double spending,’ which involves an account paying out more money than it has. There are many forms of this particular scam and quite a few other ways to try to swindle the system. A key element of a blockchain system’s defense against these challenges are consensus mechanisms that can detect and deter them.
Permissioned and Permissionless
The two major categories of blockchains are defined by whether their consensus mechanisms require permissions to participate (permissioned) or are open to all (permissionless).
In a permissioned chain only certain controllers can add new tokens/blocks to the chain. In many permissioned chains it is generally true that anyone who has permission can simply add information without any other oversight. This tends to be favored by banks, corporations, and governments, which want to maintain tight control over the contents of the chain. This is how they traditionally work– controlling all aspects of their data.
However, this control affects the decentralized, independent, and transparent nature of the blockchain that is so prized by its aficionados. A permissioned blockchain could be manipulated by the owner without any outside visibility. Or it may be hacked by outsiders if the controllers are employing inadequate security. Permissioned blockchains are useful, but they are very different beasts from permissionless chains.
A permissionless system is so named because there is no centralized permission required in order to add tokens and blocks. Instead, the system is open to anyone who follows an agreed upon algorithm or mechanism to manage the system. Any information that is added is verified by others following the same system to ensure that everything is correct. This gets very interesting: How can a distributed group of people who probably don’t know each other agree on what are valid transactions and what are not? There are a variety of types of Consensus Mechanisms and much ongoing research into these techniques.
Particularly for permissionless chains there must be maintainers (miners) of the blockchain who are willing to run a node (a server application) and use an agreed-upon method to discriminate between data which is valid and should go into the chain, and which to reject.
The most common consensus mechanism, used by Bitcoin, is called Proof-of-Work (PoW). In PoW, miners get a list of proposed transactions that they first validate, followed by computing a hard mathematical equation which incorporates this data. This computational calculation is the “work” part of the PoW. Once they have solved the equation they submit their results and other miners verify it. If they are the first miner to finish and have their work verified, they receive a specified amount of newly created (or mined) crypto.
As a trivial example: imagine you are given a list of 100 numbers that you must first sum. To solve the problem and be granted coins, you must find an additional number that you can add to this sum to ensure that it is divisible by 83. This is many orders of magnitude simpler than the problem miners must solve, but it gives you the gist of how the data could be incorporated into a calculation.
The Ethereum chain switched from PoW to the Proof-of-Stake (PoS) consensus mechanism in 2022. PoS requires miners to hold significant value in the network (like putting money in escrow) as a measure of their good faith. As long as they perform their mining and validating diligently they can mine crypto and eventually get their stake back, but if they behave dishonestly they could lose it. This avoids the massive computing and power usage that PoW encourages, while still trying to ensure honest consensus.
Interestingly, over time both the Bitcoin and Ethereum consensus mechanisms have veered away from more open and democratic systems, placing more power in the hands of those wealthy enough to afford either large investments in computing power or able to afford to stake significant sums of money.
The key part of mining, and where the name comes from, is performing computational work to earn (or generate) new crypto. For any blockchain to succeed there must be an incentive for others to participate in it. The ability to earn crypto is the most common reward mechanism. Miners can also get paid for validating and maintaining the blockchain and for running contracts. As people add information to the blockchain, miners can collect a small fee for their part in facilitating the process.
In addition, parties that want to prioritize their transaction, particularly when transactions are being backed up, may choose to pay an additional fee to prioritize their work. This can get out of control when a blockchain is under stress, requiring the payment of large fees to get work performed.
At the dawn of crypto anyone could mine the currency. You needed to be savvy enough to run the node application on a computer with reasonable processing power and a good internet connection. As crypto values exploded, companies and organizations formed specifically to mine it, standing up massive numbers of specialized computers in purpose-built facilities and achieving economies of scale. Since solving the mathematical problem is a race, these groups have knocked most small players out of contention.
This has created a problem with energy consumption. Modern crypto mining is estimated to use as much electrical energy in one year as the Netherlands. Mining corporations set up wherever they can get cheap electricity, legally or not.
The anonymous nature of many crypto currencies has also facilitated the entry of somewhat shady organizations and state actors into mining. Some fear that these groups may find ways to impose their wills upon the process. Is it possible that they could bypass the security built into the system in order to benefit themselves?
Individuals and small groups have fought the rise of corporate mining by banding together to form mining pools, in which they share the effort and any potential rewards.
Now that I have covered the basics of both crypto and blockchain, I will follow up with a variety of uses and use cases in the next installment. I will look into what is being proposed and what has actually been implemented with these technologies. In the final installment, I will dig more deeply into the technologies.