Skip to content

We're upgrading our operations to serve you better. Orders ship as usual from Laval, QC. Questions? Contact us

Bitcoin accepted at checkout  |  Ships from Laval, QC, Canada  |  Expert support since 2016

Bitcoin Submarine Swaps: The Trustless Bridge Between On-Chain and Lightning
Bitcoin Education

Bitcoin Submarine Swaps: The Trustless Bridge Between On-Chain and Lightning

· D-Central Technologies · 12 min read

Bitcoin’s base layer is a fortress. Every transaction is etched into an immutable ledger, verified by hundreds of thousands of nodes worldwide, and secured by over 800 EH/s of hashrate — an unfathomable amount of computational power. But fortresses are not fast-food windows. The base layer processes roughly 7 transactions per second. That is by design, not by accident. Security and decentralization demand it.

The Lightning Network solves the speed problem by moving everyday transactions off-chain. But this creates a new problem: how do you move sats between the fortress and the Lightning layer without trusting anyone? How do you bridge two fundamentally different environments — one slow and permanent, the other fast and ephemeral — without handing your keys to a middleman?

The answer is submarine swaps. They are one of the most elegant pieces of Bitcoin engineering most people have never heard of. And if you run a Lightning node, accept Lightning payments, or simply want to manage your sats across layers without touching a centralized exchange, submarine swaps are a tool you need to understand.

On-Chain vs. Off-Chain: Two Layers, One Network

Before diving into submarine swaps, you need to understand what they are bridging. Bitcoin operates on two distinct layers, each with its own trade-offs.

The Base Layer (On-Chain)

On-chain transactions are recorded directly in Bitcoin blocks. Every ~10 minutes, a new block is mined, and each block has limited space. As of 2026, the block reward is 3.125 BTC per block (following the April 2024 halving), and each block can hold roughly 2,500–4,000 transactions depending on their size and complexity.

On-chain strengths:

  • Maximum security — settled by the full weight of Bitcoin’s hashrate
  • Immutability — once confirmed, transactions are practically irreversible
  • Final settlement — no IOUs, no counterparty risk

On-chain weaknesses:

  • Throughput ceiling — ~7 TPS is not Visa-scale
  • Variable fees — during mempool congestion, fees can spike from a few sats/vB to hundreds
  • Confirmation time — 10 minutes on average for a single confirmation, longer for high-value settlement

The Lightning Network (Off-Chain)

The Lightning Network is a Layer 2 protocol built on top of Bitcoin. It uses payment channels — essentially multisig contracts between two parties — to enable instant, near-zero-fee transactions. Only two on-chain transactions are required: one to open the channel, one to close it. Everything in between happens off-chain, privately, and at lightning speed.

Lightning strengths:

  • Instant settlement — payments confirm in milliseconds
  • Negligible fees — fractions of a sat for most payments
  • Privacy — individual transactions are not broadcast to the entire network
  • Scalability — theoretically millions of TPS across the network

Lightning weaknesses:

  • Liquidity constraints — channels have capacity limits
  • Online requirement — nodes must be online to route and receive payments
  • Channel management — balancing inbound and outbound liquidity is non-trivial

Both layers are Bitcoin. Same unit of account, same monetary policy, same 21 million supply cap. But moving sats between them has historically been cumbersome — requiring channel opens, closes, and on-chain fees each time. Submarine swaps change that.

What Is a Submarine Swap?

A submarine swap is a trustless atomic exchange between on-chain Bitcoin and off-chain Lightning Bitcoin. It lets you convert sats from one layer to the other without opening or closing a channel, and without trusting any intermediary to hold your funds during the process.

The name “submarine” comes from the fact that one side of the transaction is visible on the blockchain (the on-chain leg), while the other side happens beneath the surface on the Lightning Network — invisible to blockchain observers.

There are two directions:

Direction What Happens Use Case
On-Chain to Lightning You send on-chain BTC and receive Lightning sats Refilling depleted Lightning channels
Lightning to On-Chain (Reverse Submarine Swap) You send Lightning sats and receive on-chain BTC Moving Lightning earnings to cold storage

The critical innovation: neither party can cheat. The swap either completes atomically — both sides execute — or it fails entirely and both parties keep their original funds. No trust required. No custodian. No exchange account. This is Bitcoin engineering at its finest.

The Engine Under the Hood: Hash Time-Locked Contracts (HTLCs)

Submarine swaps are powered by Hash Time-Locked Contracts, or HTLCs. If you have ever used the Lightning Network at all, you have already interacted with HTLCs — they are the mechanism that routes every Lightning payment through intermediary nodes. Submarine swaps extend this same cryptographic primitive across the on-chain/off-chain boundary.

How HTLCs Work

An HTLC combines two conditions that must be met to claim locked funds:

  1. Hash Lock — The funds are locked behind a cryptographic hash. To claim them, the recipient must reveal the preimage (the original data that produces the hash). Only someone who knows the secret can unlock the funds.
  2. Time Lock — A deadline is set. If the recipient does not claim the funds by revealing the preimage within the time window, the funds automatically return to the sender.

This dual mechanism creates a trustless escrow. The sender knows their funds will come back if the swap fails. The recipient knows they can claim the funds by proving they fulfilled their side. No third party arbitrates — Bitcoin script enforces the rules.

Why HTLCs Matter for Sovereignty

HTLCs are not just a clever technical trick. They embody a core Bitcoin principle: do not trust, verify. Every submarine swap is a peer-to-peer atomic exchange enforced by mathematics and code, not by a company, a terms-of-service agreement, or a legal jurisdiction. This is the kind of infrastructure that makes self-sovereign Bitcoin usage actually possible in practice, not just in theory.

Step-by-Step: How a Submarine Swap Actually Works

Let us walk through a standard on-chain-to-Lightning submarine swap — the most common direction. You have on-chain sats and want Lightning liquidity.

Step 1: The Recipient Generates a Lightning Invoice

The Lightning-side party creates a standard Lightning invoice. This invoice contains the hash of a secret preimage. Think of it as a cryptographic lock: anyone can see the lock (the hash), but only the invoice creator knows the key (the preimage).

Step 2: On-Chain Funds Are Locked in an HTLC

The on-chain sender creates a Bitcoin transaction that locks their funds in a smart contract (HTLC) on the blockchain. This contract says: “These sats can be claimed by whoever reveals the preimage matching this hash — but only within the next N blocks. After that, the sats return to the sender.”

Step 3: The Lightning Payment Is Made

The swap service (or the counterparty) pays the Lightning invoice. When the invoice is paid, the preimage is revealed to the payer — this is how Lightning works by design. The preimage propagates back through the payment route.

Step 4: The Preimage Unlocks the On-Chain Funds

Now that the swap service has the preimage (obtained by paying the Lightning invoice), they use it to claim the on-chain funds locked in the HTLC. The Bitcoin script verifies the preimage matches the hash, and the funds are released.

The Result

The original sender has received Lightning sats (via the paid invoice). The swap service has received on-chain sats (from the HTLC). Nobody trusted anybody. The cryptographic link between the Lightning invoice hash and the HTLC hash guaranteed atomicity — either both legs execute, or neither does.

Step Actor Action Layer
1 Recipient Generates Lightning invoice with hash Lightning
2 Sender Locks BTC in on-chain HTLC using same hash On-Chain
3 Swap Service Pays Lightning invoice, receives preimage Lightning
4 Swap Service Uses preimage to claim on-chain HTLC funds On-Chain

Reverse Submarine Swaps: Lightning to On-Chain

The reverse direction works on the same principle but flips the flow. You have Lightning sats and want on-chain BTC — perhaps to move earnings into cold storage, consolidate UTXOs, or pay an on-chain invoice.

In a reverse submarine swap:

  1. The swap service locks on-chain BTC in an HTLC
  2. You pay a Lightning invoice to the swap service
  3. The preimage from the Lightning payment unlocks the on-chain funds for you

Same atomicity guarantees. Same trustless execution. Same cryptographic enforcement. The only difference is the direction of flow.

Reverse submarine swaps are particularly valuable for Lightning merchants and node operators who accumulate significant Lightning balances and want to periodically sweep funds to the security of on-chain cold storage — without ever touching a centralized exchange.

Why Submarine Swaps Matter: Practical Benefits

Trustless Liquidity Management

Running a Lightning node means constantly managing channel liquidity. Submarine swaps let you rebalance without closing and reopening channels — saving on-chain fees and maintaining your network position. For routing node operators, this is not a nice-to-have; it is essential infrastructure.

No Custodial Risk

Every time you deposit Bitcoin on a centralized exchange to “convert” between layers, you hand custody of your sats to a third party. Submarine swaps eliminate this entirely. Your keys, your coins, the entire time. The swap either completes atomically or it does not happen at all. There is no window where a custodian holds your funds.

Privacy Preservation

Centralized exchanges require KYC. They track your transaction history. They report to regulators. Submarine swaps, by contrast, are peer-to-peer. The on-chain leg is visible, but the Lightning leg is not. And the two legs are not trivially linkable by outside observers. For Bitcoiners who value financial privacy — as everyone should — this matters.

Lower Fees Than Channel Operations

Opening and closing Lightning channels requires two separate on-chain transactions, each subject to prevailing fee rates. Submarine swaps require only one on-chain transaction (the HTLC), reducing the fee overhead by roughly half compared to a close-and-reopen cycle.

Merchant and Business Applications

Businesses accepting Lightning payments need a way to periodically move revenue to secure on-chain storage. Submarine swaps provide this off-ramp without exchange accounts, withdrawal delays, or counterparty exposure. For a Canadian business accepting Bitcoin, this is a practical tool for treasury management.

Real-World Tools for Submarine Swaps

Submarine swaps are not just a theoretical construct. Several production-ready tools make them accessible today:

Tool Type Description
Boltz Non-custodial exchange Open-source, trustless submarine swaps with a clean web interface. No account required.
Loop (Lightning Labs) Liquidity tool Loop In (on-chain to Lightning) and Loop Out (Lightning to on-chain) for LND node operators.
Peerswap Channel rebalancing Peer-to-peer submarine swaps directly between Lightning node operators.
Phoenix Wallet Mobile wallet Automates submarine swaps transparently — on-chain payments are automatically swapped to Lightning.
Breez Mobile wallet Lightning-first wallet with built-in swap capabilities for seamless on-chain/off-chain management.

The trend is clear: submarine swaps are being abstracted away into user-friendly interfaces. Many Lightning wallet users perform submarine swaps daily without even realizing it — the wallets handle the HTLC mechanics behind the scenes.

Submarine Swaps and the Mining Connection

What does this have to do with Bitcoin mining? More than you might think.

Miners earn block rewards and transaction fees on-chain. But the Lightning Network is where Bitcoin’s payment future is being built. As a miner, understanding how to move your on-chain earnings to Lightning — and back — without custodial intermediaries is part of maintaining sovereignty over your operation.

Consider these scenarios:

  • Spending mining revenue — You mine sats on-chain but want to spend them at a Lightning-accepting merchant. A submarine swap converts your on-chain sats to Lightning instantly.
  • Running a Lightning node alongside your miner — Many home miners also run Lightning nodes. Submarine swaps are essential for managing channel liquidity as your node routes payments.
  • Accepting mining pool payouts via Lightning — Some pools offer Lightning payouts. If you need those sats on-chain for cold storage, a reverse submarine swap handles it trustlessly.

At D-Central, we equip home miners with the hardware to earn sats on-chain — from open-source miners like the Bitaxe to full-scale ASIC setups. Understanding submarine swaps is the next step in the self-sovereign mining stack: mine your own sats, manage your own liquidity, spend on your own terms.

Limitations and Considerations

Submarine swaps are powerful, but they are not perfect. Here is what to keep in mind:

Fees

Swap services charge fees — typically 0.1% to 1% of the swap amount, plus the on-chain transaction fee for the HTLC. For large swaps, this is negligible. For very small amounts, the on-chain fee component can be proportionally significant.

On-Chain Confirmation Time

The on-chain leg of a submarine swap requires at least one block confirmation (~10 minutes). During periods of high mempool congestion, this can take longer if you set a low fee rate. The Lightning leg is instant, but the overall swap time is bounded by the slower on-chain component.

Amount Limits

Swap services typically impose minimum and maximum swap amounts. These limits are driven by the service’s on-chain UTXO availability and Lightning channel capacities. For very large amounts, you may need to perform multiple swaps.

Routing Failures

The Lightning payment leg can fail due to insufficient liquidity along the route, channel capacity limitations, or node availability. When this happens, the on-chain HTLC simply expires and the funds are returned — you do not lose sats, but you do lose the time spent waiting.

Technical Knowledge

While tools like Phoenix and Breez abstract the complexity, using Boltz or Loop directly requires some understanding of Lightning node operations. The learning curve is real, but it is also rewarding — every piece of Bitcoin infrastructure you understand is another layer of sovereignty you gain.

The Bigger Picture: Building a Sovereign Bitcoin Stack

Submarine swaps fit into a broader philosophy that every Bitcoiner should internalize: minimize trust, maximize verification, control your own infrastructure.

The sovereign Bitcoin stack looks like this:

  1. Mine your own sats — Whether with a Bitaxe solo miner or a full ASIC setup, mining is the purest form of acquiring Bitcoin. No exchange. No counterparty. Just proof-of-work.
  2. Run your own node — Verify your own transactions. Do not trust someone else’s copy of the blockchain.
  3. Self-custody — Your keys, your coins. Hardware wallets, multisig, whatever fits your threat model.
  4. Use Lightning for spending — Fast, cheap, private payments for daily use.
  5. Submarine swaps for liquidity — Move sats between layers trustlessly, without exchanges.

Each piece reinforces the others. Mining creates the sats. Your node verifies them. Self-custody secures them. Lightning makes them spendable. Submarine swaps keep everything fluid. Remove any piece, and you introduce trust — and trust is the single point of failure that Bitcoin was designed to eliminate.

Frequently Asked Questions

What is a Bitcoin submarine swap in simple terms?

A submarine swap is a way to exchange Bitcoin between the main blockchain (on-chain) and the Lightning Network (off-chain) without trusting a third party. It uses cryptographic locks to ensure that either both sides of the exchange complete, or neither does — so you never risk losing your sats.

Are submarine swaps safe?

Yes. Submarine swaps use Hash Time-Locked Contracts (HTLCs) — the same cryptographic mechanism that secures every Lightning Network payment. If anything goes wrong during the swap, the time lock ensures your funds are returned automatically. There is no custody risk because no third party ever holds your Bitcoin.

How much do submarine swaps cost?

Costs vary by service but typically include a service fee (0.1%–1% of the swap amount) plus the on-chain mining fee for the HTLC transaction. The Lightning leg has negligible fees. Overall, submarine swaps are usually cheaper than the alternative of closing and reopening Lightning channels.

What is the difference between a submarine swap and a reverse submarine swap?

A standard submarine swap moves funds from on-chain to Lightning. A reverse submarine swap moves funds from Lightning to on-chain. Both use the same HTLC mechanism and offer the same trustless guarantees — they just flow in opposite directions.

Do I need to run a Lightning node to use submarine swaps?

Not necessarily. Wallets like Phoenix and Breez perform submarine swaps automatically behind the scenes. However, if you want maximum control and the ability to choose swap parameters, running your own node with tools like Loop or Boltz gives you the most sovereignty.

Can submarine swaps fail?

The Lightning payment leg can fail due to routing issues, but if it does, the on-chain HTLC expires and your funds are returned. You do not lose Bitcoin from a failed swap — you only lose the time spent waiting for the time lock to expire.

How long does a submarine swap take?

The Lightning leg is instant. The on-chain leg requires at least one block confirmation, so roughly 10 minutes under normal conditions. During high-fee periods, it may take longer depending on the fee rate set for the on-chain transaction.

How do submarine swaps relate to Bitcoin mining?

Miners earn sats on-chain through block rewards and fees. Submarine swaps let miners move those earnings to the Lightning Network for spending, or manage Lightning node liquidity alongside their mining operation — all without touching a centralized exchange.

Submarine swaps represent the kind of infrastructure that makes Bitcoin’s layered architecture actually work for real people. They are not glamorous. They do not make headlines. But they quietly solve one of the most important problems in Bitcoin: how to move value between layers without trusting anyone.

At D-Central Technologies, we believe that every layer of Bitcoin should be decentralized — from the mining hardware that secures the network to the tools that manage liquidity across its layers. Whether you are setting up your first home miner, running a Lightning node, or building out a full sovereign Bitcoin stack, understanding submarine swaps is part of the journey.

Ready to start mining your own sats? Explore our full catalog of mining hardware — from open-source solo miners to full ASIC setups — and take the first step toward true Bitcoin sovereignty.

Related Posts