A blockchain is a form of a distributed digital ledger — or database — most commonly used to record transactions and network state changes in A cryptocurrency is a digital asset that may be used as a medium of exchange. Cryptocurrencies typically exist on blockchain... like Bitcoin. Depending on their design, data stored using a blockchain can be incredibly difficult to change. This makes them well suited to recording digital asset transactions and more advanced decentralized financial services, like those deployed on the Ethereum blockchain using smart contracts.
In this introduction to blockchain technology, we explain exactly what a blockchain is and how they work. Before assessing why blockchains are useful, we also cover the differences between different types of blockchains, including private blockchains and their public counterparts.
What is blockchain?
A blockchain is a distributed data storage method that is central to cryptocurrencies like Bitcoin. It takes its name from the way the data is organized for storing — blocks of data are cryptographically linked to the previous block to create a chain. The easiest way to think about a blockchain is as a kind of database that one or more parties that may or may not trust each other can update.
Blockchains come in several different forms based on who can update the ledger, who can access it and how distributed parties agree on the previous data recorded. In a permissioned blockchain, only those authorized can participate. Within this broad category are federated blockchains, where an agreed-upon group of participants can add data, and private blockchains, which are controlled by a single trusted entity.
Meanwhile, anyone can connect their computer system — known as a node — and participate in a permissionless blockchain network. As a result, permissionless blockchains require much less trust than their permissioned counterparts but must employ some mechanism to ensure that nodes agree on who can add new blocks of data next.
How nodes come to an agreement — or consensus — is known as the blockchain’s consensus mechanism. There are a few different consensus mechanisms in use today, and we’ll briefly explain the most popular ones in this article.
A brief history of blockchain technology
Although blockchains are most associated with cryptocurrencies like Bitcoin today, the technology’s origins date back much further. The anonymous developer or group of developers behind Bitcoin, Satoshi Nakamoto, brought together several existing ideas when designing the Bitcoin system. Interestingly, however, the term blockchain itself did not emerge until some time after the Bitcoin blockchain went live and does not appear in either the white paper or the work of earlier cryptographers.
As early as the 1970s, David Chaum and Ralph Merkle were laying the groundwork for what would become blockchain technology as we know it today. Merkle pioneered the idea of a Merkle hash tree as an efficient method of linking data cryptographically in a 1979 dissertation. Meanwhile, Chaum’s vault system was a distributed computer system of sorts, built using various cryptographic primitives and able to be trusted by potentially adversarial participants.
Writing for the Journal of Cryptology in 1991, physicist Stuart Haber and cryptographer W. Scott Stornetta built on these ideas when describing a trust-minimized system to prove the creation date of digital documents.
Acknowledging that digital documents are easy to tamper with, the pair’s solution was a system by which documents were signed digitally and hashed using a cryptographic function. A subsequent document would include this hash before it too was hashed.
This would effectively create a verifiable sequence of documents. Attempts to change a document or tamper with the order in which they were published would result in every subsequent hash changing, exposing the fraudulent record. Stornetta and Haber refined their proposed system using Merkle’s Merkle trees in a subsequent paper published in 1993. The system described by Haber and Stornetta inspired cryptographer Nick Szabo in his early digital currency system, Bit Gold.
Another important innovation that influenced Bitcoin’s development and, therefore, the evolution of blockchain technology was Crypto mining is the name given to the process used in some cryptocurrencies to ensure that distributed computer systems can.... Computer scientists Cynthia Dwork and Moni Naor wrote a paper in 1992 that described a system for combatting junk email. The system required those sending an email to complete a computationally challenging task. The task would not cause any significant disruption to the sender when sending a single email. However, sending thousands — as spammers do — would quickly become computationally prohibitive.
Several cryptographers that would later become influential in Bitcoin development innovated on the idea and described how it could be used in digital currency systems. Adam Back’s Hashcash, Hal Finney’s RPOW, Wei Dai’s B-money and Nick Szabo’s Bit Gold all incorporated proof-of-work to ensure that a distributed network of distrusting participants could agree with the respective systems’ transaction histories.
How do blockchain networks work?
Blockchain technology takes its name from the fact that data is grouped into blocks and then linked to the previous block cryptographically. Blockchain networks make heavy use of a cryptographic function known as hashing. Hashing is a method of turning a dataset into a string of seemingly random characters. Crucially, every hash is unique and making a tiny change to the input data will produce a completely different hash.
Each blockchain block contains a hash of the data included in the proposed block, the data itself, and the previous block’s hash. Attempting to alter the data in an earlier block completely changes its hash, which changes the hashes of all subsequent blocks. In this way, any effort to rewrite historical data is immediately evident.
Consensus mechanisms in public and private blockchains
Blockchains employ various techniques to ensure that a network of computers can agree on the order in which data was added to the chain. This is vital to prevent what’s known as double spending — i.e., paying someone twice with the same money.
Proof-of-work is the consensus mechanism used by the Bitcoin blockchain. It involves nodes taking a dataset, adding a random number and applying a cryptographic hash function to it. The hash produced must fall below a threshold defined by the network. In Bitcoin, this threshold is determined by the number of zeroes with which the output hash begins. Whichever node finds a hash that falls below the threshold first has the authority to update the blockchain. Then, the network starts work on the next block.
Hashes are useful in this regard because the hash itself bears no resemblance to the data hashed. The slightest change to the input data will produce a completely different hash, and there is no feasible way of knowing what hash a given data set will produce. However, it is easy to check that the data provided does indeed hash to the output with the hash known. It is impossible to fake the work for all intents and purposes, but it is straightforward for distrusting parties to check its validity.
Proof-of-work keeps nodes honest in public blockchain systems because of the cost of electricity required to find valid hashes and the reward they receive for acting in support of the network. Because it requires economic compensation, proof-of-work is best suited to blockchain networks that store cryptocurrency transaction data.
Participating nodes — known as miners — use a lot of electricity in guessing a valid hash and receive a reward for adding valid transactions to the chain. They receive no compensation if the rest of the network rejects their hash or they attempt to validate transactions that do not follow the network’s rules. Thus, they are financially incentivized to validate transactions honestly.
Given its economic nature, proof-of-work is best suited to securing ledgers for cryptocurrencies like Bitcoin. Non-trusting validator nodes must be incentivized to act honestly, or the system will not work.
Proof-of-stake is a less computationally intense consensus mechanism used by several blockchain-based cryptocurrencies. Here, transaction validators put up an amount of a digital currency as a sort of bond. The network then selects a validator with sufficient stake at random to validate transactions. If the rest of the network agrees that the transactions are valid, the validator receives a reward. If the network rejects their block, they are punished by some or all of their stake being forfeit — or slashed.
Like proof-of-work, proof-of-stake is financial in nature. It is, therefore, best suited to blockchain networks on which economic activity occurs.
Proof-of-authority is a consensus mechanism used by permissioned blockchains. In a private blockchain, a single authority has the power to update the blockchain, and all participants must trust them to act honestly. It is usually in the entity’s interests to do so, but this trust requirement makes such blockchain networks ill-suited for use in a distributed monetary system. Instead, they find applications elsewhere, such as in supply chain management.
A federated blockchain is another kind of permissioned blockchain that might use a proof-of-authority mechanism. Here, nodes distributed validators are selected by a central entity. The network then chooses a participant to validate transactions at random. Again, because there is likely trust between the entities and malicious actors can be excluded from the system entirely, there is less requirement for a sophisticated consensus mechanism like proof-of-work or proof-of-stake in the federated model.
As there is a high degree of trust involved in a proof-of-authority blockchain network, it does not make much sense to employ the mechanism for cryptocurrencies like Bitcoin. Essentially, you would end up with a system much like traditional electronic payment methods like credit cards. A single entity or small group could choose which transactions to process and exclude users based on whatever criteria they deem fit.
Why are blockchains useful?
Blockchains have been proposed for all kinds of data storage problems where a single truth is required between mutually distrusting participants. With each block cryptographically linked to the previous block via hashing algorithms, it is incredibly difficult to convince other participants that a new version of history is actually the correct one.
To rewrite the recorded transaction history in a proof-of-work blockchain network requires a malicious entity to control a network of computers more powerful than at least half of the computers that validate transactions honestly. With the most robust proof-of-work chains, like the Bitcoin blockchain, this would require huge expense. Compounding the economic cost are supply chain issues — i.e., actually sourcing the immense amount of hardware needed.
Similar is true in a proof-of-stake blockchain network. Reversing previous transactions requires an attacker to control more than 50% of all the currency staked. If an entity suddenly started attempting to acquire enough stake, the price of the blockchain’s native asset price would be driven upward very quickly, making it even more economically infeasible to attack the network.
Blockchains have found various use cases and applications in their relatively short history. The following examples are in different stages of development, with some little more than ideas at the time of writing:
- Blockchain-based digital assets, such as BTC, LTC and XRP, or Nonfungible tokens, or NFTs, are tokens representing some digital asset that reside on a blockchain linked to a distinct digital... like those issued on the Ethereum blockchain.
- Distributed, smart contract-enabled computer systems facilitating various financial services like the Ethereum blockchain, Solana and Avalanche.
- Supply chain management — private blockchains can be used to verify the authenticity of a product.
- Voting mechanisms — distributed voting platforms on blockchain-based systems look like a promising method to combat election fraud.
- Ownership deed management — property titles can be stored and transferred using blockchain technology.
- Digital identity systems.
Many of the above applications require blockchain-based digital assets for their operation. OKX is one of the world’s leading ecosystems enabling users to buy and sell cryptocurrencies like bitcoin and others. We also provide access to the various passive income generating opportunities presented by networks like the Ethereum blockchain.
Not part of the OKX community yet? Sign up to explore all the tools and products we offer.