Layer 1 vs. Layer 2
Published: 2021-11-02 23:01:25

If you are learning about web3, the chances are that you have heard different projects referred to as being a layer-one project or a layer-two project. Hearing these terms without any prior knowledge or context can be confusing. In this post, I'll explain the differences between layer one and layer two networks and provide examples of both.

Disclaimer: This is just a brief overview of the mentioned topics and is in no way a complete piece of work on the topic. 

## Layer 1

A layer one network is a network that acts as infrastructure for other projects to build on top of. A public decentralized layer one network's primary characteristic is its consensus mechanism. Different consensus mechanisms provide different levels of speed, security, and throughput. Some examples of layer one networks and their consensus mechanisms are given below. Two common categories of consensus mechanisms are proof of work (PoW) and proof of stake (PoS). Note that these are just two categories and that there are many unique PoS consensus mechanisms.

[Bitcoin](https://bitcoin.org/en/) - Consensus: Proof of work, Native Token: BTC 
[Ethereum](https://ethereum.org/en/) - Consensus: Proof of work (moving to proof of stake in Eth2), Native Token: Eth 
[Algorand](https://www.algorand.com/) - Consensus: Proof of Stake, Native Token: Alg
[Hedera](https://hedera.com/) - Consensus: Proof of Stake, Native Token: hbar 
[Cardano](https://cardano.org/) - Consensus: Proof of Stake, Native Token: Ada 

### Qualities of Layer one networks

All layer one networks have a native token that serves as network fuel within the network. You use a network's native token to pay for network services like transactions, file services, and smart contract services. Note that not all layer one networks support the same array of services, although all support transactions. When comparing layer one networks, it is essential to learn about its consensus mechanism and the pros and or con's that it provides the network.

## Layer Two

Layer 2 networks extend the functionality of their layer 1 counterpart. This can be to increase the layer 1 network’s performance, reduce transaction fees, or increase programmability. For example, on Ethereum, where gas fees can be highly variable and transaction times slow, it is increasingly common for application developers to provide its user the ability to interact with a layer 2 network, like Polygon, to decrease their user’s fees and transaction latency. 

### Qualities of Layer Two Networks

Similar to how Layer 1 networks have different approaches to consensus, each layer 2 network will implement a scaling solution, or means to map transactions back to its layer 1.  For instance, a commonly discussed layer 2 scaling solution is the implementation of zero-knowledge rollups. The idea is that a side-chain performs transaction ordering and processing and submits mathematical proof that they have processed the transactions fairly. Some examples of layer two scaling solutions are the [Lightning Network](https://lightning.network/), [Polygon](https://polygon.technology/), and [Starknet](https://starkware.co/product/starknet/). The majority of scaling layer two solutions depend on cryptographic systems. For resources on the cryptography behind zero knowledge proofs I recommend this [resource](https://www.di.ens.fr/~nitulesc/files/Survey-SNARKs.pdfhttps://www.di.ens.fr/~nitulesc/files/Survey-SNARKs.pdf). The watered down version of what is happening, is that a mathematical proof is created by a verifier that some knowledge is correct. 

[Lightning Network](https://lightning.network/) - [2-party multi-signature channels](https://lightning.network/lightning-network-technical-summary.pdf)
[Starknet](https://starkware.co/product/starknet/) - [Zero Knowledge Rollups](https://www.di.ens.fr/~nitulesc/files/Survey-SNARKs.pdf)
[Polygon](https://polygon.technology/) - Side Chains and [Optimistic Rollups (coming soon)](https://docs.ethhub.io/ethereum-roadmap/layer-2-scaling/optimistic_rollups/)

Note that only layer one 1 with scaling limitations needs scaling solutions. Networks like Algorand and Hedera with high native speeds for scale don't need to scale with layer-2s because they scale at the network layer.