Building Blocks: understanding the layers of blockchain technology
Every week Blockchain Sensei will be walking you through the basics of blockchain technology. Consider this your crash course in all things web3!
All good things have layers. There are layers in good food, layers in good clothing and layers in good technology. Take for example a mobile phone. Here we have mobile networks, physical mobile devices, different operating systems and then the different apps available on the operating system. Each of these parts of a phone are layers: The network is Layer 1; the Operating system is Layer 2; and then App stores/apps are Layers 2/3.
A similar structure is seen in blockchains. However, the key distinction between the “traditional internet” and blockchains is decentralisation. This makes the Layer 1 of blockchain unique. Blockchains are networks that enable the decentralised movement of value. Decentralised means there is no central entity (such as a corporate company) that controls the network – instead, it is controlled by all of the computers that comprise it. Let’s break down these layers:
Layer 1: The Foundation:
At the base of every blockchain is Layer 1, also known as the consensus algorithm. This is the core architecture that keeps the network secure , where transactions are grouped into blocks and added to the chain additionally ensuring all transactions are valid. Layer 1 is the main blockchain itself. Popular Layer 1 algorithms include Proof-of-Work (used by Bitcoin) and Proof-of-Stake (used by Ethereum).
There’s a lot of competition among Layer 1 blockchains, with projects like Solana, Binance Smart Chain, and Cardano vying for developers to build on their platforms. These projects compete and boast faster transaction speeds, lower fees, and unique features to attract users and developers. The goal is to foster innovation and capture market share in the growing blockchain space.
Layer 2: Scaling Up:
As blockchain networks grow, the cryptography that keeps them secure can become expensive, leading to high transaction fees. Layer 2 solutions aim to solve this problem by bundling transactions together or changing the architecture and posting them to the main blockchain more efficiently. This allows users to benefit from the security of the main chain at a lower cost.
Examples of Layer 2 solutions include the Lightning Network on Bitcoin and Optimism on Ethereum. These solutions use various techniques like sidechains, state channels, and rollups to increase transaction throughput and reduce costs. Some newer Layer 1 blockchains, like Solana, have built-in scalability that makes Layer 2 solutions unnecessary, but this often comes with trade-offs in decentralisation or security.
Decentralised Apps:
Depending on the blockchain, Decentralised applications (DApps) may interact with either Layer 2 solutions or directly with Layer 1 main chain. The key point is that DApps are consumer-facing, while the lower layers focus on infrastructure. This allows for a more modular and flexible ecosystem where innovation can happen at every level.
Some would argue that DApps are the third layer of blockchain, including, for example, wallets, exchanges, and lending protocols. Popular DApps like UniSwap, Maker, and Aave provide user-friendly interfaces for everyday activities while leveraging the security of the underlying blockchain.
Some blockchains, like Cosmos and Polkadot, use modular Layer 0 designs. Layer 0 is often associated with the term interoperability, which essentially means the ability to connect and work efficiently with other blockchains. This is crucial for the future of blockchain, as it allows for a more connected and collaborative ecosystem.