Blockchain 101: How Decentralization Is Changing the Game

Rosario Borgesi
Coinmonks
17 min readMar 3, 2024

--

Have you ever wondered how you can send money to someone across the world without using a bank or a third-party service? Or how you can verify the authenticity of a product or a document without relying on a central authority? If you answered yes to any of these questions, then you need to know about blockchain.

Blockchain has the potential to transform various industries and sectors, from finance and health care to food, real estate and travel.

In this article, we will explore how blockchain works, what are its main applications, and why it is a game-changer technology that no one should ignore. We will also discuss some of the challenges and limitations of blockchain, and how they can be overcome or mitigated.

If you prefer, I have also created a video with the content of this story:

Table of Contents

· Table of Contents
· Core principles
· Distributed ledger
· Blockchain Network
Decentralized P2P Network
Trustless Network
Network partecipants
· How the blockchain works
SHA-256 Function
Blockchain Structure
Block
Blockchain Security
Transaction execution
Consensus
Economic incentives for validators and miners
Cryptocurrencies
· Most important blockchains
Bitcoin
Ethereum
· Smart Contracts
· Blockchain Application Areas
· Blockchain Limitations
Scalability
Energy Consumption
Security and Privacy Risks
Privacy
Regulation and Legal Challenges
· Further Exploration
· Conclusions
· Resources

Core principles

Blockchain is a revolutionary technology that enables secure, transparent, and decentralized transactions of information and value. It is a distributed ledger that anyone can access, but no one can change or delete. It works by creating blocks of data that are linked together by cryptography, forming a chain of records that is constantly updated and verified by a network of computers.
It is based on the following core principles:

  1. Decentralization: Blockchain operates on a distributed network of nodes rather than a central authority.
  2. Transparency: All transactions on the blockchain are public and visible to all participants in the network.
  3. Immutability: Once data is recorded on the blockchain, it cannot be changed or deleted.
  4. Security: Encryption and consensus mechanisms protect transactions on the blockchain from tampering and unauthorized access.
  5. Consensus: Network nodes must agree on the state of the blockchain through a consensus process.
  6. Traceability: All transactions on the blockchain are tracked and recorded permanently, allowing for a complete audit trail.
  7. Authenticity: Each transaction on the blockchain is authenticated through encryption and network consensus, ensuring the origin and integrity of the data.
  8. Efficiency: Blockchain eliminates the need for intermediaries and reduces the complexity and costs of transactions.
  9. Trustlessness: Blockchain aims to eliminate the reliance on central authorities or third parties for trust.

Distributed ledger

At its core, the blockchain is a distributed ledger of transactions. To understand what this means, we need to delve into the history of Yap Island.

The Yap island

The Yap Island is a small island in the Pacific Ocean where, 2 thousand years ago, the world’s first distributed ledger was created. Since the Yapese did not possess any gold or silver, they used large stone disks called Rai as currency. These stones could be up to 3.5 meters (11.5 feet) high and weigh over 220 kg (485 pounds), and were spread across the island.

Rai: the currency of Yap Island.

Since these disks were heavy, they were not transportable, and each person on the island had to recall by memory who the owner of each stone was. When it became more difficult, they used books, known as ledgers, to record the owner of each stone.

When an inhabitant wanted to spend their stones, they had to announce the change of ownership to the entire community, and all other inhabitants would have to update their own copy of the ledger. This way, the inhabitants could spend their stones without the need to move them.

The Yapese had invented the first distributed ledger. The ledger contains a list of transactions and gets updated continuously with each new transaction. The distributed ledger is based on the idea that everyone keeps an always updated version of the transactions list.

Furthermore, this system allowed the Yapese to execute transactions without the need to trust a person or a group of people to manage the ledger. In fact, the Yapese knew that by entrusting the management of the ledger to one person or a small group of people, they could act unfairly to the others by modifying the ledger for personal advantage.

The system of the Yap Island prevented the possibility that anyone could claim possession of a stone that did not belong to them. If a person declared to own someone else’s stone, the majority of the ledgers would have proven it to be wrong.

Blockchain Network

Decentralized P2P Network

Bitcoin, the first blockchain was created in 2008 by Satoshi Nakamoto, that presented it as a “Peer-to-Peer Electronic Cash System.” Fundamentally, the blockchain consists of a network of nodes, which are computers running the blockchain’s client software, enabling them to connect with one another. Opting for a peer-to-peer network over a client-server model was essential for creating the blockchain.

client-server versus peer-to-peer network

In the client-server model, the server typically is a powerful computer responsible for storing data, managing resources, and providing services to clients. Clients, such as laptops, smartphones, or desktop computers, request services from the server, which responds by providing the requested data or performing tasks. Consequently, information is centralized within the server.

Conversely, in a peer-to-peer network, individual nodes (or peers) serve as both clients and servers, facilitating direct resource and information sharing among each other without reliance on a centralized server. Each peer in a P2P network holds equal status and can initiate requests for resources or services and respond to requests from other peers.

The peer-to-peer network architecture enables the blockchain to be distributed, ensuring that the transaction ledger it is not stored in one place, but rather numerous copies across all nodes. Each node has the same version of the blockchain, and they constantly communicate and verify with each other to keep the data consistent and updated. This makes the blockchain very resilient and secure, as no one can tamper with or delete the data without the consensus of the majority of the nodes.

Trustless Network

Traditionally, trust has been centralized, relying on institutions such as banks, governments, or other intermediaries to facilitate and validate transactions.

In a blockchain network, transactions and data can be verified and executed without the need for trust in centralized authorities or intermediaries. This is achieved through cryptographic techniques, consensus mechanisms and the peer-to-peer network that ensure the integrity and security of the data without relying on a single trusted entity.

Network partecipants

Network of nodes in the blockchain

The nodes are the partecipants of the blockchain’s peer-to-peer network and are are responsible for validating transactions and adding new blocks to the chain. The three most common types of nodes are:

  • Full nodes: play a critical role in the Blockchain network by preserving a comprehensive copy of the Blockchain ledger. They download and archive every transaction and block on the network, enabling independent verification of the entire Blockchain history. Through communication with other nodes, they ensure that the Blockchain is up-to-date and accurate. Full nodes validate transactions and blocks by detecting irregularities like double-spending or invalid signatures before integrating them into the Blockchain. Full nodes are typically run by cryptocurrency enthusiasts, Blockchain developers, and organizations that require a high level of security and control over their Blockchain transactions.
  • Light nodes: also known as SPV (Simplified Payment Verification) nodes, are a more lightweight version of full nodes. They are designed to operate on devices with limited storage and processing power, such as smartphones and tablets. Light nodes do not download the entire Blockchain but rather a small portion of it that contains information relevant to their transactions. Light nodes rely on full nodes for transaction validation and block verification. They communicate with several full nodes in the network to obtain the information they need to verify their transactions.
  • Miner nodes: are responsible for verifying transactions and adding new blocks to the Blockchain. These nodes perform complex calculations to solve mathematical problems that allow them to create new blocks and receive rewards in the form of cryptocurrency. Miner nodes require specialized hardware and software to perform the calculations required for mining. They are typically run by large mining pools or individuals who have the resources to invest in the necessary equipment. Miner nodes are essential to the Blockchain network, as they ensure that new transactions are processed and added to the Blockchain in a timely and secure manner.

How the blockchain works

SHA-256 Function

Cryptography in blockchain safeguards transactions by encrypting data, verifying authenticity through unique digital signatures, and ensuring data integrity. Central to blockchain cryptography is the SHA-256 function, a cryptographic hash function that converts input strings of any size into fixed-length, non-invertible outputs, called hash.

Let’s calculate the hash of various strings to understand how it works:

  • The hash of the string “I am legend” is: “b891dc5b4d4394d972e08f2257cbe182728c38d9193f7289eda913852bc1b838”
  • The hash of an empty string “” is: “e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855”
  • The hash of the string “Bitcoin” is: “b4056df6691f8dc72e56302ddad345d65fead3ead9299609a826e2344eb63aa4”

You can try it for yourself here.
The core principles of the SHA-256 hash function are as follows:

  • The output (hash) is fixed: it always consists of a string of 256 bits, typically represented as a hexadecimal string of 64 characters.
  • It is deterministic: the same input will always produce the same output.
  • It is resistant to collisions: the likelihood of two different inputs generating the same output is exceedingly low.
  • The input can have any size: the function can accept inputs ranging from an empty string to an entire encyclopedia.

Blockchain Structure

The blockchain as a sequence of blocks

The blockchain is essentially a chain of blocks interconnected. Each block contains metadata and a list of transactions, constituting the actual data. These blocks are linked together using cryptography. Each node maintains an identical copy of the blockchain as every other node of the network.

Block

Block structure

As depicted in the image above, a single block consists of the following fields:

  • Block #: It represents the sequential order of blocks within the blockchain. The initial block, known as the genesis block, is assigned the number 1. Subsequent blocks are numbered sequentially as new blocks are added to the blockchain, with each block number increasing accordingly.
  • Nonce: stands for “number used only once”. It is a number used by the miner to validate the block in the mining process.
  • Data: contains the transactions data.
  • Previous hash: it is the hash of the previous block.
  • Hash: it uniquely identifies the block. It is typically calculated by taking the block’s data and metadata and applying the SHA-256 cryptographic hash function.
The block hash links two adjacent blocks

The chain of blocks is created because each block contains the hash of the preceding block. This linkage of hashes between blocks creates a continuous and unbroken sequence, where each block is cryptographically tied to its predecessor. As new blocks are added to the chain, they incorporate the hash of the preceding block, ensuring a chronological order of transactions and establishing the immutability and integrity of the entire blockchain ledger.

Blockchain Security

The security of the blockchain derives from the fact that if a hacker attempted to modify a block, such as the grey one, then the subsequent block, the green one, would lose its connection because the previous hash on the green block would no longer match the hash of the grey block. Consequently, the blockchain in the upper node would differ from the one in the lower node.

In reality, the blockchain consists of thousands of nodes, each possessing an identical copy of the blockchain. Therefore, to determine the correct blockchain in the event of a block tampering by a hacker, it would suffice to ascertain which version of the blockchain is the most prevalent among all nodes.

Transaction execution

Transaction execution

If I wanted to send 1 BTC to another user, what is the process that the transaction follows?

  1. The user creates a transaction using software or an application called a wallet. The transaction contains the amount, the destination address (recipient’s wallet address), and a digital signature to prove ownership of the funds.
  2. The transaction is transmitted to the network, and full nodes verify its validity, checking the balance and the user’s signature.
  3. The transaction is added to a pool of unconfirmed transactions, called the mempool, where it waits to be included in a block by a miner node.
  4. A miner node, selected based on a consensus algorithm, selects a group of transactions from the mempool, aggregates them into a new block, and adds it to the blockchain.
  5. The new block is propagated to other nodes, which validate it and add it to their own copy of the blockchain.
  6. The transaction is now confirmed and recorded on the blockchain, which means it is irreversible and visible to everyone. The user can check the status of the transaction using a blockchain explorer.

Consensus

Unlike a centralized system, such as a database, where a single entity has the power to make changes at will to the system, in a distributed system, like the blockchain, how can we find agreement among nodes that do not know each other and have no basis for working together?

  • A consensus mechanism is a process that enables participants (nodes) of the blockchain to reach an agreement on which node has the privilege to add a new block to the blockchain.
  • It ensures that all nodes have the same version of the distributed ledger and that only valid transactions are added to the blockchain.
  • The consensus algorithm is what provides security and fault-tolerance to the network, preventing malicious actors from altering data or destroying the system.

The most famous consensus mechanisms are:

  • Proof of Work (PoW): This algorithm requires miner nodes to solve a complex mathematical problem to create a new block. Specifically, each miner attempts to guess the nonce value, starting from zero and incrementing it with each trial, in order to generate a block hash below a certain threshold. Essentially, the block hash must have a specific number of leading zeroes. The miner node that successfully solves the problem first earns the opportunity to add the block to the blockchain and receive a reward. Proof of work, also known as mining, is used by Bitcoin and other cryptocurrencies but requires high energy consumption.
  • Proof of Stake (PoS): This algorithm assigns the right to create a new block to a node based on the amount of cryptocurrency held at stake, or locked as a deposit. Unlike PoW, there is no work done by the node to solve a mathematical problem; it simply creates a new block. The more cryptocurrency at stake, the greater the chance of being selected. PoS is more energy-efficient and scalable than PoW, but it can introduce security and governance risks. It is the consensus mechanism adopted by Ethereum.

Economic incentives for validators and miners

Running a node incurs a cost, and for this reason, economic incentives have been provided to validators and miners in the blockchain.
For example, miners in Bitcoin are rewarded in two ways:

  • With the coinbase, which is the amount of new Bitcoin created after a block is mined (currently 3.125 bitcoin)
  • With transaction fees: each transaction is associated with a fee that is paid to the miner.
    Similar rewards are also provided to validators in other blockchains.

Cryptocurrencies

To make the blockchain system economically sustainable, cryptocurrencies have been created. Each blockchain has its own cryptocurrency, which is the native currency of the blockchain. For example, bitcoin is the cryptocurrency of the Bitcoin blockchain, while ether is the currency of the Ethereum blockchain.

Cryptocurrency serves as a medium of exchange: it is a digital currency that enables transactions and payments within the blockchain network.

Users can transfer cryptocurrencies to others as a form of payment for goods, services, or as a means of transferring value. Each blockchain has its own mechanism for creating cryptocurrencies: for example, in Bitcoin, they are only created as a result of mining each block, making them a reward for the miners’ work in solving the mathematical problems associated with the proof of work consensus mechanism.

Most important blockchains

Bitcoin

Bitcoin, the first blockchain created in 2008 by Satoshi Nakamoto, it is also the largest blockchain per market capitalization. Its native cryptocurrency is bitcoin (BTC), and it is primarily designed as a new form of payment, facilitating transactions between users across the globe.

To learn more about Bitcoin, I recommend reading this book.

Additionally, you can explore the economic aspects of Bitcoin through this story: Bitcoin: A revolutionary Currency for the Digital Economy

Ethereum

Ethereum, conceived in 2013 by Vitalik Buterin, stands as the second blockchain ever created. It ranks second in market capitalization behind Bitcoin. The native cryptocurrency of the Ethereum blockchain is Ether (ETH).

Beyond serving as a medium of exchange, Ethereum was designed to enable the deployment and execution of smart contracts, allowing for the execution of code written in the Solidity programming language directly within the blockchain. This capability has revolutionized the digital landscape by facilitating the creation of both fungible and non-fungible tokens (NFTs).

Also if you want to learn more about Ethereum I suggest you this book.

Smart Contracts

Example of a smart contract

Ethereum has pioneered a new avenue in the blockchain realm: the ability to code using a language called Solidity and deploy it onto the blockchain. Users can interact with the deployed code, giving rise to a new paradigm of decentralized applications (DApps) where the backend logic resides on the blockchain network rather than centralized servers.

If you want to learn more about smart contract development on Ethereum, I suggest you check out these two stories:

Blockchain Application Areas

Blockchain technology has a wide range of applications across various industries. Here are the main areas where blockchain is making an impact:

  1. Healthcare: blockchain enhances healthcare by securely managing patient records, ensuring data integrity, and enabling interoperability among different healthcare providers.
  2. Finance and Banking: in the financial sector, blockchain streamlines cross-border payments, reduces fraud, and improves transparency in transactions.
  3. Real Estate: with blockchain, the entire real estate transaction process can be digitized with enhanced security and benefits. Smart contracts can be executed between the seller and the buyer of assets for all transactions, thereby eliminating the need for intermediaries.
  4. Retail: retailers use blockchain for supply chain management, ensuring product authenticity, and tracking goods from manufacturer to consumer.
  5. Supply Chain and Logistics: blockchain improves supply chain efficiency, traceability, and reduces fraud by recording every step of a product’s journey.
  6. Insurance: the insurance industry benefits from blockchain by automating claims processing, preventing fraud, and enhancing transparency.
  7. Voting and Governance: blockchain can revolutionize voting systems by ensuring secure and verifiable elections.
  8. Internet of Things (IoT): IoT devices can securely communicate and transact using blockchain, enhancing data privacy and trust.
  9. Media and Advertising: blockchain enables transparent ad tracking, content licensing, and fair compensation for creators. It can also help combat copyright violations.
  10. Intellectual property: blockchain can help manage copyrights by providing an immutable proof of the complete chain of ownership and ensuring fair compensation and efficiency in the execution of copyrights and related rights.
  11. Food and agricolture: blockchain will help reshape existing supply chains, payments, and tracking processes. The distributed ledger provides an immutable record of events from the purchase of seeds and raw materials to the harvesting of crops and the supply of food products for sale, reaching consumers.
  12. Travel and hospitality:
    The key features of blockchain help maintain a distributed database of records, enhance security, eliminate the need for third parties, and improve the ease of accessing information from anywhere.

These applications demonstrate how blockchain technology is reshaping industries by providing trust, security, and transparency in a decentralized manner

Blockchain Limitations

The blockchain is a groundbreaking innovation, but being in its early stages, it has to contend with some limitations.

Scalability

Bitcoin can process 3 to 7 transactions per second (tps), whereas Ethereum manages 15 tps. Visa, in contrast, handles around 1736 tps, highlighting the considerable gap between blockchains and traditional systems. Moreover, increased transactions can congest blockchains, resulting in slower confirmation times. Possible solutions are:

  • Layer 2 Solutions: Implement off-chain scaling solutions like the Lightning Network for Bitcoin or rollup technology for Ethereum. These allow for faster, low-cost transactions without burdening the main blockchain.
  • Sharding: Divide the blockchain into smaller, interconnected shards, each handling a subset of transactions. This improves parallel processing and scalability.
  • Optimized Consensus Algorithms: Explore alternatives to PoW (e.g., Proof of Stake, Delegated Proof of Stake) that enhance scalability.

Energy Consumption

The mining of Bitcoin uses approximately the same amount of energy as Argentina, according to the Bitcoin Energy Consumption Index, and at that annual level of 131.26 terawatt-hours, cryptocurrency mining would rank among the top 30 countries for energy consumption. Possible ways to overcome this issue are:

  • Transition to Proof of Stake (PoS): PoS consumes significantly less energy by replacing miners with validators who stake their own tokens.
  • Hybrid Approaches: Combine PoW and PoS to balance security and energy efficiency.
  • Green Mining Practices: Encourage miners to use renewable energy sources.

Security and Privacy Risks

Despite the blockchain’s reputation for security, in recent years, numerous cyberattacks have occurred, resulting in significant financial losses and even business closures. For example, Bitfinex lost 72 million dollars in Bitcoin in 2016, Tether lost 31 million dollars in 2017, and Mt. Gox lost 840,000 bitcoins.
It is necessary to adopt stronger security measures to protect against cyberattacks and unauthorized access.

Other vulnerabilities exist, including smart contract bugs, 51% attacks, and private key management issues. Possible solutions are:

  • Formal Verification: Use formal methods to mathematically prove the correctness of smart contracts.
  • Auditing and Code Reviews: Regularly audit smart contracts for security flaws.
  • Multi-Signature Wallets: Enhance private key security by requiring multiple signatures for transactions.

Privacy

Public blockchains reveal transaction details to all participants. Possible solutions are:

  • Zero-Knowledge Proofs (ZKPs): Implement ZKPs to prove the validity of transactions without revealing specific details.
  • Confidential Transactions: Encrypt transaction amounts to enhance privacy.
  • Sidechains and Private Blockchains: Use separate chains for sensitive data while interacting with the main public blockchain.

Regulation and Legal Challenges

Blockchain operates across borders, making regulatory frameworks complex. Possible solutions are:

  • Collaboration with Regulators: Engage with regulatory bodies to create clear guidelines.
  • Self-Regulatory Initiatives: Industry associations can establish best practices.
  • Jurisdictional Clarity: Define which laws apply to blockchain activities.

Further Exploration

If you’ve found the subject intriguing and wish to expand your understanding, I recommend exploring the following insightful pieces to enhance your knowledge:

Conclusions

In summary, blockchain offers unparalleled transparency, security, and decentralization across various sectors. From finance to healthcare, its applications promise efficiency and trust in data management. While facing scalability and regulatory hurdles, ongoing innovations, such as layer-2 and regulatory frameworks, are enhancing its potential. As blockchain evolves, its transformative impact on industries and societies is set to redefine how we transact, store data, and trust in the digital era.

Resources

--

--