Scalability and Layer 2

Escalabilidad y Layer 2

Published on

There are currently numerous Blockchains with their advantages and disadvantages: some are more decentralized but expensive, others have a lower cost but a higher level of centralization. Each of them has a native token that allows to pay for the different transactions that are made and whose standard for issuing tokens determines that they can only be used exclusively in its network.

So, how is it possible to transfer native tokens between networks to make use of the low costs offered by another network?

This is possible thanks to the use of BRIDGES and wrapped tokens. Bridges are smart contracts that are deployed on one chain and connect to the smart contract of another.

The first contract takes the native token, blocks it to remove it from circulation on the chain and the second contract issues its equivalent on the other network by means of a wrapped token, which functions as a kind of proof of holding, since they are anchored to the value of the represented token.

What about Sidechains?

Sidechains, on the other hand, are lateral chains whose function is to improve the performance of the main chain by decongesting the network and freeing the processing capacity of layer 1. It should be noted that Sidechains are themselves Blockchains that operate autonomously. Although they support chain 1, they have their own security protocols and validators and everything that happens in the Sidechain is stored in it (e.g. Polygon).


L2 or Layer 2


There are 3 categories of L2:
1) Plasma Chain
2) State Channels
3) Rollups

Both, Plasma Chain and State Channels, are becoming obsolete as the biggest advances are in Rollups.
Currently Ethereum is the network where Rollups are most implemented, as it has moments of high activity generating congestion and increasing transaction costs.

But how do rollups work?

They work in a similar way to sidechains since they carry part of the processing of layer 1 offchain. The most important difference is that once the rollup processes, compresses and generates the batch of information, it sends it back to layer 1 for validation and storage using the security of the main network.

Within the rollups we have two different solutions:

Optimistic Rollup: it needs a smart contract that acts as a bridge to send tokens to the rollup. By means of a sequencer, the transactions are processed until enough are accumulated to generate a batch or lot and sent to layer 1 for validation. There is a period of 7 days in which the transaction is not confirmed in layer 1 because first a validator is in charge of reviewing the batch of information sent by the sequencer. In case of validation, the transactions are processed and follow their normal course. But if it finds any transaction that is not correct, it presents a fraud test to layer 1. Both the sequencer and the validator must leave collateral as an incentive to avoid bad actors in the flow.

ZK Rollup: its operation is similar to Optimistic in terms of the use of a smart contract in layer 1 and transaction processing in the rollup. The difference is that instead of presenting a proof of fraud, it uses a proof of validity through ZK-Snark technology, allowing layer 1 to validate at the moment the information is presented and avoiding waiting.

Optimistic: Ethereum High level Architecture
Source: Optimism Community

In summary

Now that we know the differences between Bridges, Sidechains and Rollups, we can understand the benefits of each of these scalability solutions allowing us to decide which one fits our needs when executing a transaction.

What to read next