# 1.3.4 Layered Blockchain Architecture

| To address the inherent limitations of blockchain technology, a common approach is to break down the architecture into separate functional layers. This allows for more efficient and effective management of the triple limitations of blockchain, as well as addressing key characteristics like security, scalability, and functionality. The decomposition of complex systems into layers is a widely accepted approach and can vary in emphasis. In some cases, the decomposition is used to highlight the fundamental conceptual entities of the technology, including a data layer, network layer, and application layer. | <p><img src="https://3210145376-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSvanFNAf6Jf8kwvqcdRQ%2Fuploads%2FHk9djkUYkSUPlIOZiDe3%2F0.png?alt=media" alt="Figure 1. OSI-Like Layered Model of Blockchain" data-size="original"></p><p></p> |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |

Such approaches inherit the classical network model known as the Open Systems Interconnection model (OSI model). The approach describes the component structure of the system well but avoids the issues of decentralization that are essential for the blockchain.

DLT-class solutions aim to combine technical, economic, and mathematical foundations. The blockchain trilemma is a [practical concept](#user-content-fn-1)[^1] that suggests that achieving the perfect balance between decentralization, scaling, and security in blockchain systems is not possible. An alternative approach to decomposing the architecture of distributed computing was proposed to address the blockchain trilemma. This approach concentrates on separating various system properties into different layers, with the aim of achieving a resolution of the blockchain trilemma. The traditional representation of the blockchain in the Open Systems Interconnection (OSI) model assumes a significant interconnection between the layers to form a single solution. However, a new approach to blockchain architecture allows for the concept of a set of relatively independent solutions, with each layer having its own structure and priorities. This approach allows for more flexibility and customization in designing blockchain solutions that address the blockchain trilemma.

![Figure 1 Breaking Down the Blockchain Trilemma: A Layered Architecture Approach](https://3210145376-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSvanFNAf6Jf8kwvqcdRQ%2Fuploads%2FuqExhB1PiZgGN5crljtH%2F1.png?alt=media)

Within the framework of this approach, the following components can be distinguished:

**Layer 0 (L0)** represents the physical layer of the blockchain, which includes hardware, Internet protocols, cloud solutions, and protocols that facilitate interaction between different protocols at the architecture level. It also encompasses Blockchain as a Service (BaaS) solutions and Blockchain DevOps infrastructure.

**Layer 1 (L1)** is the base protocol layer of the blockchain architecture, responsible for fundamental blockchain functionality, such as transaction validation and network consensus. Layer 1 prioritizes security, particularly the consensus mechanism. Common Layer 1 blockchain solutions include Bitcoin, Ethereum, Binance Smart Chain (BSC), and Algorand.

**Layer 2 (L2)** solutions work in conjunction with Layer 1 to provide additional features or improvements without compromising the security and scalability of the underlying blockchain network. Examples of L2 solutions include payment channels (Lightning Network, Raiden Network, and Polygon), sidechains, Plasma, sharding, and rollups.

**Layer 3 (L3)** focuses on enabling interoperability, supporting decentralized identity, and providing off-chain computation capabilities. This layer ensures different blockchain networks and systems can communicate and interact seamlessly. It also includes the development of decentralized data storage and exchange solutions, such as IPFS, and off-chain computation solutions like Quant and Chainlink.

**Layer 4 (L4)**, also known as the Application and Blockchain API layer, is the topmost layer of the blockchain architecture. This layer includes applications that use the blockchain network and APIs that allow developers to build decentralized applications (DApps) on top of the blockchain. It is responsible for providing a user interface for accessing blockchain features and interacting with the blockchain network. Examples of applications in Layer 4 include decentralized exchanges, digital asset marketplaces, and voting systems. Blockchain APIs, such as Ethereum's Web3.js and Bitcoin's JSON-RPC API, also operate in Layer 4.

It is important to understand that the layered blockchain architecture model presented is a logical interpretation and, final solutions can span across multiple layers. Moreover, different layers can be utilized for data exchange, considering the workload profiles and specific characteristics such as the amount and dynamics of data transferred, and the required level of security. In the following examples, the DGT platform will be used as an integrated system, utilizing mechanisms from different layers.

[^1]: Although it bears some resemblance to other triple constraints, such as the CAP Theorem and FLP Theorem, the blockchain trilemma is not a mathematical theorem or equation. Rather, it is a concept that reflects the inherent trade-offs in blockchain technology. Although it is not a mathematical theorem, the blockchain trilemma is based on the technical and economic characteristics of blockchain systems and is the subject of ongoing research and debate within the blockchain community
