Bitcoin Institute

Bitcoin ecosystem design — Lightning Network, sidechains, and L1 extensions

Figures: Satoshi Nakamoto

A dark navy technical diagram: a chain of circular nodes linked by a dashed teal line with small padlock icons on the left, a padlocked arc bridging to a cluster of boxed labels on the right, three stacked gold block cubes at bottom left beside a sealed envelope icon, and a cluster of small circles feeding into a diamond and a square icon at bottom right

Introduction

This page is L2 #10 — Ecosystem design (Layer 2, sidechains) in the design-document series. It covers the ecosystem that has grown around Bitcoin’s base chain: payment-channel networks, federated sidechains, on-chain envelope structures, and collaborative mining architectures. These systems share a single dependency — the most-work chain maintained by Bitcoin’s consensus rules — but they differ fundamentally in where they execute, what trust model they assume, and how they settle back to L1.

A critical classification note. Ordinals and Inscriptions are sometimes grouped with “Layer 2” in popular discussion. They are not. They are L1 envelope structures — data embedded directly in on-chain witness space, validated by every full node (and retained by any node that has not pruned old block data), and subject to L1 consensus rules. This page maintains the distinction throughout. An Inscription occupies block weight in the same way a payment output does; a Lightning payment does not.

Where behavior differs between the Satoshi-era implementation (v0.1, January 2009) and modern Bitcoin Core (v27+ baseline), both are noted.

1. Ecosystem layer map

The diagram below classifies the major ecosystem components by their relationship to Bitcoin’s base chain. The vertical axis represents trust and settlement distance: systems higher in the stack settle less frequently on L1 and may introduce additional trust assumptions.

Infrastructure layer

L2 — Off-chain protocols

Bridge layer (anchored to L1)

L1 — Base chain (consensus-enforced)

UTXO set

Script / Tapscript

Witness space

Ordinals / Inscriptions

(L1 envelope data)

Payment channels

(2-of-2 multisig)

Federated pegs

(m-of-n multisig)

Lightning Network

(routed payment channels)

Liquid Network

(federated sidechain)

RSK

(merge-mined sidechain)

Mining pools

(Stratum v1/v2)

Indexers / Explorers

Exchanges / Custodians

LayerSettlementTrust modelExamples
L1 base chainEvery block (consensus-enforced)Trustless — every full node validatesTransactions, Ordinals/Inscriptions, OP_RETURN data
BridgeOn-chain open/close transactionsTrustless (channels) or federated (pegs)2-of-2 funding outputs, Liquid federation multisig
L2 off-chainPeriodic settlement to L1Varies — channel counterparty, federation, or merge-miningLightning Network, Liquid, RSK
InfrastructureOperational — not consensus-relevantService-level trust with the operatorMining pools, block explorers, exchanges

2. Lightning Network design

The Lightning Network is a routed payment-channel network. Two parties lock funds in a shared on-chain output and then exchange signed-but-unbroadcast transactions to update their balances without touching the blockchain. Payments route across multiple channels using hash-time-locked contracts (HTLCs), enabling any Lightning user to pay any other Lightning user without a direct channel between them.

Channel lifecycle

In protocol terms: funding is a 2-of-2 multisig transaction; every balance update exchanges a new commitment transaction and revokes the previous one; and the forced-close path only reaches dispute if the counterparty broadcasts a revoked (already-superseded) commitment state.

Multi-hop payment routing (HTLC)

When Alice pays Carol through an intermediary (Bob), the payment uses a chain of HTLCs that lock atomically: either every hop settles or none does.

In protocol terms: the invoice carries H = SHA-256(R), each HTLC script hashlocks its output to R with a decreasing timelock toward the payee (40 blocks for Alice-to-Bob, 20 for Bob-to-Carol) so the outer hop can never be a shorter fuse than the inner one. Revealing R (on-chain or off-chain, cooperatively) is the only way to claim a hop’s output on the success path; if R never surfaces, each hop instead falls back to its own HTLC-timeout refund once its timelock expires.

Lightning Network properties

PropertyDesign choice
Funding2-of-2 multisig output on L1; requires one on-chain transaction to open
CapacityBounded by the funding output amount; cannot exceed on-chain deposit
UpdatesOff-chain: parties exchange signed commitment transactions; no block confirmation needed
RevocationOld states are revoked by sharing revocation keys; broadcasting a revoked state triggers a penalty
RoutingSource-routed via onion-encrypted HTLC paths (BOLT 4); sender selects the route
PrivacyIntermediary nodes see only their hop, not the full path; sender and receiver are hidden from routing nodes
FinalitySub-second for successful payments; dispute resolution requires on-chain settlement with timelocks
L1 dependencyRelies on OP_CHECKLOCKTIMEVERIFY, OP_CHECKSEQUENCEVERIFY, and SegWit malleability fix (BIP 141)

L1 prerequisites

The Lightning Network could not operate on Satoshi’s v0.1 implementation. It depends on three post-launch additions to Bitcoin’s base chain:

PrerequisiteBIPActivationWhy Lightning needs it
SegWitBIP 1412017Fixes transaction malleability — child transactions (commitment txs) can reference the funding txid before it confirms, without risk of the txid changing
CLTVBIP 652015OP_CHECKLOCKTIMEVERIFY enforces absolute timelocks in HTLC refund paths
CSVBIP 68/1122016OP_CHECKSEQUENCEVERIFY enforces relative timelocks for revocation delay windows

CLTV was not devised specifically for Lightning — see Peter Todd’s BIP 65 proposal for the original specification of OP_CHECKLOCKTIMEVERIFY, later adopted as the timelock primitive non-interactive payment channels depend on.

Every channel open, cooperative close, and forced close is still an on-chain transaction competing for block space on the fee market described there — Lightning moves payment volume off-chain, not the settlement transactions that bookend a channel’s life.

3. Sidechains: Liquid and federated pegs

A sidechain is a separate blockchain that is pegged to Bitcoin: coins move from the main chain to the sidechain (peg-in) and back (peg-out) through a bridge mechanism. The sidechain can define its own block time, transaction format, and feature set while using BTC-denominated value.

Peg-in / peg-out flow (Liquid)

Liquid sidechain

Liquid federation (m-of-n)

Bitcoin main chain

Peg-in:

102 confirmations

Mint L-BTC

Peg-out:

federation signs

main-chain release

User's BTC

locked in federation

multisig address

Watchmen:

monitor main chain

for peg-in deposits

Blocksigners:

produce Liquid blocks

every 60 seconds

L-BTC issued

to user's Liquid address

User transacts

on Liquid

(confidential transactions)

Peg-out request

submitted on Liquid

Sidechain comparison

PropertyLiquid NetworkRSK (Rootstock)
ConsensusFederated (functionary consortium signs blocks)Merge-mined with Bitcoin (same PoW secures both chains)
Block time~60 seconds~30 seconds
Peg mechanismm-of-n federation multisig (Liquid functionaries)m-of-n federation (PowPeg hardware security modules)
Peg-in confirmations102 Bitcoin blocks (~17 hours)100 Bitcoin blocks (~17 hours)
Trust assumptionHonest majority of federation membersHonest majority of federation + merge-mining hash rate
Feature additionsConfidential transactions, issued assetsEVM-compatible smart contracts
Native assetL-BTC (1:1 peg to BTC)RBTC (1:1 peg to BTC)
Trade-offFaster finality and privacy at the cost of federation trustSmart-contract capability at the cost of federation trust

Why not trustless two-way pegs? Bitcoin’s script system cannot verify another chain’s proof of work or state transitions. A fully trustless two-way peg would require a soft fork adding validation logic for the sidechain’s consensus rules — a proposal that has been discussed (Drivechain / BIP 300) but not activated. Existing sidechains therefore rely on federated multisig as the bridge, introducing a trust assumption absent from L1.

4. L1 extensions: Ordinals and Inscriptions

Ordinals and Inscriptions are not Layer 2. They operate entirely within Bitcoin’s L1 consensus rules, using existing witness space to embed arbitrary data into individual satoshis. Every full node processes and validates this data as part of the canonical block; a non-pruning node also stores it indefinitely.

How Inscriptions use witness space

In script terms: the envelope is an unexecuted OP_FALSE OP_IF … OP_ENDIF branch inside the Tapscript witness, so it never runs as code, but every byte of it is still part of the witness the node deserializes, validates, and counts toward block weight.

Ordinal theory: satoshi-level identity

The Ordinal protocol assigns a sequential number to every satoshi based on the order in which it was mined. This numbering is a convention layer — the Bitcoin protocol itself does not distinguish individual satoshis. Ordinal-aware software tracks satoshi movement through transactions using a first-in-first-out (FIFO) mapping of input satoshis to output satoshis.

ConceptMechanismConsensus status
Ordinal numberSequential index assigned to each satoshi by mining orderConvention only — Bitcoin consensus treats all satoshis identically
InscriptionArbitrary data (image, text, JSON) embedded in Tapscript witness via OP_FALSE OP_IF ... OP_ENDIF envelopeConsensus-valid — the data is part of a valid witness and counts toward block weight
Sat trackingFIFO assignment of input satoshis to output positionsConvention only — depends on off-chain indexer interpretation
Rarity modelNamed rarity tiers (common, uncommon, rare, epic, legendary, mythic) based on position relative to halvings and difficulty adjustmentsConvention only — no on-chain enforcement

Why Ordinals/Inscriptions are not L2

CriterionL2 systems (Lightning, sidechains)Ordinals/Inscriptions
Where execution happensOff-chain (separate state machine or channel)On-chain (standard Tapscript witness execution)
Block weight consumptionNone (only opening/closing txs touch L1)Full — every byte counts toward the 4 MWU limit
Full-node storageNone for channel updates; sidechain blocks stored separatelyStored by every Bitcoin full node as part of the block
Consensus validationL1 validates only anchor transactionsL1 validates the entire envelope as part of script execution
Settlement modelPeriodic settlement to L1No settlement needed — already on L1

5. Mining pools

Solo mining has been impractical for individual participants since approximately 2011. Mining pools allow miners to combine hash rate, find blocks collectively, and split rewards proportionally. The pool is an infrastructure-layer participant — it does not change consensus rules, but it concentrates block-template construction authority in pool operators. This is the technical machinery behind the drift the design-vs-current-reality analysis tracks on its mining axis — “one-CPU-one-vote” concentrating into a handful of pools running the Stratum and payout protocols described below. The template itself — which transactions get included, and in what fee-rate order — is built from the same fee-market auction the monetary design page describes; pools change who assembles it, not the underlying rules.

Pool architecture

In practice, a share’s difficulty target is set far below the network’s real target — easy enough that miners submit many per minute, giving the coordinator a steady stream of proof to measure hash rate by, while the real block-solving target is only cleared rarely across the whole pool.

Pool protocols: Stratum v1 vs Stratum v2

PropertyStratum v1 (2012)Stratum v2 (2023+)
Template constructionPool builds the block template; miners hash the headerMiners can build their own templates (Job Declaration protocol)
TransportPlaintext JSON over TCPBinary framing with optional noise-protocol encryption
Transaction selectionPool operator selects which transactions to includeWith Job Declaration: individual miners select transactions
Censorship resistancePool operator has sole authority over block contentMiners can independently construct block content
EfficiencyHigher bandwidth (JSON encoding overhead)Lower bandwidth (binary encoding)
AdoptionNear-universal as of 2025Growing; Demand Pool (DMND) is built on it. Ocean considered it and built its own template protocol, DATUM (2024)

Reward distribution methods

MethodHow it worksVariance for miner
PPS (Pay Per Share)Pool pays a fixed amount per valid share, regardless of whether the pool finds a blockZero variance — pool absorbs all risk
FPPS (Full Pay Per Share)Like PPS, but also distributes estimated transaction fees per shareZero variance — includes fee component
PPLNS (Pay Per Last N Shares)Reward distributed proportionally among shares submitted in the window before a block is foundHigher variance — payment depends on pool finding blocks
Solo (via pool)Miner gets the entire block reward if their share solves the block; nothing otherwiseMaximum variance — equivalent to solo mining with pool infrastructure

6. Ecosystem layer comparison

The table below provides a structural comparison across the four ecosystem categories covered in this page, evaluated against a consistent set of design properties.

PropertyLightning NetworkLiquid (sidechain)Ordinals/InscriptionsMining pools
Layer classificationL2 (off-chain)L2 (separate chain)L1 (on-chain envelope)Infrastructure
Trust modelChannel counterparty (trustless with dispute)Federation (m-of-n multisig)Trustless (consensus-validated)Pool operator (custodial during reward cycle)
L1 block weightMinimal (open/close only)Minimal (peg-in/peg-out only)Full (every byte on-chain)N/A — pools produce L1 blocks
Transaction throughputMillions per second (theoretical)Bounded by Liquid block size (a block a minute)Bounded by L1 block weightN/A
FinalitySub-second (payment)~120 seconds (2 Liquid blocks)~60 minutes (6 Bitcoin confirmations)N/A
PrivacyOnion-routed (sender/receiver hidden from intermediaries)Confidential Transactions (amounts hidden)Fully public (on-chain data)Varies by pool
Required soft forksSegWit (BIP 141), CLTV (BIP 65), CSV (BIP 68/112)None (federation uses standard multisig)Taproot (BIP 341) for Tapscript envelopeNone
Failure modeForce-close channel on-chain; funds recoverableFederation failure: peg-out unavailable until quorum restoredN/A — data is immutably on-chainPool goes offline: miners switch pools; no fund loss

7. Limits of this page

This page covers ecosystem-layer systems at the design level. The following topics are out of scope and addressed in their respective domain pages within the design-document series:

  • Transaction structure and UTXO model — the L1 primitives that Lightning channels and sidechain pegs build upon. Covered in the transaction design page.
  • Taproot and Tapscript mechanics — how witness programs and script-path spends work at the opcode level. Covered in the transaction design page.
  • P2P gossip and block relay — how transactions and blocks propagate across the network before reaching miners or Lightning nodes. Covered in the P2P network design page.
  • Proof-of-work and difficulty adjustment — the consensus mechanism that secures the base chain on which all ecosystem layers depend. Covered in the consensus design page.
  • Fee market and block-template construction — the economic dynamics that determine transaction inclusion priority. Covered in the monetary design page.

Reference external source

https://bitcoin.org/bitcoin.pdf

Other external sources