Peeling Away The Blockchain Infrastructure Layers

By Stan Peterson
April 13, 2022 Updated April 13, 2022
Best In



The blockchain is a revolutionary technology in many ways and one that promises groundbreaking benefits for multiple industries, but that will only happen if it’s able to overcome the most pressing problem affecting it right now. 

Anyone who regularly reads up on the latest crypto news will likely be aware of the so-called “scalability” problem in blockchain. The issue is that blockchains struggle to process transactions fast enough. Bitcoin users can attest to that only too well, with the average transaction typically taking around 10 minutes, though at busy times it can be anywhere from 30 minutes to one hour to process. If we’re to see mass adoption of blockchain and cryptocurrencies, the current transaction snail pace simply will not do. 

Ethereum co-founder Vitalik Buterin outlined the challenge of increasing transaction speeds when he spoke about the “blockchain trilemma”, which defines the ideal blockchain as one that’s decentralized, secure and scalable. 

Achieving that ideal has so far proven to be unattainable to any blockchain. The issue is that if your blockchain can only ever have two of the three characteristics, at the expense of the third. 

In the case of Bitcoin for instance, we have a large number of nodes that ensure it’s both decentralized and incredibly secure. Bitcoin has a thriving community as a result and it has never been hacked (and almost certainly never will be!). But these characteristics come at the expense of scalability. Because there’s such a large number of nodes in the Bitcoin network, each one of them has to validate each transaction. More often than not, the result is gridlock, as many of the nodes struggle with poor connectivity and cannot keep up with the pace of transactions being made by Bitcoin users. 

If we decrease the number of nodes in Bitcoin’s network, it would surely be able to process transactions faster, but it would come at the cost of lower security. 

Developers have been working around the clock for years trying to come up with a solution to the blockchain trilemma and the good news is that they’re making progress. A variety of ideas and techniques have been implemented at many different levels on multiple blockchains, with varying levels of success. Some of these ideas revolve around building a second “layer” onto the blockchain to process transactions through an alternative network. As a result, we have seen the emergence of many different kinds of Layer 1 and Layer 2 blockchain scaling solutions. 

Blockchain Layers Explained

Layers generally refer to the level at which scaling solutions are implemented within the blockchain. Some solutions are implemented on the blockchain itself, while others are simply connected to it and function independently as a kind of dependent network or protocol. 

Hence, when we talk about blockchain Layer 1s, we are generally referring to the actual blockchain – the distributed peer-to-peer network – that encompasses all of the nodes that comprise the system. So, for example, the Ethereum cryptocurrency’s Layer 1 network is the Ethereum Network, while XRP runs on the XRP Ledger and AVAX sits on the Avalanche Network. 

Layer 2 networks are the independent scaling protocols and systems that sit atop of one of those Layer 1 blockchains. They can be thought of as a second layer to the main blockchain network. 

In general there are two kinds of Layer 2 solution, namely nested networks and state channels. In the former, the blockchain is considered as the “mainchain” and sets the rules for the entire network of subchains. It generally doesn’t participate in the system’s operation, except for when there’s a need to resolve a dispute. With this kind of system, developers can build lots of independent blockchains that interoperate with each other, each designed for different applications. The idea is to reduce network congestion by having separate, streamlined chains for each use case. 

A good example of this is the Polkadot blockchain, which actually is a “Layer 0 platform that ties together various parachains into a single, giant network. All of the parachains in Polkadot’s ecosystem, such as the Web3 privacy protocol Manta Network, are actually Layer 1 blockchains in their own right, however they get the benefits of Polkadot’s consensus network and security. Another advantage of this system is that all of the parachains are interoperable with one another. So Manta Network, which masks crypto wallet addresses and transaction amounts using cryptography, can bring its privacy solutions to applications built on Polkadot’s main chain and all of its parachains too. 

In future, Manta will also be able to access other blockchains thanks to its new partnership with Axelar, which has developed a cross-chain bridge to networks such as Ethereum, Polygon, Avalanche and Terra. 

As for state channels, these are protocols that facilitate two-way communication between the off-chain transaction network, and the main blockchain. So when an application builds on such a protocol, all transactions will take place off of the main blockchain. The key is that these off-chain transactions do not require node verification, meaning they can be processed much faster to ease congestion. 

Blockchain Layers In Action

To better understand how Layer 1 and Layer 2 differ, we can look at some examples. The most famous Layer 1 of all is, of course, Bitcoin. Bitcoin’s scaling problems are well known, and a number of Layer 2 solutions have emerged to try and improve things. The most famous is the Lightning Network, which relies on smart contracts to process transactions off-chain between different wallets. The network establishes these payment channels between pairs of wallets to facilitate transactions almost instantaneously. 

The way it works is quite clever, because it doesn’t need to create pairs between every wallet. For example if Wallet A has an established channel to Wallet B, and Wallet B with Wallet C, then Wallet A can transfer funds to Wallet C without creating a separate channel. A wallet can close its payment channel at any time, and only then will all of the transactions that went through its channel be recorded onto the main blockchain. This allows the entire network to move much faster.  

The second-most famous Layer 1 blockchain is Ethereum, and it too has given birth to several Layer 2s. Perhaps the best known is Ethereum’s Polygon. Polygon is a faster parallel blockchain that runs alongside the Ethereum Network. To take advantage of Polygon, users must bridge some of their tokens to it, from where they can interact with multiple “Layer 3” decentralized applications that have also bridged to Polygon. 

Meanwhile, the Cardano blockchain’s biggest DeFi application AdaSwap has built itself atop of another Layer 2 solution called Hydra. AdaSwap is building an ecosystem for Cardano that encompasses an automated market maker-based decentralized exchange, a launchpad, a native NFT marketplace and high-yield liquidity pools called Stake and Forget. It will allow Cardano users to buy and sell NFTs, launch projects, stake tokens and earn interest. 

AdaSwap is actually a “Layer 3”, or decentralized app. dApps, as they’re known, can sit on either Layer 1 or Layer 2. In the case of AdaSwap. It’s building on a Layer 2. 

The problem with building on Cardano (Layer 1) is that its blockchain architecture is much closer to Bitcoin’s than Ethereum’s, and as a result it becomes much harder to write applications that live directly on the Cardano chain. Because of this, AdaSwap and its DEX and other services all sit on the Hydra Layer 2 protocol, which will allow it to bundle and process transactions off of the main Cardano network. 

One of the most intriguing scaling solutions that’s being explored by the Tezos blockchain is a Layer 2 mechanism known as “optimistic rollups”, that it plans to implement alongside its newly updated Tenderbake consensus mechanism. 

While Tenderbake improves latency and finality to provide faster transactions and smoother-running decentralized apps, it doesn’t substantially alter its throughput, or the number of transactions that can be processed per second. 

To overcome this, Nomadic Labs recently proposed the use of optimistic rollups, which are entities that sit on the main blockchain with their own wallet address that can compactly process off-chain transaction executions and state updates. The idea is that transactions sent to a rollup are left unprocessed by the main chain nodes, instead being processed by specialist rollup operators. The operators process transactions off-chain before posting a receipt back to the main chain to summarize the rollup’s new state as a cryptographic hash. In essence, the system continuously “rolls up” transactions off-chain, freeing up the network from congestion. 

It’s important not to get confused by the different layers. Some blockchains, such as Stacks, can be pretty muddling. Stacks is often incorrectly described as a Layer 2 solution for Bitcoin, when it is in fact a Layer 1 platform in its own right. The confusion arises because Stacks is linked to Bitcoin by its consensus mechanism, which spans both the Bitcoin and Stacks blockchains, called Proof of Transfer. This enables Stacks to benefit from Bitcoin’s security, while Stacks apps can use Bitcoin’s state, despite being hosted on a separate blockchain. So whereas Lightning Network is designed to help Bitcoin scale, Stacks was built to bring new use cases to Bitcoin via smart contracts. 

The Upshot

Although the crypto layers look pretty muddled to an outsider, the fact is they’re evidence the community is working hard to address the biggest issue in blockchain, that of scale. As the demand for crypto increases, blockchain networks will come under increased pressure to find solutions to scaling. 

Layer 1 solutions have a vital role because they’re the foundation of our decentralized blockchains. But they need Layer 2. With any luck, some improvements and refinements, it seems that Layer 2s will eventually be able to address Layer 1’s congestion issues, allowing us to finally embrace the blockchain trilemma of decentralization, security and scalability.

Being an active participant in the Blockchain world, I always look forward to engage with opportunities where I could share my love towards digital transformation.
The presented content may include the personal opinion of the author and is subject to market condition. Do your market research before investing in cryptocurrencies. The author or the publication does not hold any responsibility for your personal financial loss.

Next Story