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

Figures: Satoshi Nakamoto

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 and stored by every full node, 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

Open channel\n(broadcast funding tx)

Funding tx confirmed\n(both parties hold commitment txs)

Update balances\n(exchange new commitment txs,\nrevoke old states)

Mutual close\n(broadcast closing tx,\nsplit funds by final balance)

Unilateral close\n(broadcast latest commitment tx,\ntimelock delay for dispute)

Funds returned to\nindividual wallets

Counterparty broadcasts\nrevoked state

Timelock expires,\nfunds released

Penalty tx claims\nall channel funds

Funding

Open

ClosingCooperative

ClosingForced

Dispute

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.

Carol (payee)Bob (routing node)AliceCarol (payee)Bob (routing node)AlicePayment complete.Bob earned 1 sat routing fee.If Carol never reveals R,both HTLCs expire and refund.Generate random preimage R,compute hash H = SHA-256(R)Invoice containing H and amountHTLC: "Pay Bob 1,001 satsif you reveal preimage of Hwithin 40 blocks"HTLC: "Pay Carol 1,000 satsif you reveal preimage of Hwithin 20 blocks"Reveal R (claim 1,000 sats)Reveal R (claim 1,001 sats)

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

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, validates, and stores this data as part of the canonical block.

How Inscriptions use witness space

Bitcoin block

Transaction

Witness (Tapscript path)

Schnorr signature

Envelope:

OP_FALSE OP_IF

content-type

data push(es)

OP_ENDIF

Input

(spends a Taproot UTXO)

Output

(P2TR to recipient)

This data lives in L1 witness space.

It is consensus-valid, stored by all

full nodes, and counts toward

the 4 MWU block weight limit.

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.

Pool architecture

Bitcoin network

Individual miners

Mining pool

Unconfirmed txs

Work unit

(block header + target)

Work unit

Work unit

Share

(partial PoW solution)

Share

Share

Valid block found:

broadcast to network

Pool coordinator

(constructs block template,

distributes work)

Miner A

(submits shares)

Miner B

(submits shares)

Miner C

(submits shares)

Full node

(mempool, block relay)

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, ~3x reduction)
AdoptionNear-universal as of 2025Growing; supported by Ocean, Demand Pool, and others

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)~60 per secondBounded 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.