# Architectural Patterns for Blockchain Systems and Application Design
## 4 Pattern Description
### Interactional View Patterns
#### 4.2.2 Layered Application Pattern  
**Summary:** This pattern addresses the decomposition of blockchain application components into interacting parts as complex, heterogeneous entities.  
**Context:** A software application utilizes blockchain technology.  
**Solution:** A blockchain application can be represented in a generic layered architecture, as shown in Figure 6. A typical blockchain application architecture consists of the following layers:  
* _Application layer:_ This layer represents the use cases of blockchain applications, such as intelligent transportation, supply chain traceability, artificial intelligence, robotics,  
Figure 5: The blockchain broker pattern for blockchain applications.  
unmanned aerial vehicles, intelligent manufacturing, business process management, enterprise transformation, insurance processing, risk management, cryptocurrency exchange, games, gambling, social networking, community reputation systems, rights management, and data ownership.
* _Presentation layer_: This layer is related to front-end components that can interact with the blockchain layer via client APIs. This layer consists of a typical UI and digital wallet. It serves the purpose of providing an intuitive way for end-users to use blockchain applications. A digital wallet stores and manages digital keys and crypto assets in a blockchain system [3].
* _Business logic layer_: This layer handles the on-chain computations of the system. An essential component is a smart contract. The other components within this layer are smart contract wallets and application tokens. It also consists of web services to connect the presentation layer with the blockchain layer.
* _Blockchain layer_: The blockchain layer includes the actual blockchain network itself, which is composed of nodes, consensus algorithms, and the blockchain ledger. This layer is responsible for maintaining the integrity and security of the blockchain network and handles data storage, transaction validation, and other core blockchain functions.
* _Support layer_: This layer provides supportive services for other layers. Hosting services and external storage services are required for hosting and operating client applications. This layer also provides IoT-related services, such as processing and analyzing sensor data and transferring them to other layers.
* _Security and privacy layer_: This layer provides security services to the applications and users. It provides user authentication, membership management, access control, and permission management components. These components are responsible for authorizing access to other blockchain components, such as joining the network, invoking smart contracts, and reading from or writing to ledgers.  
**Known uses**: Dtub is a Steem-based video-sharing application that rewards users for sharing their content and commenting on and upvoting others' content. KYC-Chain is an Ethereum-based customer onboarding application for verifying customers' identities and managing the customer lifecycle. Hawk E-Sooter is a Klaytn-based decentralized, shared scooter travel platform.  
**Related patterns**: This pattern shows how the different layers in the on-chain-off-chain pattern are connected.