What is second generation blockchain?

Tiempo de lectura: 4 minutos

In a previous blog post we made an introduction to the blockchain generations and explained the first of them, initiated by the revolutionary Bitcoin.

 

In this article we will discuss the innovations of the second generation, started by Ethereum, the second largest blockchain and cryptocurrency in the galaxy (blockchains in other galaxies have not yet been discovered).

Ethereum’s vision

Ethereum was proposed in 2013 by Vitalik Buterin, a young programmer and Bitcoin enthusiast. Vitalik’s idea was that a blockchain could enable decentralized applications (dapps) with a general purpose language. Hence, Ethereum’s vision was to function as a kind of world computer and even be the basis of the decentralized Internet (web 3.0).

 

In this global computer, the execution of applications is paid for with the blockchain’s native currencyether (ETH). Its language, called Solidity, has made writing smart contracts (contracts made with computer code that are automatically fulfilled) and decentralized applications (apps that do not depend on a central entity, but on the same community of users that use it) accessible to all programmers in the world. Another narrative that has also been growing in Ethereum is that of decentralized finance or DeFi.

 

Ethereum finally launched in 2014, with a practice that became the industry standard (and also criticized by many), a pre-mining to fund development.

Qué es la blockchain de 2da generación?

Turing-complete

Ethereum is Turing-complete. In the world of cryptocurrencies this means that contracts and dapps can be as complex as you want. While Bitcoin used a very simple (and secure) language, Bitcoin Script, Ethereum uses a language with a larger attack surface (more risk), but which allows many more things.

 

In addition, Ethereum uses high-level languages, that is, languages that are easier for programmers to learn and use. Once the contract or dapp is written, the code goes through a compiler and is “translated” into Ethereum’s native language (called bytecode). Ethereum does not understand high-level languages, only bytecode (just as a computer understands binary code but not JavaScript or Python).

 

In practice almost nobody understands bytecode and the most widely used language is Solidity (which has become standard in the smart contract industry). One of the big problems with Solidity is that it does not optimize security and exploits or hacks are frequent, resulting in the theft of large amounts of money. Other languages such as Lisp go along the lines of maximizing security.

What is gas?

A term popularized with the second generation of blockchains is gas. Gas is a unit that reflects the computational cost of performing an operation. For example an addition might cost 1 gas and a multiplication 8 gas.

 

The metaphor used is that contract execution spends gasoline (gas) and is paid for with ether. The price of gas (in ether) can go up if there is a lot of transaction demand or down if there is less.

 

It is similar to how in Bitcoin you pay a commission based on the weight of your transaction. The unit used to measure the price of gas is the Gwei or 0.000000001 ether (yes, easier to use Gwei).

 

By putting a monetary cost on the execution of contracts we prevent the network from being abused. This is especially important when talking about a Turing-complete language because code could be written that results in an endless execution (like an infinite loop).

If you want to know more about how ESG works in ethereum, you can check out this article.

Qué es la blockchain de 2da generación?

Ethereum Virtual Machine

The bytecode (native language) is executed by the network computers (nodes and miners) in the Ethereum Virtual Machine (EVM). Special attention should be paid that if the gas paid for execution is less than the required gas, the transaction is invalid and is not processed.

Account system

Unlike Bitcoin’s UTXO model, in which the network monitors coins as “transaction outputs“, Ethereum adopts an account model. In this system the network monitors balances and data pertaining to accounts. One implication of this is that ether is a more fungible currency than bitcoin.

Tokens ERC-20

A common use of contracts in Ethereum is to create a ledger within Ethereum itself, that is, to create a new token. The most commonly used standard is ERC-20 and allows to create new tokens very easily, without the need to launch a new blockchain.

 

As it is still a contract in Ethereum, to make token transfers you have to pay for gas in ether.

NFTs and domains

Just as we have fungible tokens (ERC-20), we can create non fungible tokens that have recently become popular. However, contrary to popular belief, this innovation did not start in Ethereum but in Bitcoin with Counterparty. The same goes for decentralized domains (Ethereum Name Service) that started on Bitcoin with Namecoin.

Ethereum vs. the world

As we have seen Ethereum has a focus on innovation allowing much more flexibility than Bitcoin. While Bitcoin dominates the niche of store of value, Ethereum dominates the niche of smart contracts (although it also has monetary use).

 

But in the market for smart contract platforms and decentralized applications, there has been a Cambrian explosion. Ethereum now finds itself surrounded by competitors, the third generation blockchains. And Ethereum itself is on its way to becoming a third-generation blockchain.

 

But that’s all for now, the last generation will be covered in a future article!


Leave a comment
Your email address will not be published. Required fields are marked *