CoinExSmartChain(CSC)| Beginner’s Guide to Layered Architecture of Public Chains

CoinEx Smart Chain
4 min readApr 20, 2023

--

Recently, Ethereum’s Shapella upgrade has become the most talked-about topic in the crypto space. As a leader among public chains, Ethereum has delivered numerous innovative and revolutionary milestones to the market. Numerous emerging public chains that aim to compete with Ethereum have joined the race. Given that public chains are ultimately empowered by blockchain technology, the competition among public chains focuses on the ongoing optimization and innovation in the layered architecture and subsequent improvements on public chains’ performance.

From the Bitcoin network in the earliest days, through Ethereum with smart contracts, to ever-emerging public chains targeting various real-world applications and solutions, although they are all different in their specific implementations, the architecture of public chains generally consists of several layers, namely the hardware infrastructure layer, data layer, network layer, consensus layer, incentive layer, smart contract layer and application layer.

  • Hardware infrastructure layer

Data on the blockchain is stored securely on a server in a data center. When users access apps on the blockchain, the client sends a request to the server. Put simply, the hardware infrastructure layer is a network of devices communicating and exchanging data with each other.

  • Data layer

The data layer, also referred to as the data transmission layer, stores all transaction data on the chain in a secure and immutable way, functioning like a database. When a certain number of transactions are verified by nodes, the data is bundled into a block and connected to the previous block of data on the blockchain (except for the genesis block). This is the process of data storage on the data layer. It involves two important components: Merkle trees and hash functions, both of which ensure that the data is immutable, complete and secure.

  • Network layer

The peer-to-peer (P2P) layer of the blockchain enables nodes to exchange transaction data and reach a consensus on the validity of transactions. The network layer is designed to facilitate the P2P exchange of information and drive communication between nodes. This layer, also known as the propagation layer, mainly includes the P2P network mechanism as well as the data transmission and validation mechanism.

  • Consensus layer

As the most critical layer in blockchain operations, the consensus layer is responsible for validating transactions. It requires a certain number of nodes to verify one transaction. Therefore, every transaction is processed by multiple nodes that must then arrive at the same result and agree on its validity. This layer relies on consensus mechanisms to verify transactions and add them to the blockchain. Commonly-used consensus mechanisms include Proof of Work (PoW), Proof of Stake (PoS) and Delegated Proof of Stake (DPoS). Currently, most public chains in the market are innovating on the PoS consensus, such as Ethereum, Fantom, and CoinEx Smart Chain (CSC).

  • Incentive layer

Public chains require an incentive mechanism that encourages nodes and users to actively participate in and contribute to the public chain system. This is what the incentive layer is designed for. This layer consists of some incentive measures, including node rewards and transaction fees, to engage nodes in bookkeeping and ensure the safe operation of the whole network. For example, CSC has 101 validators and rewards token holders for becoming a validator.

  • Contract layer

As the basis of the open-source and programmable characteristics of public chains, the contract layer stores all kinds of codes, algorithms and smart contracts. This layer also provides a wide variety of components and services for public chains, such as smart contracts, crypto wallets, DAOs and data transmission.

  • Application layer

This is the layer where smart contracts, chaincodes and decentralized applications (DApps) run. The key ingredients of this layer include user interfaces, scripts, APIs and frameworks. On this layer, smart contracts are triggered when certain agreed-upon conditions are met, such as the expiration date of the contract and the realization of spot prices, and then executed through DApps.

A mature public chain usually consists of the hardware infrastructure layer, data layer, network layer, consensus layer, incentive layer, contract layer and application layer. Understanding the layers and their applications is critical for developers seeking to improve the scalability of public chains through technological innovation. By improving the architecture, developers will be able to build a more secure, efficient and decentralized public chain ecosystem.

--

--