Understanding Bitcoin's Three Main Layers
Bitcoin doesn't operate on a single network anymore. Over the past decade, specialized layers have been built on top of the base protocol to handle different types of transactions. Think of it like a postal system: you can send a registered letter for maximum security and a paper trail, use express mail for speed, or send a sealed package for privacy. All three use the same postal infrastructure, but each serves a different purpose.
The Mainchain (Base Layer)
The Bitcoin mainchain is the foundational layer. Every block is secured by proof-of-work, validated by thousands of nodes worldwide, and considered final after sufficient confirmations. Transactions settle in roughly ten minutes per block, and fees vary based on network demand.
The mainchain is where large-value transactions belong. If you are storing bitcoin long-term or making a major transfer that justifies waiting for confirmations and paying higher fees, this is the layer built for that purpose. Security is high, and finality strengthens with every confirmation. In practice, no higher authority can reverse a deeply confirmed mainchain transaction.
The Lightning Network (Instant Payments)
The Lightning Network is a layer-2 payment network built on top of Bitcoin. It enables near-instant transactions with fees measured in fractions of a sat, the smallest bitcoin unit at one hundred-millionth of a bitcoin. Lightning works through payment channels: two parties lock bitcoin into a shared on-chain address, then exchange thousands of off-chain transactions between themselves. Only the opening and closing transactions hit the mainchain.
Lightning is designed for everyday payments. Coffee, subscriptions, tipping, streaming sats. Transactions settle in seconds, not minutes, and cost almost nothing. Blockstream maintains Core Lightning (CLN), one of the major Lightning Network implementations.
The Liquid Network (Fast Settlements and Privacy)
The Liquid Network is a Bitcoin sidechain, a separate blockchain with its own federated consensus connected to the mainchain by a two-way peg. It adds two capabilities the mainchain doesn't offer: Confidential Transactions and one-minute block times. Confidential Transactions hide both the transaction amounts and asset types from outside observers, visible only to the sender, receiver, and anyone they choose to share the blinding key with.
Liquid also supports asset issuance. Stablecoins like USDT, security tokens, and other Liquid assets all trade on the same network, settled in the same one-minute blocks, with the same privacy protections. For traders, institutions, and anyone who needs both speed and discretion, Liquid fills a gap that neither the mainchain nor Lightning addresses.
Why Move Bitcoin Between Layers?
Each layer optimizes for different properties. No single layer is the best choice for everything, so the right question is which layer fits the job at hand.
Different Jobs, Different Layers
- Long-term storage: Mainchain. Maximum security, final settlement, no counterparty risk beyond your own key management.
- Buying coffee: Lightning. Settles in seconds, fees under one sat. The merchant doesn't wait. You don't overpay.
- Private transfer to a business partner: Liquid. Confidential Transactions ensure the amount and asset type stay between sender and receiver. One-minute confirmation.
- Trading between bitcoin and stablecoins: Liquid. LBTC and USDT settle on the same network. No need to move through a centralized exchange.
- Recurring payments or subscriptions: Lightning. Automate small payments without generating a mainchain transaction each time.
The practical pattern for most users: store the majority of your bitcoin on the mainchain (preferably secured with a hardware wallet), and move smaller amounts to Lightning or Liquid as needed for specific tasks.
Moving Bitcoin to the Lightning Network
Getting bitcoin onto Lightning requires opening a payment channel. A channel is a two-party agreement, locked by an on-chain transaction, that allows off-chain payments to flow between participants.
Step 1: Fund a Channel
To open a Lightning channel, you broadcast an on-chain transaction that locks bitcoin into a 2-of-2 multisig address shared between you and a channel partner (usually a Lightning node). The channel-open flow is specified in BOLT 2 (peer protocol), and the funding transaction's output format, a P2WSH 2-of-2 multisig, is specified in BOLT 3 (transaction and script formats). This funding transaction, known as the "channel open" transaction, hits the mainchain and pays a normal on-chain fee. The channel becomes active once the transaction reaches the minimum confirmation depth (typically three to six confirmations, configurable per implementation).
Once confirmed, that bitcoin is committed to the channel. You can send payments up to your side of the channel balance and receive up to the amount on your partner's side (inbound liquidity), without touching the mainchain again.
Step 2: Use the Channel
With an open channel, every Lightning payment updates the balance between you and your channel partner. Send 50,000 sats to someone? Your side of the channel decreases by 50,000 sats, and the recipient (routed through other channels) receives them instantly. These balance updates happen off-chain, with no mining or per-transaction miner fees.
Step 3: Close the Channel
When you want your bitcoin back on the mainchain, you close the channel. A cooperative close broadcasts a single on-chain transaction that distributes the final balances to both parties. The bitcoin returns to your on-chain wallet, minus the on-chain fee for the closing transaction.
Important: closing a channel is an on-chain transaction. It pays mainchain fees and requires confirmations. If the mainchain is congested, this can be expensive and slow. Plan channel closures for low-fee periods when possible.
What Happens to Your Bitcoin
Your bitcoin never leaves the Bitcoin network. When it's "on Lightning", it's locked in an on-chain multisig address with cryptographic guarantees that you can reclaim your share at any time by closing the channel. Lightning is a protocol for updating balances that are ultimately enforced by the mainchain, not a separate blockchain.
Moving Bitcoin to the Liquid Network
Moving bitcoin to Liquid is called a peg-in. The process converts mainchain bitcoin into Liquid bitcoin (LBTC) at a 1:1 ratio. LBTC functions identically to bitcoin in terms of value, but with Liquid's added properties: Confidential Transactions, one-minute blocks, and access to Liquid's asset ecosystem.
The Peg-in Process
- Generate a peg-in address: Using peg-in-capable software (a Liquid node running Elements Core; some third-party wallets also support peg-ins), generate a peg-in address. This is a special Bitcoin address controlled by the Liquid Federation, the distributed group of members that operates the Liquid Network. The Blockstream app moves bitcoin between the mainchain and Liquid via built-in chain swaps rather than direct peg-ins.
- Send bitcoin to the peg-in address: From your Bitcoin wallet, send the amount you want to convert. This is a standard mainchain transaction.
- Wait for confirmations: The Liquid Federation requires 102 Bitcoin block confirmations before issuing LBTC. At roughly ten minutes per block, this takes approximately 17 hours. The confirmation threshold exists for security; it ensures the mainchain transaction is deeply buried and practically irreversible before new LBTC is minted.
- Receive LBTC: After 102 confirmations, the equivalent amount of LBTC appears in your Liquid wallet, minus a small network fee. Your mainchain bitcoin is now held by the federation, and you hold LBTC on the Liquid Network.
Peg-In Mechanics Under the Hood
The peg-in address is derived from the Liquid Federation's multisig script. When you send bitcoin to this address, the federation's block signers monitor the Bitcoin mainchain for deposits. The 102-confirmation requirement (defined in the Elements codebase as pegin_confirmation_depth) serves a specific purpose: it ensures the deposit transaction is buried deep enough that a chain reorganization reversing it is economically infeasible. Reorganizations on Bitcoin have historically been shallow; outside of two early incidents caused by software bugs (a roughly 24-block reorganization in March 2013 and the 2010 value-overflow fix), observed reorganizations have been only a few blocks deep, and none has approached 102 blocks. At 102 blocks, the cost of reorganizing would exceed the total value of most peg-in transactions many times over.
Once the confirmation threshold is reached, your wallet creates a peg-in claim transaction containing the deposit proof (a Merkle inclusion proof showing the transaction exists at the claimed block height); Liquid nodes validate the claim and the corresponding LBTC is created on the Liquid sidechain. The federation's threshold multisig ensures that no single federation member, called a functionary, can unilaterally issue LBTC; signatures from greater than two-thirds of the geographically distributed functionaries are required for every peg operation.
What Is LBTC?
LBTC is the native asset of the Liquid Network. Each LBTC is backed 1:1 by bitcoin held in the federation's custody. LBTC can be sent in Confidential Transactions, traded for other Liquid assets, and transferred with one-minute settlement. When you are ready to move back to the mainchain, LBTC converts back to bitcoin through a peg-out.
Moving Bitcoin Back From Liquid
The reverse mechanism is called a peg-out: LBTC is destroyed on Liquid and the federation releases the equivalent bitcoin on the mainchain. Unlike a peg-in, which anyone can perform, a peg-out can only be executed directly by Liquid Federation members whose Bitcoin addresses are whitelisted through Peg-out Authorization Keys (PAKs). Most users move LBTC back to bitcoin a different way: a Lightning ↔ Liquid swap (covered in the next section), a Liquid to on-chain swap, or a conversion through an exchange or federation member that pegs out on their behalf.
How a Peg-out Works
- LBTC is sent to the federation: The LBTC is burned (destroyed) on the Liquid Network.
- The federation verifies the request: The federation's Watchmen verify the peg-out and confirm the destination is an authorized (PAK-whitelisted) Bitcoin address.
- The federation releases bitcoin: The federation constructs and signs a Bitcoin mainchain transaction releasing the corresponding bitcoin. Peg-outs are processed in batches, and a peg-out round typically completes in roughly 15 to 30 minutes, depending on federation processing and mainchain confirmation times.
- Bitcoin arrives on the mainchain: The bitcoin appears at the destination address after the release transaction confirms on the Bitcoin blockchain.
Peg-out Mechanics Under the Hood
During a peg-out, the LBTC is burned (removed from Liquid's UTXO set) and the federation constructs a Bitcoin mainchain transaction releasing the corresponding bitcoin. The federation uses a distributed signing protocol where greater than two-thirds of the functionaries must sign the release transaction. Each functionary holds its own key; no single functionary can move federation-held bitcoin alone. The watchmen, the same functionaries operating in a second role, secure the bitcoin held by the network and process peg-outs. The federation's multisig wallet also incorporates a timelock: if the network becomes non-functional for an extended period, a set of emergency keys can recover the federation-held bitcoin.
Peg-out Fees and Timing
Peg-outs involve a network fee on the Liquid side plus a mainchain transaction fee paid by the federation. The total cost is typically modest, but it does vary with mainchain fee conditions. For small amounts, a Lightning ↔ Liquid swap (covered in the next section) is often faster and cheaper than a full peg-out.
Lightning ↔ Liquid Swaps
The fastest way to move between Lightning and Liquid is a direct Lightning ↔ Liquid swap. Instead of routing through the mainchain (which would require closing a Lightning channel, waiting for confirmations, then doing a peg-in), a swap converts between the two networks instantly.
How Swaps Work
A Lightning ↔ Liquid swap is an atomic swap: either both sides complete, or neither does. You send LBTC on Liquid and receive bitcoin on Lightning (or vice versa). The swap is trustless, secured by Hash Time-Locked Contracts (HTLCs) that use the same SHA-256 hash preimage on both layers. A swap provider facilitates the exchange but cannot steal funds, because claiming one side of the HTLC requires revealing the preimage, which simultaneously allows the counterparty to claim the other side. Settlement takes seconds.
The Blockstream app supports Lightning ↔ Liquid swaps natively. From a single interface, you can hold bitcoin on Lightning, hold LBTC on Liquid, and swap between them without touching the mainchain. This is the practical bridge between instant payments and private settlements.
When to Use Swaps Instead of Peg-ins/Peg-outs
- Speed: Swaps settle in seconds. A peg-in takes 17 hours. A peg-out takes 15 to 30 minutes.
- Small amounts: For everyday amounts, the swap fee is typically lower than the combined on-chain fees of a peg-in or peg-out.
- Already off the mainchain: If your bitcoin is already on Lightning or Liquid, a swap keeps it on those networks the entire time, with no mainchain transaction required.
For large amounts, the peg-in/peg-out process through the federation is more cost-effective. Swaps work best for the amounts you actively use, not the amounts you store.
Choosing the Right Layer
Here is a practical decision framework. Match your activity to the layer that handles it best:
| Activity | Best Layer | Why |
|---|---|---|
| Long-term savings | Mainchain + hardware wallet | Maximum security. No counterparty risk. Final settlement. |
| Instant payments | Lightning Network | Settles in seconds. Fees under one sat. |
| Private transactions | Liquid Network | Confidential Transactions hide amounts and asset types. |
| Trading (BTC ↔ stablecoins) | Liquid Network | LBTC and USDT on the same network. One-minute settlement. |
| Small everyday purchases | Lightning Network | Near-zero fees. Instant confirmation. Accepted at growing number of merchants. |
| Payroll or recurring payments | Lightning Network | Automate regular payments without per-transaction on-chain fees. |
| Institutional settlement | Liquid Network | Confidential, fast, supports multisig governance and asset issuance. |
| Large infrequent transfers | Mainchain | Worth paying the fee for immutable, globally verified settlement. |
Most users end up with bitcoin across multiple layers simultaneously: a hardware-wallet-secured cold storage on the mainchain, a Lightning balance for spending, and some LBTC on Liquid for trading or private transfers.
For Liquid holdings, hardware wallet security is available through Jade Plus, which offers native Liquid support. Your LBTC stays hardware-wallet-secured, with air-gapped QR code signing for transactions. It is the only Bitcoin hardware wallet with native Liquid support.
Step-by-Step Walkthrough: A Full Cross-Layer Journey
Here is a complete example showing how bitcoin moves through all three layers for different purposes. This walkthrough follows a single user through a realistic sequence of transactions.
Starting Point: Bitcoin on the Mainchain
You have bitcoin in a self-custodial wallet, secured by a hardware wallet. You want to: (1) make a private payment to a business partner, (2) pay for a service that accepts Lightning, and (3) return remaining funds to cold storage.
Step 1: Mainchain to Liquid (Peg-in)
- Open your Liquid-compatible wallet and generate a peg-in address.
- From your mainchain wallet, send 0.05 bitcoin to the peg-in address.
- Wait for 102 Bitcoin block confirmations (approximately 17 hours).
- 0.05 LBTC (minus a small fee) appears in your Liquid wallet.
Step 2: Make a Private Payment on Liquid
- Send 0.03 LBTC to your business partner's Liquid address.
- The transaction uses Confidential Transactions automatically. The amount and asset type are hidden from anyone who views the transaction on Blockstream Explorer. They can see a transaction occurred, but not the amount or what was sent.
- The transaction confirms in the next Liquid block, roughly one minute.
Step 3: Liquid to Lightning (Swap)
- You still have roughly 0.02 LBTC. You need to pay for a service that accepts Lightning.
- Using the Blockstream app, initiate a Lightning ↔ Liquid swap: send LBTC, receive bitcoin on Lightning.
- The swap completes in seconds. Your Lightning balance reflects the converted amount.
Step 4: Pay With Lightning
- Scan the merchant's Lightning invoice (a QR code or payment link).
- Confirm the payment. It settles in seconds.
- The merchant receives the payment instantly. No waiting for block confirmations.
Step 5: Lightning Back to Mainchain (Channel Close)
- With the remaining Lightning balance, you decide to move it back to cold storage.
- Close your Lightning channel. The closing transaction broadcasts to the mainchain.
- After confirmation, the bitcoin arrives in your mainchain wallet.
- Transfer it to your hardware wallet for long-term storage.
Total journey: mainchain (cold storage) to Liquid (private payment) to Lightning (instant payment) to mainchain (cold storage). Each layer handled the task it was built for.
Fees, Timing, and Privacy: A Layer-by-Layer Comparison
| Property | Mainchain | Lightning Network | Liquid Network |
|---|---|---|---|
| Settlement time | ~10 min per block; 6 confirmations (~60 min) for high-value | A few seconds | ~1 minute (one Liquid block) |
| Transaction fees | Variable; depends on mempool congestion (can range from <1,000 sats to 50,000+ sats) | Typically <1 sat for routing; near-zero for direct channel payments | ~0.1 sats/vbyte (consistently low) |
| Privacy | Public. All amounts and addresses visible on-chain. | Moderate. Payments are off-chain, but channel opens/closes are public. Routing nodes see partial information. | Strong. Confidential Transactions hide amounts and asset types. Only sender, receiver, and blinding key holders see details. |
| Security model | Full proof-of-work. Thousands of nodes. Highest security. | Secured by mainchain (channel disputes settled on-chain). Requires online monitoring or watchtowers. | Federated. Secured by a geographically distributed federation of functionary operators. Greater than two-thirds threshold for peg operations. |
| Capacity | A few transactions/second on-chain (bounded by block weight) | Theoretically unlimited (off-chain) | Higher than mainchain; limited by block size and 1-min cadence |
| Best for | Large transfers, long-term storage, final settlement | Small payments, point-of-sale, streaming sats, micropayments | Private transfers, trading, institutional settlement, asset issuance |
Cost of Moving Between Layers
| Route | Method | Approximate Time | Fee |
|---|---|---|---|
| Mainchain → Lightning | Open channel | ~30-60 min (on-chain confirmations) | Standard on-chain fee |
| Lightning → Mainchain | Close channel | ~30-60 min (on-chain confirmations) | Standard on-chain fee |
| Mainchain → Liquid | Peg-in | ~17 hours (102 confirmations) | On-chain fee + small Liquid fee |
| Liquid → Mainchain | Peg-out | ~15-30 minutes | Liquid fee + on-chain fee |
| Lightning ↔ Liquid | Swap | Seconds | Swap service fee (~0.1-0.5%) |
Common Mistakes to Avoid
Sending to the Wrong Address Type
Each layer uses a different address format: a Liquid address is not a Bitcoin mainchain address, and a Lightning invoice is not a Liquid address. Sending bitcoin to a Liquid address on the mainchain, or vice versa, can result in lost funds. Always verify you are using the correct address type for the layer you intend to transact on. Modern wallets display clear labels, but double-check before confirming any transaction.
Not Waiting for Sufficient Confirmations
Peg-ins require 102 confirmations. That requirement is a deliberate security parameter that protects the integrity of the Liquid peg, not a bug or an adjustable setting. If you initiate a peg-in and start wondering where your LBTC is after two hours, the answer is to wait. The full 102-confirmation window takes approximately 17 hours. Use Blockstream Explorer to track your mainchain transaction's confirmation count.
Losing Lightning Channel State
Lightning channels maintain state: a record of the current balance between you and your channel partner. If your device loses this state data (through a crash, failed backup, or data loss), you risk broadcasting an outdated state when closing the channel. This can cause you to lose funds or trigger a penalty transaction. Always use a wallet that supports automatic channel backups, and store your backup where you can recover it.
Using the Wrong Layer for the Job
Paying for coffee on the mainchain works, but you may pay a fee that rivals what the coffee costs and wait roughly ten minutes for a single confirmation. Storing your life savings on a Lightning channel works, but you introduce channel management complexity and online-monitoring requirements. Match the layer to the task. The comparison table above is your guide.
Forgetting About On-chain Fees When Entering or Exiting Lightning or Liquid
Every move between the mainchain and Lightning or Liquid involves at least one mainchain transaction (channel open/close or peg-in/peg-out). These on-chain transactions pay mainchain fees, which fluctuate with demand. If you move small amounts frequently, the on-chain fees for entering and exiting these networks can eat into the cost savings you gained by using them in the first place. Batch your movements. Move a useful amount off the mainchain, use it for multiple transactions, then exit when you are done.
Frequently Asked Questions
Can I lose my bitcoin when moving it between layers?
If you follow the correct process for each layer, no. Peg-ins, peg-outs, channel operations, and swaps are all designed with cryptographic guarantees. HTLC-based swaps use OP_CHECKLOCKTIMEVERIFY to ensure funds are refunded if a swap does not complete before the timeout. Lightning channels use commitment transactions with revocation keys to prevent cheating. Peg-ins are protected by the 102-confirmation depth requirement. The risks come from user error: sending to the wrong address type, losing Lightning channel state, or using an untrusted swap provider. Use established wallets, verify addresses, and maintain backups.
Why does a Liquid peg-in take 17 hours?
The 102-confirmation requirement is a security measure defined in the Elements codebase as pegin_confirmation_depth. It ensures that the Bitcoin mainchain transaction depositing funds into the federation is deeply buried in the blockchain and practically impossible to reverse. At 102 blocks (roughly 17 hours of cumulative proof-of-work), the cost of a reorganization attack would exceed the value of virtually any peg-in. This protects the 1:1 peg between bitcoin and LBTC. Shorter confirmation windows would increase the risk of a double-spend attack against the federation.
Is LBTC the same as bitcoin?
LBTC is pegged 1:1 to bitcoin and can always be converted back through a peg-out. However, LBTC exists on the Liquid Network, which uses a federated security model rather than proof-of-work. This means LBTC carries a different trust assumption: you trust the Liquid Federation (a geographically distributed group of functionary operators) to honor the peg. For most practical purposes, LBTC functions as bitcoin with added privacy and speed, but the security model is different from the mainchain.
What is the cheapest way to move bitcoin between Lightning and Liquid?
A direct Lightning ↔ Liquid swap. It avoids the mainchain entirely, settles in seconds, and typically costs a small percentage fee (roughly 0.1% to 0.5%). The alternative, routing through the mainchain (close channel, wait, peg-in, or peg-out, wait, open channel), involves multiple on-chain fees and hours of waiting.
Do I need separate wallets for each layer?
You usually do not. The Blockstream app supports Bitcoin mainchain, Lightning, and Liquid from a single self-custodial interface. For hardware wallet security on Liquid, Jade Plus ($149-169) provides native Liquid support with air-gapped QR code signing, so your LBTC is secured by the same hardware wallet protection as your mainchain bitcoin. For users starting out, the Jade Classic ($79) offers entry-level hardware wallet security for on-chain bitcoin. You can track peg-in confirmations and verify Liquid transactions using Blockstream Explorer, which supports both the Bitcoin and Liquid blockchains.
Can institutions use the Lightning and Liquid networks?
Yes. The Liquid Network in particular is designed with institutional use cases in mind. Confidential Transactions provide the privacy that trading desks require, one-minute settlement reduces counterparty exposure, and the network supports multisig governance for treasury management. Several exchanges and financial institutions are Liquid Federation members.