Skip to main content
u
glossaryGlossary

/

Submarine Swaps

What are Submarine Swaps?

A submarine swap is a trustless exchange that moves value between the Lightning Network and an on-chain blockchain, using a hash time-locked contract so neither party has to trust the other. It connects funds that live on Lightning with funds that live on the base chain, letting value cross between the two without a custodian holding it in the middle.

The name describes the mechanism. Part of the swap happens off-chain on Lightning, out of sight like a submarine, and part surfaces on-chain where anyone can see it. The two halves are bound together so they either both complete or both reverse.

How Do Submarine Swaps Work?

Submarine swaps use the same building block as atomic swaps: a Hash Time-Locked Contract (HTLC). An HTLC locks funds behind two conditions. The receiver can claim the funds only by revealing a secret, and if they do not claim within a set time, the sender gets the funds back. Because the same secret unlocks both sides, the on-chain leg and the Lightning leg settle together.

A typical Lightning-to-on-chain swap runs like this:

  1. Request: The user asks a swap provider to convert a Lightning payment into on-chain bitcoin.
  2. Lock: The provider sets up an HTLC that pays out only when the correct secret is revealed.
  3. Pay: The user pays a Lightning invoice tied to that same secret.
  4. Settle: Revealing the secret to claim one side automatically makes the other side claimable, so both legs complete at once.
  5. Refund: If anything stalls, the time lock returns each party's funds after the deadline.

Why Submarine Swaps Matter

Lightning is fast and cheap, but not every wallet, exchange, or contract lives on Lightning. Submarine swaps bridge that gap without asking anyone to trust a middleman.

  • Entering and exiting Lightning: Users can move on-chain bitcoin into a Lightning balance, or cash a Lightning balance out to the base chain.
  • Non-custodial by design: The HTLC guarantees the trade completes or reverts, so no third party ever controls the funds outright.
  • Cross-chain reach: The same pattern extends beyond bitcoin. Providers like Boltz use it to swap between Lightning and other chains and assets, including Liquid, Rootstock, wrapped bitcoin on Arbitrum, and stablecoins such as USDT and USDC.
  • Refund safety: The time lock means a failed or abandoned swap returns funds to their owner rather than leaving them stuck.

Submarine Swaps and Lightning Interoperability

Submarine swaps are one of the reasons the Lightning Network functions as connective tissue between separate systems. By letting value cross cleanly between Lightning and on-chain networks, they turn Lightning into a hub that other chains can route through, rather than an isolated payment network. For a business, that means a single Lightning connection can still reach assets and users that sit on other rails.

Amboss Universe

Explore Our Products

Whether you're an independent node runner, a business looking to accept lightning payments, or have enterprise scale needs, Amboss provides the right solution.

blur