Deep Dive: Blockchains
Learn what blockchains are, how they work, and how they're used.
What is a Blockchain?
A blockchain is a peer-to-peer network of individual devices, referred to as nodes. Blockchain networks are distributed, decentralized, and immutable ledgers also referred to as distributed ledger technologies. Blockchains are secure ways to transact, record, and keep track of data and information. They are designed to create a method of recording digital information in a manner that cannot be altered or deleted.
Blockchain Nodes
Blockchains are created by connecting nodes, which can be any form of computer hardware such as a personal computer or dedicated compute server. Blockchain nodes are added to the network using special, unique software that contains the network’s network information and a current copy of the blocks on the chain. Nodes are added manually by an individual that has decided they want to contribute to the network’s resources or benefit from mining the network’s native cryptocurrency. Through this process, nodes aren’t located in one geographic location, they’re located all over the globe.
Once a node has been added to the blockchain, the node’s physical resources are made available to be used by the network for processing and validating transactions. Using this self-election process, blockchain networks replace the workflow of creating data centers or server farms that are dedicated to providing resources that are located in one geographic location.
But why would individuals take the time to set up and connect their resources, such as a desktop computer or locally hosted server, to a peer-to-peer blockchain network?
Incentives
Blockchain networks incentivize people to contribute resources to the network through cryptocurrency. Cryptocurrencies are digital currencies, such as coins or tokens, that are used to align the incentives of creators and users of blockchain networks. Since blockchain networks wouldn’t exist without individuals contributing their resources, cryptocurrencies are used to reward those that contribute resources in a monetary format, so they have reason to continue to contribute to the network.
Gas Fees
Blockchain networks like Ethereum charge transaction fees, known as gas fees, for each transaction executed on the blockchain. These gas fees contribute to the pool of cryptocurrency paid to the nodes that are executing the transaction. Some people like to think of these gas fees similar to a tip you pay after a service has been provided, like when you get a haircut or go out to a restaurant. The tip you pay directly rewards the person that provided the service to you. Gas fees help incentivize individuals to continue contributing to the network.
By using cryptocurrencies, the value generated by the blockchain gets redistributed directly back to the users and contributors of the blockchain, so there are no external profiteers of the network.
Public or Private
A blockchain network can either be public or private. A public blockchain, or an open blockchain, is a network that anyone can openly join by establishing a node on the network. A private blockchain doesn’t allow just anyone to download the software and establish a node. In most cases, private blockchains are controlled by a single enterprise or corporation that governs the network. Private blockchains are not open-source or decentralized, and users cannot join without being approved by the governing body.
Transactions
Blockchain transactions are always public regardless of whether the chain is public or private. All transactions can be accessed or viewed by anyone on the Internet through blockchain explorers. A blockchain explorer parses through blockchain records and to provide data such as wallet addresses, transaction IDs, and smart contract information. The content of each transaction, however, is not public.
Once a transaction has been verified by the blockchain and has been determined to be valid, the transaction is marked as complete and is added to a ‘block’ on the network. A block is a collection of verified transactions that have been uploaded to the network and is comprised of several verified transactions, sometimes even hundreds. Blocks are identified with a unique cryptographic hash value and contains the identifying hash of the block that came before it, creating a chronological record of the network’s transactions. Each new block gets apprehended to the existing block list, thus creating a chain, which has lead to the term ‘blockchain.’ The first block on a blockchain is referred to as the Genesis block. It is the only block that does not contain a hash of the block that came before it.
Once a block has been added to the chain, it is permanently part of the network and cannot be altered or removed. Every node that is part of the network stores its own personal copy of the blockchain’s transaction history on the node’s local hardware resources, resulting in hundreds or thousands of simultaneous backups of the network’s current information. When a new transaction is presented to the network, it gets cross-referenced throughout the entire network and evaluated using the current transaction history.
Using this method, the network can identify fake transactions that might be presented to the blockchain in a malicious attempt to steal cryptocurrency or information. For a successful malicious attack like this to work, 51% of the nodes on the blockchain would need to have their transaction histories simultaneously altered to reflect an illegitimate transaction. This would have to be done either through 51% of the computing resources on the network being modified for invalid proof-of-work or 51% of the staked currency on the network being held by a malicious party. This sort of attack is very difficult to pull off and requires an immense amount of skill, time, and resources.
Blockchain Architecture
Most blockchains are comprised of 5 layers:
Hardware: The physical metal hardware that a blockchain node runs on.
Layer-0: The peer-to-peer network.
Layer-1: Responsible for executing the consensus mechanism across the network.
Layer-2: Responsible for the state of the network and payment channels.
Application: The layer in which users interact with the blockchain.
There is not one sole blockchain network- there are hundreds of different blockchain networks, with more being developed consistently in the Web3 ecosystem. Each blockchain has it's own unique design and is separate from every other blockchain. Each blockchain often has its own native cryptocurrency and technical attributes. Transactions on one blockchain cannot be used or accessed from another blockchain by default unless an external configuration, such as blockchain bridge or Inter Blockchain Communication (IBC), is used.
Consensus
Every node on a blockchain has the same authority and permissions as each other node. Each node has the ability to submit transactions and validate the information of a transaction. There is no central authority that controls the network. To verify transactions and control network governance, consensus mechanisms are used. The most popular consensus mechanisms are proof-of-work and proof-of-stake. Consensus is achieved through a process known as ‘mining’, in which nodes verify transactions by solving complex equations and puzzles to create a proof of work or proof of stake result. Through utilizing consensus mechanisms, management on the blockchain is always distributed and equal amongst the nodes on the network. No single node ever has full authority over the network, and no node will ever have more authority than any other regarding transaction validation or network functionality.
On-Chain
The term ‘on-chain’ refers to when a blockchain stores data or processes the network’s transactions using the node’s resources it has available on the network. When data is stored on-chain, each node on the network must download and store that data. Storing data on-chain consumes a high amount of resources and processing transactions on-chain can be costly in gas fees. For this reason, many layer-2 blockchains have been designed as an additional layer for layer-1 networks to process their data and eliminate the amount of data processed or stored on the layer-1 chain. This can help improve performance, scalability, and reduce transaction fees. In comparison, decentralized storage blockchain networks store data primarily on-chain, such as the Arweave and Sia decentralized storage networks. Decentralized storage networks are designed to keep long-term storage of data and are not dedicated to processing transactions like wallet transfers or smart contract deployment.
Off-Chain
The term ‘off-chain’ refers to when a blockchain stores data or processes the network’s transactions on a network separate from the blockchain’s peer-to-peer network. Storing data off-chain is beneficial for most workflows since storing data on-chain requires a large number of resources and can result in poor network performance. Transactions processed off-chain using a layer-2 scaling solution can result in drastically reduced transaction fees and increased processing time.
IPFS is a popular and efficient solution for storing data off-chain. You can learn more about how to use IPFS in a wide variety of Web3 tutorials here:
Other Attributes of Blockchains
There are a few other attributes that make blockchains unique and different from traditional networks of computing resources.
Secure
Blockchains rely on cryptography, specifically asymmetric key cryptography, for encrypting and decrypting transactions and the associated information. Asymmetric cryptography utilizes asymmetric cipher keys, meaning there is a different cipher key used for encryption and decryption. Data secured with this method of cryptography assure that only the intended recipient of the information has access to it. This ensures that data is protected while it's being transmitted and that the content of the data is private, even though the transaction’s data is public.
Trust
Trust is a foundational value that the Web3 ecosystem has been built on, sometimes being dubbed as the ‘read-write-trust’ version of the internet, other times being referred to as the ‘read-write-own’ version since users on Web3 own their information, content, and digital assets, a huge difference from the Web2 version of the internet.
Blockchains create a system of trust through design. By utilizing a workflow that keeps transaction data private and secure, but allows the details of the transaction to be public, while also verifying transactions without a central authority, blockchains create an immutable system of trust for users, data, and blockchain participants.
How Does a Blockchain Transaction Work?
Step 1:
First, a transaction is entered onto the blockchain network.
Step 2:
The transaction is transmitted across the blockchain’s peer-to-peer networks across the world, providing each node with information about the transaction.
Step 3:
The nodes on the blockchain network participate in the mining process, which includes solving math equations to verify and confirm the validity of the transaction. This is known as the consensus process.
Step 4:
Once the blockchain confirms that the transaction is both valid and legitimate, the transaction is clustered into a block.
Step 5:
The block containing the transaction information is written permanently to the network, where it cannot be edited or deleted from the blockchain’s history.
Step 6:
The transaction is complete.
How Are Blockchains Used?
Currently, there are thousands of different unique blockchain networks that use their own cryptocurrency and proprietary software, but the workflow powering each is the same. Blockchains are used for all different types of transactions, environments, and systems, and are not limited to just the cryptocurrency and decentralized finance industries.
While banking and finance industries have the most benefit from the technology that powers blockchain networks, there are many other industries that have begun to utilize blockchains on the backend.
Blockchains are being used for things such as:
Banking and Finance: Using traditional banking technologies, bank transactions such as check deposits are confined to parameters such as only being processed during business hours or a waiting period of a certain amount of business days. Banking and finance that switch to blockchain technology can eliminate waiting periods, allowing transactions to be processed any time of the day, in as little as five minutes.
Currency: Cryptocurrencies were conceived and developed to provide incentive and value to blockchain networks. By creating a form of monetary currency that can be distributed and valued without a central authority provides an option for citizens of countries that lack national currency, centralized government, or other restrictions that prevent people from using traditional banking.
Healthcare: Though most blockchains are not HIPPA compliant yet, there is strong potential for blockchains to be used to store internal healthcare and medical records for patients since it provides a secure and confident record that health records are safe and immutable.
Property Records: Property records, for physical property or for virtual property in the metaverse, benefit from being stored on blockchains since property records are public information already, but now can have increased security and validity being stored on blockchains.
Smart Contracts: Smart contracts are pieces of computer code that are built to run on blockchain networks to facilitate, verify, or negotiate a contract agreement. Smart contracts can only be initiated under certain conditions that users agree on. Currently, smart contracts are mainly used for transactions such as NFT minting, or the process of creating an NFT. This functionality can be expanded into traditional contracts, such as rental contracts or service agreement contracts.
Supply Chains: Supply chains can utilize blockchain technology by creating a confirmed and verified path of production for products, such as verifying the source of produce as ‘organic’ or ‘local’, instead of having customers rely on labels that may be misleading.
Voting: Utilizing a voting system created using blockchain technology can help counter potential accusations of voter fraud and provide a level of trust and transparency to election results, both local and national.
Last updated