You have already come across this term “layer 2” (layer 2 in French even if we generally use the term in English) if you are interested in DeFi. If you're familiar with Loopring, OMG, or xDai, you might even have used one. We are even talking about it more and more because it marks a real turning point in the design of the blockchain.
The first time that we really and very seriously started talking about layer 2, it was after the very big congestion of Ethereum in 2017. It was in fact at that moment that the question of the scalability of Ethereum was lacking and the challenge was then imposed.
Layer 2 was then designed to improve and enable the scalability of the blockchain. Basically, making them effective in a wider and denser use. What you need to know is that scalability is precisely the fundamental problem of the blockchain.
In fact, to improve the scalability of Ethereum or all blockchains in general, there are actually only two possibilities. Either we seek to improve the blockchain itself (Ethereum attempts this with its version 2) or by creating another layer to unclog the first layer.
To give you an idea, know that the most well-known blockchains, namely Bitcoin and Ethereum, are so-called “layer 1” chains, original layers. This means that all transactions are made directly on their network. And, as the name indicates with “layer”, this means that we simply add an additional layer.
We will therefore see here what this means and why it is essential in fact if we want to understand what is happening in detail in the blockchain.
So now let's see what it is about in detail.
Context of the creation of Layer 2
As you may already know, Ethereum can process up to 15 transactions per second. Which is “weak” especially since more and more people are entering DeFi every day and want to carry out transactions. Unsurprisingly, we see that Ethereum is slow, quickly becomes congested and the fees that go with it literally explode. We have all encountered this ultimate problem of having to pay fees that are higher than the transaction itself. This is clearly a major obstacle and the challenge for Ethereum is to improve its internal system and its scalability.
So, to show you a little of the impact of this, let's take the case of the 15 transactions per second that Ethereum can currently process. With a layer 2, we could - depending on the solution chosen - go to 4000 tx/sec. Which is a huge leap, right?
And, if you are wondering what this is for since Ethereum will move to its second version, just tell yourself that scalability on a very large scale (as is the objective) will necessarily have to involve the use of Layers 2 despite All. Yes, Proof of Stake and Ethereum sharding are certainly great progress but not sufficient given the scalability required and the size of a market which is growing ever larger (We would certainly need thousands or even millions of transactions at the same time). minute, let it be said).
Moreover, Layer 2 solutions actually address several types of solutions. Some layer 2 will improve the scalability of payments while others will focus on smart contracts and finally others will focus on calculations carried out off-chain.
However, the common point of Rents 2 is to move most of the operations off the chain and to use the main blockchain as an anchor to ensure the security of the network.
Scalability and scalability while guaranteeing the security of operations is in fact, generally speaking, the whole challenge that blockchain poses and that developers seek to resolve.
Understanding the “blockchain trilemma”
Vitalik Buterin formalized this trilemma by talking about the fact that a blockchain system can only have 2 out of 3 of the following properties:
- La security: An attack cannot take place if it has fewer resources than the state of the network as a whole
- La decentralization : the network as a whole and accessible to any participant actively working on the network.
- La scalability : The network can process operations on an ever-larger scale.
For example, we may naively think that we don't need a layer and that we should simply use more powerful nodes to improve transaction speeds. Yes, but by doing this, we somewhat compromise decentralization, among other things because very specialized nodes will be required (which would then necessarily be centralized).
It is a careful balance that must be found to improve the power of blockchains.
And in this context, one of the most ideal (or least worst) solutions that has been put in place is layer 2.
Now let's see what it's actually used for.
Using Layer 2
As we saw above, layer 2 will be an additional layer built and placed on top of the blockchain in order to improve its scalability, therefore.
You should also know that layer 2 is a constructed layer which will be placed on top of the first layer. It does not require any changes to the first layer. It can be built by taking its elements, that said, like smart contracts for example. Also, and this is generalized in Layers 2, they will be anchored on the security guaranteed by layer 1.
Layer 2 is another layer built on top of Layer 1. There are a few important points here. Layer 2 does not require any changes in Layer 1, it can simply be built on top of Layer 1 using its existing elements such as smart contracts. Layer 2 also leverages Layer 1 security.
Basically, layer 2 will increase speed and scalability while benefiting from the strong security of the main chain. Thanks to layer 2, we will be able to process thousands of transactions per second without affecting the functioning of the blockchain.
You should also know that there are several types of layer 2, each with a different approach to improving the network.
The different types of layer 2 existing today
Here is a small visual sample of all the solutions implemented:
Let's now see the best known and most used layer 2 categories. Some of the layer 2 solutions improve the applications created, others the payment channels, etc.
To make it clearer visually, nothing better than a few examples.
Channels.
With layer 2 of type Channels, we can carry out several transactions off-chain, while only sending two transactions to the main layer of Ethereum for example. The results are lower costs for higher throughput. Only, to set up this layer 2? it requires participants to deposit funds into a multisig contract. It is therefore also necessary to constantly monitor the network to guarantee the security of funds. The two forms of channels are “state channels” and “payment channels”. For payment channels, we can mention the Bitcoin Lightning Network which uses it considerably.
Raiden is a good example of a layer 2 solution to make Ethereum cheaper, more scalable and faster for example.
We can cite connected in this sense which constitutes a crosschain liquidity network which allows rapid and entirely non-custodial transfers between EVM compatible chains and L2 systems.
Layer 2 Plasma type
You have certainly heard of it. In fact, plasma is a solution that was thought of by Joseph Poon and Vitalik Buterin. It is a framework that allows you to create scalable applications on Ethereum.
These are solutions which will use Merkle trees in particular to create an additional chain (Childchain) to the main blockchain. Childchains are copies of the parent chain. This is how transactions are faster and cheaper because we will offload operations from the main chain.
It was a real blessing that the invention of this type of layer 2 even if there are limits of course with plasma (as with all solutions, if we look at the details). The Plasma framework cannot support all transaction types. And, if the latter are too complex, it is not (yet?) possible. Delay times can be long and additional participants are also required to monitor the network and security of funds.
This type of solution was developed by OMG for example which implemented MoreViable Plasma. However, the most emblematic of all remains Polygon (formerly Matic Nerwork).
Moreover, we talk a lot about Polygon, as being one of the rare cryptos to have survived and even gained value during the terrible fall at the end of May 2021 (Musk announcement + Yet another Chinese announcement to ban cryptos) . This new light on Polygon is partly explained by the fact that it is configured to support different types of layer 2 such as ZK rollups, layer 2 optimist among others. A monster? It could well be, indeed.
Layers 2 of Sidechains type
This is perhaps the best known form of layer 2. There, the side chains operate separately (side: next to) and independent of the main blockchain. In fact, they even have their own consensus algorithm. And to connect to the Ethereum blockchain for example, they will use what is called a bidirectional bridge (read the article on brigdes/bridge on the blockchain).
Interoperable, sidechains are compatible with Ethereum Virtual Machine but the fact remains that sidechains remain limited. In fact, the latter are less decentralized than the main network. And the main problem is that the consensus algorithm is not operated on layer 1; We can then imagine unscrupulous validators who would carry out malicious actions.
Typically in sidechains, we can cite xDai. The xDai chain is indeed a stable payment blockchain designed for fast and cheaper transactions. The chain uses a unique dual-token model; xDai is a stable token used for transactions, payments and to pay fees, and STAKE is a governance token used to support the underlying POSDAO Proof-of-Stake consensus. Likewise, the xDai Bridge which allows you to send xDai to Dai on Ethereum easily. The project oftokenized real estate RealT.co uses xDai to enable low-cost transactions.
We can also cite Skale (SKL token) which is also extremely powerful and allows you to create dAPPs in a simple way.
Rollups type layers 2
Here again, this type of Layer 2 is extremely interesting. The idea of rollup is the idea of accumulating, aggregating transactions, rolling several transactions into one. Rollups allow scalability by grouping sidechain transactions into a single transaction and generating cryptographic proof.
There, rollups work by processing transactions directly on layer 2 while sending data to the first layer. With rollups, all transactions are managed in sidechains. The main Ethereum chain will only store transaction data. We therefore understand that we benefit from the security of Ethereum while carrying out transactions outside the first layer.
Even more, there are two types of Rollups:
ZK (Zero Knowledge) rollups : Here, we will group different transfers into one and the same transaction. ZK transaction groups are called SNARKs. It is a single transaction which is then sent to Ethereum. This allows for quick transactions because they are condensed, you could say. To give you an example of a ZK rollup solution, we can cite Starware For example. Zk rollups, even if they are faster and more efficient than optimist rollups, they do not allow existing smart contracts to easily migrate to layer 2….This is for the moment, the small obstacle of rollups. Perhaps one of the best known is Loopring with its exchange which works on this system.
Optimist rollups : There, they will operate on a sidechain operating in parallel to Ethereum. Transactions are sent as call data. However, they may be subject to possible attacks...For Optimist rollups, the name comes, beyond the optimism of this system, from the company and the project which bears the same name: optimism.
Optimistic rollups will run an EVM compatible virtual machine called OVM (Optimistic Virtual Machine) through which we can execute the same smart contracts that can be executed on the Ethereum network. This is a fundamental and truly essential factor to understand because it is what allows them to maintain their “composability”. This is essential because smart contracts therefore maintain their strengths.
Layer 2 of Validium type
Finally, we can finish with Validium which is relatively close to ZK rollups except that there, the data is stored off-chain. We can carry out more than 10,000 transactions per second, without experiencing withdrawal delays. Validiums are known to have less risk of attacks but we cannot execute all types of smart contracts. Likewise, and this is again a small problem for this type of layer 2, this system requires very high computing power.
We can cite the DeversiFi exchange platform that we particularly appreciate on Zonebitcoin. You do not pay any gas fees to trade, exchange, swap your tokens thanks to Validium layer 2. Despite everything, and it is justified, you will have to pay for the first transaction (around $20 and also count the same fee for the withdrawals). That said, this remains a golden option for those who want to swap tokens without paying monumental gas fees.
Conclusion on Layer 2
So that's the main thing to know about layer 2, as you can see there are more and more solutions to improve the scalability of Ethereum. We can say, however, that the big trend remains on rollups, for the moment anyway. In addition, Rollups can be significantly improved with Ethereum 2.0. You should also know that there are more and more hybrid solutions between these different types of layers. We have mentioned here, to keep the article digestible, the most used types of Layer 2.
Moreover, with the implementation of Ethereum 2.0, combined with these layer2, we can consider that Ethereum is finally reaching its long-awaited potential.
See the video :
To buy cryptocurrencies (simple way):
- Public chat Binance (Complete crypto trading platform)
To generate interest on your cryptocurrencies:
To secure your cryptocurrencies:
To have fun and play
- The best for bitcoin sports betting
- Casinos and export: CloudBet
[…] a more complete exploration of Layer 2, platforms like this site offer you valuable information on how they work and their importance in […]