A blockchain is a distributed ledger technology that secures, records and maintains information transparently and immutably without the need for a central authority. A distributed ledger is a data storage and management system that is shared, synchronised and accessible by different sites or participants, with no central authority controlling the entire network.
Think of the blockchain as an accounting ledger where each page represents a block of transactions. Each completed block is linked to the previous one, forming a continuous chain. This structure makes it extremely difficult to modify transactions once they have been entered. Blockchains are maintained by a network of computers, or nodes, which validate transactions using consensus mechanisms such as proof-of-work, which solves cryptographic problems, or proof-of-stake, which selects validators based on their monetary participation.
Layer 2s are technological solutions designed to improve the efficiency of basic blockchains, or Layer 1s, such as Bitcoin or Ethereum, without compromising their security. By processing transactions outside the main blockchain, Layer 2 makes it possible to manage a larger number of transactions more quickly and cost-effectively. In this way, they unburden the Layer 1 blockchain by periodically finalising the results on it, thereby considerably improving its capacity to process transactions and its scalability, while retaining the security and decentralisation advantages of the original blockchain.
Layer 2s are essential solutions in the development of blockchain technologies, developed to address the limitations of Layer 1s. These limitations are often described through the "blockchain trilemma", which highlights the challenges of simultaneously achieving three key objectives: scalability, security and decentralisation. Here is a more in-depth explanation of these challenges and how they justify the need for Layer 2 solutions.
Scalability: Layer 1 blockchains such as Bitcoin and Ethereum can handle a limited number of transactions per second. For example, Bitcoin can handle around 7 transactions per second and Ethereum around 15 to 30. This limitation creates bottlenecks when demand increases, leading to delays and higher transaction costs. For mass adoption, blockchains need to be able to handle transaction volumes comparable to those of traditional payment systems such as Visa, which can handle thousands of transactions per second.
Security: Although Layer 1s are generally very secure thanks to their robust consensus mechanisms, increasing processing capacity must not compromise this security. Changes aimed at increasing scalability, such as increasing block size or reducing the time between blocks, may expose the blockchain to new security risks, such as double-spending attacks or problems with increased centralisation.
Decentralisation: One of the fundamental properties of blockchain is decentralisation, which avoids control by a single entity and contributes to security and transparency. However, increasing scalability by centralising certain parts of the process (for example, through larger or more powerful validation nodes) can threaten this aspect, by placing too much power in the hands of a few players.
To overcome these challenges, Layer 2 solutions have been designed to operate 'on top' of Layer 1 blockchains, processing transactions more efficiently without altering the underlying structure or its security and decentralisation properties. Here are some of the ways in which Layer 2 improves scalability:
Off-chain processing: Many Layer 2 solutions process transactions outside the main chain. This allows a large number of transactions to be managed quickly and cheaply, before the results are aggregated and finalised on the main blockchain.
Transaction compression techniques: Methods such as rollups (optimistic and zk-Rollups) compress transactions to reduce the amount of data processed by the main blockchain, while maintaining transaction integrity and verifiability.
Payment channels: Systems such as the Lightning Network for Bitcoin create payment channels between users that enable almost instantaneous and very low-cost transactions, which are only settled on the main blockchain when the channel is closed.
The main Layer 2s currently in vogue are Zk-rollups and Optimistic rollups. To understand the difference between these 2 concepts, we can compare them to two different methods of checking the security and accuracy of transactions on a blockchain. Here is a simplified explanation with examples to make the concept more accessible.
Imagine you're at school and you're handing in an assignment. In the optimistic rollup system, the teacher assumes that each piece of work handed in is correct. They don't read them immediately. However, the teacher offers a reward to any other student who finds an error in their classmates' homework. If no one reports an error within a given time, the assignment is considered correct. If an error is found, it is corrected, and the offending student may be penalised.
Faster initially, as there is no immediate detailed checking.
Less resource-intensive initially.
If an error is reported, the resolution process can be long and complex.
Requires a penalty system to deter fraudulent behaviour.
Examples: Optimism, Arbitrum.
Using the same school example, imagine now that each student, on handing in their assignment, must also provide a "cryptographic proof" that their assignment is correct without revealing the details of their answers. The teacher uses this proof to quickly check the accuracy of the assignment without having to read it in full. This ensures that assignments are checked immediately and accurately.
High security, as each transaction is accompanied by a proof of validity.
No need to wait for a deadline for verification, reducing processing times.
More complex and costly to implement initially as it requires advanced cryptographic calculations.
Proof creation can be computationally intensive.
Examples: zkSync, Loopring.
Optimistic rollups assume that everything is correct unless proven otherwise, requiring fewer resources initially, but with a risk of future challenges. On the other hand, zk-rollups provide immediate and indisputable proof of the validity of transactions, offering greater security at the cost of greater initial complexity. These two technologies are ways of increasing the capacity and speed of blockchains while ensuring their security.
Imagine you have a secret, and you want to prove to someone that you know it without revealing the secret itself. This is the basic idea behind what we in the cryptography world call a Zero-Knowledge Proof (ZKP).
The terms "zk-SNARK" and "zk-STARK" refer to two types of zero-knowledge proof technologies, which are cryptographic methods that allow one party to prove to another that a claim is true, without revealing any information other than the truth of the claim. Both have important uses in the areas of data confidentiality and blockchain scalability, particularly in Layer 2 solutions such as zk-rollups.
The diagram you see categorises the different types of 'proof' that can be used to verify information without disclosing it.
Proof system: This is the big circle that encompasses all the possible methods for proving something in cryptography.
ZKP (Zero Knowledge Proof): This is a very special method that allows you to prove that you know something without revealing that "something". It is represented by the blue area in the diagram.
SNARK and STARK: These are two different techniques for creating ZKPs
zkSNARK (Zero-Knowledge Succinct Non-Interactive Argument of Knowledge)
zk-SNARKs, characterised by their ability to produce very short, lightweight proofs in terms of data, significantly improve the efficiency of blockchain systems by optimising verification space and speed, while preserving confidentiality.
These proofs are non-interactive, which means that they can be verified without the need for an exchange between the prover and the verifier once they have been created. However, their implementation requires an initial 'trust setup' during which a ceremony generates essential cryptographic parameters. The security of the entire system could be compromised if the secrets used during this ceremony are divulged.
zk-SNARKs are used in projects such as Zcash for private transactions and in various zk-rollup solutions to improve Ethereum's scalability.
zk-STARK (Zero-Knowledge Scalable Transparent Arguments of Knowledge)
zk-STARKs, like zk-SNARKs, generate zero-knowledge proofs, although these tend to be larger, affecting data management and storage.
These protocols are non-interactive and do not require a trusted setup, removing the security risks associated with a compromised setup by relying on cryptographic hash functions instead of elliptical base pairs.
zk-STARKs are designed to withstand quantum computer attacks, enhancing their security durability for long-term use, particularly in contexts where transparency and security are priorities, even if this means larger proofs.
The main difference between zk-SNARKs and zk-STARKs is whether or not a trusted setup is required and their resilience to potential threats posed by quantum technology. zk-STARKs offer a more robust and transparent approach, while zk-SNARKs are often preferred for their efficiency and small proof size.
The star between zkSNARKs and zkSTARKs could indicate a point where researchers are trying to combine the best of both worlds: the speed of SNARKs and the transparency of STARKs.
Conclusion
Layer 2 solutions are proving to be of vital importance to the future and widespread adoption of cryptocurrencies. Indeed, these technologies offer an ingenious and effective response to the limitations inherent in first-layer blockchains, or Layer 1, particularly in terms of scalability, security and cost. By enabling fast and cost-effective processing of transactions outside the main chain, Layer 2 not only optimises efficiency without compromising data security, but also opens the door to wider adoption of blockchain technologies in everyday life and in various economic sectors.
What's more, with the constant evolution of technologies such as zk-rollups and payment channel solutions, Layer 2s continue to push the boundaries of what's possible in the cryptocurrency ecosystem. They not only facilitate faster and cheaper transactions but also enhance security and decentralisation, fundamental elements of the blockchain philosophy.
So, as the cornerstones of blockchain evolution, Layer 2 solutions are not just complements to existing blockchains, but essential elements that will shape the future of decentralised finance and the digitalisation of global exchanges. Their role is crucial if blockchain technology is to reach its full potential and become an essential global infrastructure. This is a clear indication that the future of cryptocurrencies will be heavily influenced by the successful development and implementation of these innovative technologies.
Register for free to the Summit Research newsletter
and receive our weekly newsletter every Saturday at 10 am (CET).
Sprawiamy, że świat blockchain i kryptowalut jest dostępny poprzez wspólne budowanie przejrzystego i zrozumiałego ekosystemu.