The Technology Behind Drex: A blockchain Guide
Explore strategic insights and practical guidance for advocating the adoption of Drex solutions within your financial institution. Learn how to leverage the unique benefits and financial advantages they offer, aligning with the transformative potential of blockchain technology and the Central Bank of Brazil's model to drive impactful change in the financial landscape.
Introduction
The transition to digital finance, highlighted by the adoption of Drex, requires a clear understanding of blockchain technology. Knowing how blockchain works is crucial for effectively managing Central Bank Digital Currencies (CBDCs) and realizing their potential to modernize financial services in Brazil and elsewhere. A firm grasp of blockchain helps stakeholders make knowledgeable decisions, drive innovation, and contribute to the ongoing evolution of financial systems. For Brazil, adopting Drex and its foundational technology is a step towards enhancing the digital finance landscape, promoting a more dynamic and competitive financial sector.
History of Blockchain
Blockchain technology's origins are contested. Cryptographic systems (similar to how blockchain works) can be traced back to 1991 when researchers W. Scott Stornetta and Stuart Haber began exploring cryptographically secure chains of blocks. Their innovation aimed to create a system where document timestamps couldn't be tampered with, ensuring the integrity and veracity of digital records. This foundational work introduced the world to the concept of a continuous, secure chain of data, marking the beginning of blockchain technology.
Years later in 2004, Hal Finney introduced the Reusable Proof of Work (RPoW) system. Finney's mechanism addressed double-spending in digital currency transactions by maintaining token ownership on a trustworthy server. This development emphasized the potential of blockchain-like technology beyond secure document storage, hinting at its applicability in creating a decentralized financial system.
Four years later, in 2008, during the Financial Crisis in the United States, an important moment in blockchain's history came with Satoshi Nakamoto. Nakamoto proposed a distributed blockchain system that allowed for the addition of new blocks without the need for validation by trusted parties. This design ensured a decentralized and secure method of recording data transactions, fundamentally changing the nature of digital trust.
The following year, Nakamoto released a whitepaper detailing this decentralized system, which laid the groundwork for the development of digital currencies. The paper highlighted how blockchain's decentralization meant that control over the system was distributed among its users, enhancing the technology's potential to facilitate trust in digital interactions.
These milestones in blockchain technology have directly influenced the development of all sorts of blockchain solutions in every single industry. This directly influenced the development of Central Bank Digital Currencies (CBDCs), such as Brazil's Drex. By leveraging the secure, transparent, and efficient nature of blockchain, Drex aims to modernize Brazil's financial infrastructure, offering a digital currency that embodies the trust, stability, and accessibility needed for today's digital economy. This journey from the conceptual stages of blockchain to the practical application in CBDCs like Drex showcases the evolution of digital finance and the significant role blockchain plays in shaping the future of monetary systems worldwide.
The Four Types of Blockchain
Following the development and application of blockchain technology in creating CBDCs like Drex, it's essential to understand the various types of blockchains that exist. It is important to know that each type serves different purposes and has distinct characteristics. Broadly speaking, here are the four primary types:
- Public Blockchains: These are open, decentralized networks where anyone can participate without needing permission. They allow users to request or validate transactions, with validators often receiving rewards for their contributions.
- Public blockchains use consensus mechanisms like proof-of-work (PoW) or proof-of-stake (PoS) to secure the network and validate transactions. Examples include the Bitcoin and Ethereum blockchains.
- Private Blockchains: Contrary to public blockchains, private blockchains are permissioned and centralized to some extent. Access to these networks is restricted, requiring permission from the network administrator. They are typically governed by a single entity and are used for more controlled environments where privacy and speed are priorities. More common in the enterprise sector due to privacy concerns.
- An example of a private blockchain is Hyperledger.
- Hybrid Blockchains or Consortiums: These blockchains blend elements of both public and private blockchains. They offer a decentralized structure while also providing controlled access and permissions. This setup allows for centralized and decentralized features, making hybrid blockchains suitable for businesses that require privacy for their transactions but also want to maintain some level of transparency.
- Examples include Energy Web Foundation
- Sidechains: Sidechains are distinct blockchains that are attached to a parent blockchain using a two-way peg, allowing assets to be interchangeable between the main chain and the sidechain. This setup enhances scalability and efficiency by offloading transactions from the main network to the sidechain. Sidechains can have their own consensus mechanisms and security protocols, offering flexibility in their design.
- An example of a sidechain is the Liquid Network.
Understanding these blockchain types is crucial for grasping the broader implications of blockchain technology in various applications, including its role in the implementation and functioning of CBDCs like Brazil's Drex. Each type offers different advantages and use cases, contributing to blockchain technology's diverse and evolving landscape.
Note: As of right now, the Brazilian Central Bank has chosen Hyperledger Besu (Open-Sourced enterprise blockchain that can be deployed in both public and private network configurations) as the main blockchain for the Pilot Program. Depending on the technical results and feedback from the pilot community, they may or may not move forward with it in the implementation phase.
Blockchain and Drex
Drex stands as the Brazilian Central Bank's strategic initiative to create a digital version of the Brazilian Real. By leveraging the principles of blockchain, Drex aims to ensure secure, transparent, and efficient financial transactions on a digital platform. This initiative is not merely about creating a digital currency but about redefining financial transactions to be more inclusive, efficient, and suited to a digital economy. As such, Drex embodies the practical application of blockchain technology in a governmental financial instrument, aiming to streamline and modernize Brazil's financial infrastructure.
Understanding Blockchain Technology
We are going to break down the core characteristics of Blockchain to understand its mechanics and workings better. We are going from a large view to a micro view and dissecting core features. With a focus on traditional blockchain, and not on alternative blockchain solutions like Polygon, Avalanche, Ethereum
Macro View
If you look from the outside, into the blockchain, you will see a couple of things. The Ledger, the Node, and the Wallet.
Ledger: The blockchain ledger is a digital record that records all the transactions made within the network. It comprises interconnected blocks, each containing a list of transactions. The ledger is maintained across multiple nodes to ensure transparency and security. There are three types of ledgers:
- Public Ledger: Open and transparent, a public ledger allows anyone in the blockchain network to read or write data, making every transaction visible to all participants.
- Distributed Ledger: In a distributed ledger, each node holds a copy of the database. Collaboration among nodes is required to validate transactions and add new blocks to the blockchain, distributing the workload and enhancing security.
- Decentralized Ledger: This type of ledger operates without a central authority. Every node participates equally in processing transactions and maintaining the ledger, ensuring a democratic and secure transaction environment.
Wallet: A blockchain wallet, or digital wallet, is a software application that enables the holding, sending, and receiving of digital currencies. Wallets are associated with nodes on the blockchain network and use cryptographic key pairs (public and private keys) to secure transactions and holdings. From a consumer perspective, this is one of the ways a business or an individual can see the ledger and within it, the historical transactions, as well as the Node–depending on the blockchain solution.
Node: Nodes are the individual computers or devices that form the blockchain network. Their responsibilities include validating and relaying transactions, adding new blocks to the blockchain, and maintaining an accurate and complete copy of the entire blockchain.
Refining the View: The Block
Block: At the core of blockchain technology is the block. It serves as a storage unit for batches of transactions that the network has validated. Once a block is added to the blockchain, the information it contains is considered immutable, meaning it cannot be altered or deleted. Within the Block, you will find two core things, the Header: which contains the metadata data of the block itself, and the Body: which is the actual information of the transaction and the other data of the block.
What about the ‘Chain of Blocks’?
Blocks in a blockchain are linked chronologically through hashes, unique identifiers derived from each block's data, including the hash of the previous block. This link forms a secure and unalterable chain. Altering any block's data would require changing the hashes of all subsequent blocks, a task that is computationally prohibitive, ensuring the blockchain's integrity. The sequential structure allows for the easy verification of transaction histories and maintains the blockchain's reliability and security.
Microview: Inside the Block
Block Header:
The Block Header contains metadata about the block itself and is used to support the network’s security and integrity. It is designed to contain information that helps in the verification and linking in the blockchain, and not the specific details of the transactions themselves.
Previous Block Hash:A blockchain hash serves as a unique identifier for a document or data set, enabling the verification of information integrity. It is produced through a cryptographic process that compares new data entries with a previously established hash value, ensuring that the data remains unaltered. This mechanism is fundamental in maintaining the security and trustworthiness of digital transactions.
Merkle Root: A single hash that represents all the transactions included in the block. The Merkle root is the outcome of a Merkle tree, a hierarchical data structure that summarizes the transactions in a block efficiently and securely. This allows for quick and easy verification of individual transactions without needing to review each one.
Timestamp: Records the time when the block was created. This not only provides a chronological order of blocks but also plays a role in the mining process, as it affects the block hash.
*Nonce (Number used only once): A nonce in blockchain technology is a number that blockchain miners seek to find or calculate to solve a cryptographic problem, allowing them to add a new block to the blockchain. It’s a one-time-use value that ensures the block’s hash meets the network’s difficulty target, making the block and its transactions valid and securing them against tampering.
Note: Nonce is primarily used in the Proof-of-Work Consensus Mechanism, which is often the case in public blockchains like Bitcoin. In the context of Drex and its chosen blockchain (Hyperledger Besus), it uses a combination of consensus mechanisms that is suitable for the consortium environment. For more information, please visit the Hyperledger Foundation page.
Block's Body:
The block body contains the actual data processed by the blockchain, primarily consisting of:
- Sender's Address: The digital address from which the tokenized asset is being sent.
- Receiver's Address: The digital address to which the tokenized asset is being sent.
- Digital Signature: A cryptographic signature generated by the sender's private key. This verifies the transaction's origin and ensures that the transaction has not been tampered with since it was signed.
- Digital Signature: A cryptographic signature generated by the sender's private key. This verifies the transaction's origin and ensures that the transaction has not been tampered with since it was signed.
- Tokenized Asset Information:
- Asset Type: Specifies what type of asset is tokenized (e.g., real estate, artwork, securities).
- Asset Identifier: A unique identifier for the tokenized asset, which could be a serial number, a property address, or a registration number, depending on the asset type.
- Quantity: The amount of the tokenized asset being transferred, which can vary based on whether the asset is fungible (like cryptocurrencies or certain types of securities) or non-fungible (like unique pieces of art or specific real estate properties).
- Token Standard (if applicable): For blockchains like Ethereum, the transaction might specify a token standard such as ERC-20 for fungible tokens or ERC-721 for non-fungible tokens (NFTs). This standard defines the rules and functions that the tokenized asset follows within the blockchain.
Bonus: Smart Contracts and Consensus Mechanism
Both Smart Contracts and the Consensus Mechanism are core to what makes the blockchain a blockchain.
- Consensus Mechanism: Essential to the function of a blockchain, the consensus mechanism is a protocol that ensures all nodes in the network agree on the ledger's current state. It safeguards the blockchain's integrity, allowing the network to achieve agreement and maintain a unified ledger without a central authority. There are a couple of consensus mechanisms, such as Proof of Work (Pow), Proof of Stake (PoS), Practical Byzantine Fault Tolerance (PBFT), and many others. It all depends on the core technical needs of a use case
- Smart Contract: A smart contract is a self-executing computer program stored on a blockchain that automatically enforces the terms of an agreement between parties without the need for a third-party intermediary. Introduced by Ethereum's creator, Vitalik Buterin, smart contracts are crucial for blockchain's ability to support a wide range of applications beyond simple cryptocurrency transactions.
Bonus: Layer 1 and layer 2
If you have studied blockchain solutions, you might’ve come across the terms Layer 1 & Layer 2 somewhere.
Layer 1 is a term used in the blockchain industry to refer to the foundational blockchain network that serves as the base infrastructure for a blockchain ecosystem. Ethereum, Avalanche, and Algorand are some examples. It is responsible for executing and finalizing all on-chain transactions, maintaining the distributed public ledger, and providing the core functionality of the blockchain.
Layer 2 refers to off-chain networks, systems, or technologies that are built on top of the base blockchain infrastructure (Layer 1) to enhance its capabilities and improve scalability. Many privacy solutions are being built on top of Hyperledger Besu, Bacen’s chosen blockchain, to solve privacy and scalability issues.
The Process of Blockchain
Now that we have talked about what is inside a block of a blockchain, we need to understand the practical process of the blockchain. Take into consideration that the example below is a broad example of how blockchain works, similar to what you may see with Ethereum. It doesn’t take into consideration the countless options of Layer 2, which could add 2 to 3 more steps depending on the solution. We will focus the process considering the Drex context.
1. Transaction Initiation: The process begins when a user initiates a transaction, which could involve transferring digital assets, executing smart contracts, or recording information. This action creates a digital transaction message that includes the transaction's details, such as the sender's and receiver's addresses and the amount being transferred.
2. Transaction Broadcasting: Once a transaction is initiated, it's broadcast to the network and received by nodes. Each node collects and stores a pool of unconfirmed transactions it has received from the network. These transactions wait in the pool until they are picked up by a node for validation.
3. Transaction Validation: Nodes play a critical role in validating transactions. Depending on the blockchain's consensus mechanism, nodes may compete (as in Proof of Work) or cooperate (as in Proof of Stake) to validate transactions. Validation involves verifying the legitimacy of the transaction, such as ensuring the sender has sufficient balance for a transfer and that the transaction hasn't been tampered with.
4. Block Creation: Once a transaction is validated, it's grouped with other validated transactions to create a new block. The content of a block typically includes a list of transactions, a reference (hash) to the previous block, and a unique solution to a cryptographic challenge (in blockchains that use Proof of Work).
5. Block Validation and Addition to the Chain: The newly created block then undergoes validation according to the blockchain's consensus mechanism. In Proof of Work, for example, this involves solving a complex cryptographic puzzle. The first node to solve the puzzle broadcasts the new block and its solution to the network. Other nodes then verify the solution and, upon agreement, add the new block to their copy of the blockchain, making the transactions it contains final and immutable.
6. Continuous Growth and Consensus Maintenance: As more transactions occur, more blocks are created and added to the blockchain, forming a chain of blocks from the Genesis block to the most recent one. Through consensus mechanisms, the network ensures that all copies of the blockchain are synchronized and identical, preserving the integrity and history of all transactions.
Core Blockchain Principles for Drex
Understanding Smart Contracts
Smart contracts are self-executing contracts with the terms of the agreement directly written into code. Within the blockchain framework supporting Drex, these contracts enable the automatic execution of transactions and agreements without the need for intermediaries, ensuring efficiency, transparency, and trust. Their application in Drex extends to automating payment processes, enforcing agreements, and streamlining operations across the financial ecosystem.
The Role of Tokenization
Tokenization is the process of converting rights to an asset into a digital token on a blockchain. This innovative approach facilitates secure and efficient asset management within the Drex platform. By tokenizing assets, Drex allows for fractional ownership, increased liquidity, and broader accessibility, transforming how assets are bought, sold, and managed. The integration of tokenization into Drex underscores its significance in revolutionizing asset management and expanding investment opportunities in the digital economy.
Want to learn more about Tokenization? Visit Tokenization Explained: the Complete Guide