Introduction to blockchain technology
Discover the basics of blockchain technology.
Last updated
Discover the basics of blockchain technology.
Last updated
When we operate in the traditional financial world, we do so through entities such as banks, brokers, investment funds, etc., trusting that if, for example, we want to access our assets at a given time, we will be able to do so. This is generally the case, but there are numerous examples of when this does not happen. Although trust is a very important pillar in the business model of these institutions and there are laws and regulatory frameworks, there is nothing at a fundamental level that obliges these institutions to honor the trust we place in them. This is precisely one of the problems that blockchain addresses: the ability to eliminate the need for a central authority, thereby increasing security and transparency for the processing and validation of transactions.
A blockchain is essentially a distributed and immutable ledger in which transactions are recorded and grouped into blocks, with each block referencing the previous one, effectively forming a chain of blocks.
This definition may seem a bit cryptic, so let's break it down further:
Ledger: This is a list of all transactions recorded since the start of operations of a blockchain. If a transaction is not in the ledger, it does not exist (i.e., if someone makes a payment and for some reason that transaction is not added to a block, then that payment did not occur). A future article will cover transactions in detail, but for now, you can consider a transaction as a record of a payment from an account A to an account B.
Distributed: The blockchain is not hosted on a single machine; instead, each node participating in the network has a copy of this ledger.
Immutable: Once a block is written, it is extremely difficult to change. This is because the blockchain is a ledger where blocks can only be added, not edited, and each block is identified by a hash.
Blockchain is just the technology; it does not pertain to any particular network like Bitcoin or Ethereum, which are examples of public blockchains. However, they can also be implemented privately for internal use within a company, in which case the usage is restricted.
Since there is no central authority that decides which blocks are added and with which transactions, a mechanism is needed so that no node can alter the state of the blockchain without the consensus of the other nodes (also known as validators).
This mechanism is called a "consensus mechanism", and two of the most well-known are proof of work and proof of stake.
Allow me to make a brief parenthesis and explain what a hash function is:
A hash function takes an input of arbitrary size and returns a fixed-size string (known as a hash). For the same input, you always get the same output, meaning the function is deterministic, and it is also irreversible, which means that for a given hash, you cannot determine what the input to the function was.
Proof of work involves finding a hash with particular characteristics (for example, the first 20 numbers are 0). Since there is no way to find the input of the function from the hash, the only alternative is to repeatedly invoke the function with many arguments until it is resolved, which is computationally intensive. When a node finds an input for this function that satisfies the condition, it passes it to the others (who validate it with minimal effort) and the block is added to the chain. Those who solve this algorithm are called "miners", and the Bitcoin network is the most popular that uses this consensus mechanism. The magnitude of the electricity consumption required for this task is such that some countries have banned cryptocurrency mining in their territory.
Proof of Stake
The other consensus mechanism we'll mention is proof of stake. In this case, validators are chosen based on the amount of assets they lock. The more assets locked the higher probability of being chosen to add the next block. The incentive to include genuine transactions is that if the node chosen as a validator wants to add a block with false transactions to the chain, it risks being penalized and losing the locked assets. An example of a network that uses this mechanism is Ethereum.
Problems Addressed by Blockchain / Benefits (compared to traditional transaction processing systems)
Greater Transparency and Traceability: This means that the transaction history is public and can be scrutinized.
Protection Against Cyber Attacks: As the information is distributed, it is difficult to carry out an attack.
Real-time Access to Accurate Data
Increased Speed and Efficiency: The transaction is completed once the block is closed (within seconds or minutes).
Reduction of Operational and Transactional Costs: no intermediaries.
If you paid attention, you would have noticed that so far we haven't even mentioned the word "crypto". Although finance is the most popular and widespread use case (and by this, I mean products that promise earnings to users), it is by no means the only use of this technology. Another very important use is the ability to send money from one country to another, minimizing costs (as is the case with remittances). It can also be used in logistics, supply chain management, health records, voting systems and governance, among others.
Recently, so-called "smart contracts" have gained popularity. These are nothing more than programs with arbitrary code that are stored and executed on the blockchain.
With smart contracts:
The need for intermediaries is eliminated, thus reducing costs.
Transparency: Because the terms and conditions of the contract are visible to all parties involved.
Increased Security: Once the smart contract is stored on the blockchain, it is very difficult to alter it through an attack.
The result of executing a smart contract is a transaction that is recorded in the ledger.
As the blockchain network has finite resources and cannot quickly scale in response to a sudden demand for resources (unlike cloud hosting services, which can scale horizontally and/or vertically), it needs a way to regulate the consumption of computational resources and it does so by charging a fee or commission. Therefore, the invocation of a complex smart contract that requires intensive use of resources will incur a higher fee than an ordinary transaction, even if the result is just a simple payment.
Depending on the network:
High Fees: Fees can be very high, making small payments unfeasible.
Scalability: The consensus mechanism affects the block closing time, which directly impacts the number of transactions that can be processed per unit of time.
Energy Consumption: As mentioned earlier, regarding the proof of work consensus mechanism.
Earlier, we said that the blockchain is immutable: The blockchain is not invulnerable because there are scenarios in which it can be modified:
Design Flaws and Bugs: If the blockchain has a design problem and contains exploitable bugs.
51% Attack: This occurs when a person or organization gains control of more than half of the validating nodes (or 51% of the hash mining rate, as the case may be). In theory, they could add blocks with false transactions that would be accepted into the blockchain because the majority of validators agree. This is very difficult to achieve—imagine possessing half of the total computing power dedicated to mining bitcoins worldwide—it's an enormous amount. Even in this scenario, it remains extremely difficult to change previous blocks without resorting to what is known as a fork, making such attacks highly unlikely.