MENTAL
 Main Menu
 Comparisons
 MENTAL vs. Blockchain


MENTAL vs. blockchain
 MENTAL vs.
BLOCKCHAIN

"Blockchain: the technology that will change your life" (Guillermo Vega and Olivia López Bueno).

"I think decentralized networks will be the next big wave in technology" (Melanie Swan).

"I think Bitcoin has the potential to change the world" (Peter Thiel).



Blockchain Technology

Blockchain technology is a new technology that appeared in January 2009 with the introduction of bitcoin (abbreviated as BTC), a digital cryptocurrency, virtual currency or token. Since then it has been developing and being implemented in other applications because it is recognized as a technology with immense possibilities, to such an extent that it is considered the next industrial revolution. The vast majority of Blockchain applications are yet to be designed and even imagined. It is considered that its impact will be as great as the irruption of the PC (1975) and the Internet (1993).

Blockchain technology is a leap in the evolution of the network: from the internet of information to the Internet of Value (IoV). The Internet of Value is based on the digital recording of transactions of goods and services between two users without the need for a trusted third party to validate the transactions. A value can be money, a contract, a property record, an academic degree, etc.

Just as the Internet of information has radically changed our lives, it is believed that the Internet of value can revolutionize the way we interact, relate to each other and understand the world. In short, it is a new paradigm, a conceptual, technological and social leap.

Blockchain technology is evolving very rapidly. When it reaches critical mass, its expansion will be exponential, as has happened with PCs, cell phones and the Internet itself. Governments and companies are investing a lot of resources in driving this new technology.

In 2016, the Global Blockchain Forum, an initiative of the Chamber of Digital Commerce, was created. In January 2017, the World Economic Forum predicted that by 2025, 10% of global GDP will be stored using Blockchain or related technology.


What exactly is a blockchain?

A blockchain is a database in which records associated with transactions of participating users' securities are stored sequentially and chronologically.
Types of Blockchains

Blockchains can be public (such as Internet), private (such as Intranet) or mixed. Banks and financial institutions are betting, above all, on private Blockchains. Internet technology giants such as GAFA (Google, Apple, Facebook, Amazon) prefer public Blockchains.


Bitcoin

The financial sector has been the first to take the lead in the application of Blockchain technology, although all other sectors are exploring its full potential.

It all started on October 31, 2008 when an unknown author named Satoshi Nakamoto (assumed to be a pseudonym for a person or the name of a group or entity) posted an announcement on the mailing list of the website www.metzdown.com dedicated to cryptocurrency. It described a payment (money transfer) system that allowed its users to protect their identity through the use of asymmetric key cryptography, a decentralized database validated by consensus through a proof-of-work performed by the system's nodes.

Nakamoto released a new protocol "A peer-to-peer electronic cash system", using a cryptocurrency called "bitcoin". A cryptocurrency differs from a traditional currency in that no government controls it. Bitcoin is a cryptocurrency oriented to money transfers (national and international), remittances and payments in general in the purchase and sale of goods and services.

In his original article, Nakamoto used the words "block" and "chain" separately. In 2016, the two words were merged, which helped to boost its image and diffusion.

Bitcoin is based on a public Blockchain. Any person or entity can become a user and validator of transactions, and become part of the network as a node.

With bitcoin, a standard of interoperability between financial entities was created with great benefits: One bitcoin is divided into 1000 millibits and one millibit into 105 satoshis. Therefore, 1 bitcoin is 100 million satoshis.

The estimated value of the total bitcoin market is estimated to be between $5 billion and $10 billion. The first transaction involving bitcoins occurred on May 22, 2010, in which 10,000 bitcoins were offered for a pizza. The largest transaction processed so far by the network was $150 million.

Bitcoin is not a company. It is open source software that anyone can view, contribute to or use. Bitcoin is a cultural shift to a decentralized world.


The Bitcoin protocol

In general, a communication protocol is a system of rules that allow two or more computers to communicate with each other to transmit information.

Nodes in a Blockchain network use the same communication protocol to communicate with each other. Well-known communication protocols are TCP/IP (Internet), SMTP (email exchange) and HTTP (information transfer on the Web). These protocols have made it possible to create the Internet of information. The Bitcoin protocol opens the door to a new protocol for decentralized communications.

It is necessary to differentiate between Bitcoin protocol (with a capital "B") and bitcoin (with a lowercase "b"), which is the cryptocurrency.

The Bitcoin protocol was created with the aim of having a decentralized system of monetary transactions that would be controlled by a community of users without the need for a centralized trusted third party entity. In this way, commercial banks or central banks could be dispensed with.

Hacktivism, cyberpunks and cypherpunks (among other philosophical and social movements) are at the origin of the Bitcoin protocol. They sought a new form of the Internet, greater freedom, privacy protection and a decentralized view of the authority and use of anonymous money.

Hacktivism promotes secure communications between people in different countries and resistance to government espionage, as well as freedom of expression, the ability to criticize the established system without fear of reprisal.

A cyberpunk is a person who is an exacerbated defender of freedom of expression, freedom of information and privacy of communications. He believes that every user should have power and control over their data and actions in the digital world.

From the cyberpunks derived the cypherpunks, who saw in cryptography the technology to achieve those goals in the digital world. The most representative or well-known example is the Anonymous movement.


The cryptography of the Bitcoin protocol

Cryptography is the art of transforming a readable message into an unreadable one. This process is called "encryption", and the opposite process is "decryption".

There are three types of cryptography:
  1. Hashing.
    It involves "hashing" ("hash" means to chop or grind) a message of any length until a fixed-length sequence of characters (the hash) is obtained. It is a kind of fingerprint of a message or document. The hash is obtained by applying a function to the content of the message. Any modification of the content changes the resulting hash. The purpose of a hash is not to encrypt the content but to check its integrity: to verify that it has not been altered.

    The function hash is unidirectional, being practically impossible to perform the inverse function. An example of this type of function is integer factorization. Multiplying two prime numbers of hundreds or thousands of digits is easy for today's computers, but there is no known efficient algorithm for inverting the multiplication (recovering the initial two primes).

    The characteristics that a hash function must fulfill are: 1) computational efficiency; 2) difficulty in obtaining the original message; 3) difficulty for another different message to generate the same hash.

    The Bitcoin protocol uses cryptographic hash to uniquely identify a block of transactions.

  2. Symmetric cryptography.
    Symmetric cryptography uses a single key for encryption and decryption. The most commonly used algorithms are in the public domain, so security resides only in the key.

    A key and a password are not one and the same. Keys are usually generated randomly and are long. Passwords are short and are intended to be memorized by people.

  3. Asymmetric or public key cryptography.
    It uses two keys: one public and one private. The private key is kept secret by the user, and the public key is known to everyone.

    With the public key anyone can encrypt messages and only the recipient can decrypt them with his private key. Knowing the private key you can know the public key, but not the other way around. This is another example of a one-way function. The best known and most widely used public key algorithm is RSA, which is based on the multiplication of two prime numbers.
The Bitcoin protocol combines P2P technology with public key cryptography. It uses the hash SHA-256 (Secure Hash Algorithm of 256 bits). To increase security, Bitcoin applies the hash function twice, i.e., (SHA-256)2. The public key can be viewed as if it were a bank account number, and the private key as if it were the secret PIN.

Since the private and public keys have a complex format, Bitcoin addresses, which have a simpler, user-facing format, are used. Bitcoin addresses are strings of digits and letters that are generated from the keys.

For each user there is a private Bitcoin address and a public Bitcoin address. The private Bitcoin address gives access to the user's bitcoins (and must be kept secret). The public Bitcoin address is the recipient of the bitcoins. It is like an email address, but recipients not of messages, but of money. A user can have several Bitcoin addresses, just as he can have several email addresses.


Transaction process

A transaction is a data structure that indicates a transfer of an amount of bitcoins from a sender (owner of those bitcoins) to a recipient. The transaction is signed (with its private key) by the sender and goes from its wallet to a Bitcoin address of the recipient.

As Bitcoin transactions are fully public, any user (even outside the node network) can see the content of a particular Bitcoin address and even the flow of bitcoins from the genesis block to the last generated block.

A wallet is a software that stores a user's private key, public key, as well as their Bitcoin addresses. The wallet serves to send, receive and store the user's bitcoins. With an mn wallet it is possible to build transactions offline and send it later to be executed.

A transaction consists of one or more inputs (which are debits against a Bitcoin account) and one or more outputs (which are credits added to a Bitcoin account).

New transactions are quickly spread across the Bitcoin network from users' wallets and picked up by miners at the network's nodes, which are the ones that have to validate them. When they are detected by the network nodes, they are added to a temporary set of transactions pending validation.

A set of transactions are grouped into a block. When all of them are validated, the block is confirmed by adding it to the global distributed ledger (the blockchain). The block contains an additional transaction, corresponding to the reward received by the miner, with its own Bitcoin address.

Every 10 minutes on average, miners generate a new block containing the transactions that have been validated since the last published block. Each miner begins the process of validating a block of transactions as soon as it receives the last published block.

Each time a block is added to the blockchain it is a confirmation of the previous blocks. A block with 6 or more confirmations is considered irrevocable, because immense computational power is required to recalculate the next 6 blocks. A block is all the more reliable the more blocks that follow it in the chain. As the number of blocks increases, so does the computational difficulty for each new block and the chain as a whole.

Successively adding blocks to a given block is like "burying" it under new blocks. The deeper a block is, the more secure it is. And the shallower, the less secure.

A block consists of a header and a body. The body is a grouping of transactions. The header includes a timestamp and a fingerprint (hash) of the previous block header.


Bitcoin clients

There are three types of Bitcoin clients:
  1. Full client (or full node).
    Stores all Bitcoin transactions (the blockchain), manages user wallets, and can perform transactions over the network.

  2. Thin client.
    Stores users' wallets, but relies on third parties for transactions.

  3. Web client.
    Accesses the Bitcoin network via web browser and stores users' wallets on third-party servers.

Mining bitcoins

In any traditional monetary system governments print more money when they need it, without work. In contrast, bitcoins are created with work, with effort. Thousands of computers around the world mine bitcoins, competing with each other. Today this computer network is the most powerful in existence.

Bitcoins are created through a process called "mining". This process decentralizes the function of issuing coins without depending on a central entity. Mining bitcoins is equivalent to printing fiat currencies. Miners create new bitcoins with the reward obtained for each block published in the ledger. The amount of bitcoins created per block is fixed, but decreases over time.

Transactions are packaged into blocks, and miners validate the blocks. This validation process, called "proof of work," requires enormous computing power. Once the block is validated, it is confirmed by adding it to the blockchain.

Mining is like a competitive game. It is like a sudoku, which is difficult to solve, but easy to verify. Also, the difficulty can be adjusted, like the number of rows and columns and the number of filled squares of a sudoku.

The proof of work consists of solving a mathematical problem, which is always the same. It consists of finding a hash that has not appeared previously and that has a given structure. To do this, the SHA-256 cryptographic algorithm that satisfies the target of difficulty is executed iteratively. This algorithm uses the hash of the previous block header (the last published block) and a random number (nonce) chosen by the miners (a 32-bit value), which can only be used once, to ensure that each transaction can only be processed once.

The first miner to find the solution wins the round of competition and then publishes the new block on the ledger (the blockchain), earning the reward (in bitcoins) offered for each block published.

Initially (year 2009) and until 2012, the reward was 50 bitcoins per mined block. From July 2012 until 2016, the reward was reduced to 25 bitcoins per block. Currently the reward is 12, 5 bitcoins per block. This process is called halving (division by two) and is performed automatically every 210,000 blocks published raising the difficulty level of block validation. As a new block is published approximately every 10 minutes, halving takes place every 4 years and the reward tends to zero. The last block to be published will be rewarded with the smallest possible amount: one satoshi.

Currently 75% of the expected bitcoins have already been issued. The number of bitcoins will continue to grow until a limit value of 21 million coins is reached, which is estimated to happen around the year 2140. Bitcoin is therefore a deflationary system.

The Bitcoin solution with its PoW can also be applied for all types of transactions, not only monetary, to validate and confirm them without a central entity.

The value of bitcoin is calculated in real time based on supply and demand using an algorithm that measures the number of movements and transactions. Like any other currency, bitcoin fluctuates in value every second.

There are three ways to get bitcoins:
  1. The easiest way is to buy them through the bitcoin.com website or an ATM that allows you to exchange real coins for bitcons. There are already some ATMs of this type.

  2. Mining bitcoins.
    It involves using a part of our computer's resources to solve a complex mathematical problem.

  3. Exchanging objects or work for bitcoins.

Ethereum

Ethereum is a Blockchain platform launched in the summer of 2014. It was developed by a 21-year-old Russian-Canadian named Vitalik Buterin. It is a generic, distributed computing system that goes beyond monetary transactions. It is a network ready to support all kinds of Blockchain applications. It has additional software layers that makes it more generic than Bitcoin.

Ethereum really ushered in Bitcoin 2.0, or the Blockchain 2.0 project. Its currency is called ether (ETH), is similar to bitcoin, and block mining processes are also performed. Ether is the second most valued and used cryptocurrency in the world, after bitcoin. One ether is divided into smaller units called finney, stabo, shannon, babbage, lovelace and wei. Each unit is worth 1000 times the next.

Ethereum operates in a decentralized manner via a virtual machine called Ethereum Virtual Machine (EVM) embedded in each node's implementation. EVM allows Ethereum nodes to store and process data to perform transactions and respond to real-world events associated with smart contracts.

Ethereum has created a special language called Solidity, a hybrid language between JavaScript and C++, targeting smart contracts that runs on the EVM. It compiles to bytecode and runs on each node.

Ethereum was developed with Go and C++. Go is an open source language that allows you to create software simply, reliably and efficiently. C++ is an extension of C that allows object-oriented programming.

In March 2017, the Enterprise Ethereum Alliance (EEA) was created to coordinate and standardize the use of Ethereum.


Smart contracts

Ethereum allows for smart contracts. A smart contract is a peer-to-peer agreement with the ability to automatically self-execute when a condition or event foreseen in the contract is met. For example, automatic payment of indemnities, so there will be no need to claim anything. Another example is intellectual property rights, where authors would automatically monetize the uses of their creations.

Smart contracts bring a new decentralized vision of the sharing economy. For example, Uber and Airbnb could operate without centralized management.
Bitcoin vs. Ethereum
Decentralized autonomous organizations

A DAO (Decentralized Autonomous Organization) is a DO (Decentralized Organization) in which decisions are made by automated autonomous agents. A DAO is a company that operates in such a way that the business rules are public, in addition to being distributed among the shareholders' computers.

A DAO has, in addition to a decentralized database, has decentralized applications (Dapps). Ethereum is a good example of a DAO.


Ethereum and Ethereum Classic

In May 2016, a venture capital fund called "The DAO" was created for the development of autonomous decentralized companies. This fund detected security problems: a hacker found a way to steal several million dollars in ethers. The problem was that when new consensus rules are added, there may be inconsistent copies of the database on the nodes, i.e. there may be different versions at different times. This causes a fork of the blockchain. This fork has already occurred in Bitcoin due to a bug that allowed a user to steal a large amount of bitcoins.

As a consequence of this event, in July 2016, Ethereum was split into two active lines - Ethereum and Ethereum Classic, with two different exchange rates. Ethereum allows branching. Ethereum Classic rejects branching to preserve the consistency and immutability of the blockchain. The cryptocurrency of Ethereum Classic is "classic ether" (ETC). Today the price of ETH is much higher than ETC.


Applications

Blockchain can be applied to any value that can be translated into code. For example:
Future

In the coming years, Blockchain technology will play an important role, as it will enable secure transactions between all players in the value chain.
MENTAL vs. Blockchain

The world is moving unstoppably towards digitization and integration. Society will be digitized and hyper-connected, both between people and machines.

Citizens want intelligible, simple, ubiquitous and immediate data and processes. They demand a new model of public administration that is more transparent, efficient, more integrated into daily life, and a decentralized, more direct model of citizen participation. Decentralization implies democratization.

This requires transversal systems that connect a large number of vertical services with very different characteristics. This integration is complex, but would be simplified if all systems speak the same language.

The Internet democratized information. Blockchain democratizes value. Now it's about democratizing the formal language of communication with computers. MENTAL is the proposal: Blockchain is an important technology, but it is one more technology born without a common foundation and without it being a step towards unification. Unification has to come through a universal language that unifies data and processes, a universal language based on the archetypes of consciousness, i.e. on supreme conceptual simplicity.

Addenda

Bitcoin's open source

We must distinguish open source software from free software. Free software allows users to use, improve, adapt and/or redistribute the software in its original or modified form. Free software requires open source, but the opposite is not always true (there are cases where open source software cannot be modified).

The body that watches over the recognition of free software and the limits against open source software is the OSI (Open Software Initiative).

The Bitcoin protocol license is MIT License. It is an open source, free and copyleft license. Copyleft allows you to freely distribute copies and modified versions with the same rights as the original software. Any programmer can revise it or create his own modified version.


Merkle tree

Blockchain database blocks are linked in the form of a Merkle tree (Merkle hash tree). A Merkle tree is a structure where each interior node (non-final node) is the result of applying a hash function on the values of the child nodes, until it reaches the root node. It is a generalization of hash chains. In hash chains, the verification cost of an element is proportional to the number of hash in the chain. In a Merkle tree, the cost is proportional to the logarithm of the number of nodes in the tree.

The blocks of the Bitcoin blockchain form a binary Merkle tree. Blocks are grouped in pairs and a hash is generated for each block. These hash are in turn grouped into pairs and generate a new hash, which in turn is grouped with another, and the operation is repeated until the hash root is reached. For example, a 2-level Merkle binary tree of hash is:


The Merkle tree used in Ethereum is more complex than that of Bitcoin. Each node has 16 children.


The structure of a block in Blockchain

A block is divided into two parts: the header and the body.

The header of a block is 80 bytes and consists of 6 fields:
  1. The version of the software that generated the block.

  2. The hash of the header of the previous block (256 bits).

  3. A timestamp. Timestamp (date-time stamp) of block generation.

  4. The target. It is a parameter related to the Hashcash algorithm, i.e. mining difficulty. It marks the value below which the resulting hash must be to be valid. The number of zeros to the left of the hash is regulated according to the target, which in turn is regulated (recalculated) every 2016 blocks (approximately two weeks). The lower the target, the higher the mining difficulty.

  5. The nonce for PoW. It is a 32-bit number that is iteratively incremented until a hash is found that meets the condition expressed in the target parameter.

  6. The hash root of the Merkle tree (256 bits).
The body contains the transaction data.


The Hashcashalgorithm;

Hashcash is an algorithm invented by Adam Back in 1997 to combat spam and uses Bitcoin as a proof of work to validate blocks of transactions. It consists of adding additional information in the message header, such that the sender calculates a hash containing a certain number n of bits to zero left. To do this, the sender has to iteratively apply the hash algorithm on the original message 2n times on average.

The Hashcash algorithm has as parameters: the hash of the previous block, the hash root of the Merkle tree, the target and the nonce. The hash of the new block must be smaller than the target for the block to be accepted by the network, which means that the hash must start with a certain number of zeros. The difficulty of calculating a hash with many leading zeros is very great, so numerous attempts must be made, increasing the nonce each time.

The body of the block (the transactions) are hashed indirectly through the root node of the Merkle tree. Since transactions are not hashed, hashing a block with only one transaction takes exactly the same amount of effort as hashing a block with 10,000 transactions.


Quotes

"Blockchain: the technology that will change your life" (Guillermo Vega and Olivia López Bueno.

"You can't stop things like Bitcoin. It will be everywhere and the world will have to readjust" (John McAfee).

"Every informed person needs to know about Bitcoin because it may be one of the most important developments in the world" (Leon Luow).

"I think decentralized networks will be the next big wave in technology" (Melanie Swan).

"I think Bitcoin has the potential to change the world" (Peter Thiel).

"Blockchain technology has the potential to create new foundations for our economic and social systems" (Harvard Business Review).

"The Blockchain network is robust because of its unstructured simplicity" (Satoshi Nakamoto).

"Bitcoin is a difficult subject to disentangle" (Andreas M. Antonopaulos).

"Bitcoin is a decentralized trust network that extends beyond the restricted realm of currencies" (Andreas M. Antonopaulos).

"We define an electronic currency as a chain of digital signatures" (Satoshi Nakamoto).

"Bitcoin is a technological feat" (Bill Gates).

"Bitcoin and Blockchain technologies are becoming the fundamental building blocks for the next generation Internet. The best and brightest minds in Silicon Valley are already working on it" (Naval Ravikant, co-founder of AngelList).


Bibliography