Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
LABS
Glossary

Layer Composition

Layer composition is the foundational process in generative art where a final image is algorithmically assembled by stacking and combining multiple visual layers in a predetermined order.
Chainscore © 2026
definition
BLOCKCHAIN ARCHITECTURE

What is Layer Composition?

Layer composition is the modular design principle of building blockchain applications by combining specialized execution layers, such as rollups and app-chains, with a foundational settlement and data availability layer.

Layer composition is the architectural paradigm for constructing scalable blockchain applications by decoupling core functions—execution, settlement, consensus, and data availability—into discrete, interoperable layers. This approach moves beyond the monolithic design of early blockchains, where a single chain handles all tasks, to a modular framework. Developers can compose a tech stack by selecting an optimal execution environment (e.g., an Optimistic Rollup for general-purpose apps or a ZK-Rollup for high-security payments), a settlement layer for finality and dispute resolution, and a base layer like Ethereum or Celestia for robust security and data availability. This modularity enables specialization, where each layer can be optimized for a specific function.

The primary driver for layer composition is the blockchain trilemma, the challenge of achieving scalability, security, and decentralization simultaneously. By offloading computation and state updates to dedicated execution layers, the base layer is relieved from processing every transaction, thereby dramatically increasing overall network throughput. Key technical components include rollups (which execute transactions off-chain and post compressed proofs and data to a base layer), validiums (which keep data off-chain), and sovereign rollups (which handle their own settlement). These components are composed with a data availability layer to ensure transaction data is published and verifiable, which is critical for security and trustlessness.

A practical example of layer composition is an application built on Arbitrum, an Optimistic Rollup. The application's logic executes on the Arbitrum Virtual Machine (execution layer). Batches of transaction results and cryptographic proofs are periodically posted to Ethereum (settlement and data availability layer), which secures the assets and verifies the rollup's state. This composition grants the app Ethereum-level security while operating at much higher speed and lower cost. Other examples include using Celestia as a pluggable data availability layer for a custom rollup or Polygon zkEVM as a ZK-execution layer settling on Ethereum.

The ecosystem of composable layers fosters innovation and choice. Developers are not locked into a single chain's limitations and can select components based on their needs for speed, cost, programming language (EVM, SVM, Cairo), or privacy. This has given rise to modular blockchains and Layer 2 networks as first-class components in a stack. However, composition introduces complexity in interoperability, bridging between layers, and shared security models. The future of the stack points towards increasingly seamless cross-layer communication and standardized interfaces, making layer composition the foundational model for scalable, next-generation decentralized applications.

how-it-works
BLOCKCHAIN ARCHITECTURE

How Layer Composition Works

Layer composition is the modular design principle of building blockchain applications by combining specialized layers, such as execution, settlement, and data availability, into a single, cohesive stack.

At its core, layer composition is the architectural practice of assembling a blockchain application from discrete, interoperable layers, each with a dedicated function. This is a departure from monolithic designs, where all functions are bundled into a single base layer like Ethereum. A composed stack might combine a high-throughput execution layer (e.g., an Optimistic or ZK Rollup), a settlement layer for finality and dispute resolution, and a separate data availability layer to store transaction data cheaply. This modularity allows developers to select the optimal component for each function, creating a system that is more flexible, scalable, and cost-efficient than any single layer could be alone.

The technical mechanism enabling this composition is a set of verification proofs and trust-minimized bridges. For instance, a rollup (execution layer) processes transactions off-chain and periodically submits a cryptographic proof—a ZK-SNARK or a fraud proof—to its settlement layer. This proof verifies the correctness of the executed batch. The settlement layer, often a more secure but slower blockchain, acts as an anchor of trust, finalizing the rollup's state. Simultaneously, the raw transaction data is posted to a dedicated data availability layer, ensuring the information needed to reconstruct the state is publicly accessible and verifiable. This separation of concerns is the essence of the modular blockchain thesis.

A prime example of layer composition in practice is a ZK-rollup that uses Ethereum for settlement and Celestia or EigenDA for data availability. The rollup handles execution at high speed, Ethereum's robust consensus provides ultimate security for final settlement, and the external data availability layer significantly reduces costs. This model allows for sovereignty; developers can fork or modify their execution environment without needing permission from the base settlement layer. Furthermore, shared security models, like Ethereum's restaking protocols, can be composed into the stack to bootstrap cryptoeconomic security for new layers, creating a powerful, plug-and-play ecosystem for decentralized application development.

key-features
ARCHITECTURAL PATTERNS

Key Features of Layer Composition

Layer composition is a design paradigm where modular blockchain components are stacked to create specialized execution environments. This approach enables developers to mix and match layers for optimal security, scalability, and functionality.

01

Modular Separation of Concerns

Layer composition decomposes a monolithic blockchain into distinct, specialized layers. This typically involves separating execution (smart contract processing), settlement (dispute resolution and finality), consensus (transaction ordering), and data availability (transaction data storage). Each layer can be optimized independently, allowing for innovation without compromising the entire stack.

02

Sovereign Execution Layers

A sovereign layer, often called a sovereign rollup, is an execution layer that posts its transaction data to a parent chain (like Celestia or Ethereum) for data availability but handles its own settlement and consensus. This grants it maximum autonomy to manage its own fork choice rule, upgrade path, and governance, unlike a smart contract rollup which relies on the parent chain's virtual machine for settlement.

03

Shared Security & Data Availability

Composed layers can leverage a base layer's security and data availability (DA) without inheriting its execution constraints. For example, a rollup uses a Layer 1 (like Ethereum) to guarantee data availability and often for settlement, inheriting its cryptographic security. A validium uses an external DA layer (like a Data Availability Committee or DAC) for higher throughput but with different trust assumptions.

04

Interoperability via Shared Standards

For layers to communicate (e.g., cross-chain asset transfers), they rely on standardized protocols and bridging mechanisms. Key standards include:

  • IBC (Inter-Blockchain Communication): A robust protocol for secure message passing between sovereign chains.
  • Native Bridges: Trust-minimized bridges built into a rollup's protocol.
  • Third-Party Bridges: External, often more centralized, bridging services that connect disparate ecosystems.
05

Customizable Virtual Machines

Execution layers are defined by their Virtual Machine (VM). Layer composition allows developers to choose or build a VM tailored to their application's needs.

  • EVM (Ethereum Virtual Machine): For compatibility with Ethereum's tooling and liquidity.
  • Wasm (WebAssembly): For higher performance and support for multiple programming languages (Rust, C++, Go).
  • Custom VMs: Built for specific use cases, like the SVM (Solana Virtual Machine) for parallel execution or a zkVM for native zero-knowledge proof verification.
06

Example: The Modular Stack

A practical implementation of layer composition is a modular stack:

  1. Data Availability Layer: Celestia or Ethereum (via danksharding).
  2. Settlement Layer: Ethereum or a dedicated settlement chain (like Celesita).
  3. Execution Layer: A rollup (Optimism, Arbitrum, zkSync) or a sovereign chain built with a framework like Rollkit. This stack demonstrates how responsibilities are distributed across specialized components rather than bundled into a single chain.
common-layer-types
LAYER COMPOSITION

Common Layer Types in NFT Art

In generative NFT art, a layer is a distinct visual component (like a background, character, or accessory) that is algorithmically combined with others to create a unique final image. This glossary defines the core layer types used in the composition process.

01

Base Layer

The foundational visual element of an NFT, serving as the canvas upon which all other layers are placed. It defines the core structure and initial color palette of the artwork.

  • Examples: A solid color background, a simple gradient, or a basic character silhouette.
  • Function: Establishes the overall composition and ensures visual cohesion for all subsequent trait combinations.
02

Trait Layer

A discrete visual attribute or feature that is added to a base layer to create variation and uniqueness. Traits are the building blocks of rarity in a generative collection.

  • Examples: Different hats, facial expressions, clothing items, or weaponry for a character PFP.
  • Rarity Tiers: Traits are often weighted, with common traits having a high probability and legendary traits having a very low probability of appearing.
03

Mask Layer

A non-visible layer that defines transparency and clipping boundaries for other layers. It controls where other visual elements can appear.

  • Technical Role: Uses an alpha channel to hide or reveal parts of underlying layers.
  • Use Case: Ensuring a hat sits correctly on a head shape or that glasses appear only over the eye region, preventing visual glitches during composition.
04

Composite Layer

The final, rendered output created by programmatically stacking and blending multiple individual layers (Base + Traits) according to a generative algorithm.

  • Process: The art engine uses metadata (a DNA hash or token ID) to select specific trait files from each layer category and composites them into a single image file (e.g., PNG).
  • Output: This is the final NFT artwork that is minted and stored on-chain or in decentralized storage like IPFS.
05

Rarity & Weighting

The system that assigns probabilities to individual traits within a layer to control their scarcity and distribution across an NFT collection.

  • Mechanism: Each trait file is given a numerical weight; lower weights mean lower probability (higher rarity).
  • Example: A 'Gold Crown' trait might have a weight of 1 (appearing in ~1% of NFTs), while a 'Blue Shirt' might have a weight of 50 (appearing in ~50% of NFTs).
06

Layer Dependencies

Rules that define conditional relationships between layers, ensuring logical and aesthetically consistent trait combinations.

  • Exclusivity Rules: Prevents conflicting traits from appearing together (e.g., "No Hat" layer is selected if a specific helmet is chosen).
  • Requirement Rules: Makes one trait dependent on another (e.g., a "Holding Sword" arm pose requires a "Sword" item layer to also be selected).
on-chain-vs-off-chain
LAYER COMPOSITION

On-Chain vs. Off-Chain Composition

A framework for understanding how modular blockchain components interact, distinguishing between execution that occurs on the base layer versus in separate environments.

On-chain composition refers to the direct, synchronous interaction of smart contracts or protocols that reside and execute on the same base layer blockchain, such as Ethereum mainnet. In this model, a transaction's entire lifecycle—from initiation to final settlement—occurs on the canonical chain. This ensures strong security and atomicity, as the failure of one contract call can revert the entire transaction, but it is constrained by the base layer's performance, cost, and data availability limits. Common examples include a DeFi protocol calling an oracle contract for a price feed or a token swap that routes through multiple on-chain liquidity pools in a single transaction.

Off-chain composition involves coordinating execution across separate systems or layers, where the primary blockchain acts as a secure settlement and data availability layer. This includes interactions between Layer 2 rollups, sidechains, sovereign chains, and off-chain computation environments like oracles or co-processors. Communication is often asynchronous, relying on bridging protocols, state proofs, or fraud proofs. While this model unlocks scalability and specialized functionality, it introduces complexity in security assumptions, trust models, and bridging latency. A user swapping assets between Arbitrum and Optimism via a cross-rollup bridge is engaging in off-chain composition.

The architectural choice between these models defines a system's trust-minimization, latency, and scalability profile. On-chain composition offers maximal security through the base layer's consensus but inherits its bottlenecks. Off-chain composition trades some degree of this native security for performance, creating a spectrum where solutions like validiums (off-chain data) and optimistic rollups (on-chain data with off-chain execution) represent different points of balance. The emerging modular blockchain stack explicitly designs for off-chain composition, with dedicated layers for execution, settlement, consensus, and data availability.

For developers, the distinction is critical for system design. Building with on-chain composition requires optimizing for gas costs and block space, while off-chain composition demands robust cross-chain messaging, proof verification, and failure handling. The industry trend is toward interoperability standards like the Inter-Blockchain Communication (IBC) protocol and shared settlement layers (e.g., Ethereum using EIP-4844 blobs for data) that standardize and secure off-chain composition, moving beyond isolated silos toward a cohesive modular ecosystem.

ecosystem-usage
IMPLEMENTATIONS

Protocols & Projects Using Layer Composition

Layer composition is not just a theoretical concept; it's a foundational architecture actively deployed by leading protocols to solve scalability, sovereignty, and specialization challenges. These projects demonstrate the practical application of stacking modular components.

LAYER COMPOSITION

Technical Details

This section deconstructs the modular architecture of modern blockchains, explaining the distinct roles of execution, settlement, consensus, and data availability layers.

A Layer 1 (L1) blockchain is a base protocol that provides its own consensus mechanism, data availability, and execution environment (e.g., Ethereum, Bitcoin). A Layer 2 (L2) is a secondary protocol built on top of an L1, designed to scale it by handling execution off-chain while leveraging the underlying L1 for security and finality. The core distinction is that L1s are sovereign settlement layers, while L2s are scaling solutions that inherit security from an L1.

Key Differences:

  • Security: L1 provides its own security via proof-of-work or proof-of-stake. L2 derives security from its parent L1.
  • Throughput: L2s (like Optimistic Rollups, zk-Rollups) process transactions off-chain, achieving higher transactions per second (TPS).
  • Finality: Transactions achieve finality on the L1, but L2s may have faster provisional finality.
  • Examples: Ethereum is an L1. Arbitrum and zkSync are L2s built on Ethereum.
LAYER COMPOSITION

Frequently Asked Questions

Clarifying the architecture of blockchain scaling solutions, from foundational layers to modular components.

A Layer 1 (L1) is the base blockchain protocol, such as Ethereum or Bitcoin, responsible for its own consensus, data availability, and execution. A Layer 2 (L2) is a secondary protocol built on top of an L1 to improve scalability and efficiency, handling transactions off-chain before settling finality and security back to the main chain. L2s, like rollups or state channels, inherit the security of their underlying L1 while offering higher throughput and lower fees. The core distinction is architectural: L1 provides foundational security and decentralization, while L2 provides scalability.

ENQUIRY

Get In Touch
today.

Our experts will offer a free quote and a 30min call to discuss your project.

NDA Protected
24h Response
Directly to Engineering Team
10+
Protocols Shipped
$20M+
TVL Overall
NDA Protected Directly to Engineering Team