Submarine Swap

Also: swap-in, swap-out

lightning · advanced

A trustless atomic swap between on-chain bitcoin and an off-chain Lightning payment, secured by HTLCs on both sides.

A submarine swap converts on-chain BTC to Lightning balance, or vice versa, without either party trusting the other. The name comes from the idea that the payment "dives below the surface" of the chain.

Mechanically: the swap provider locks Lightning sats behind an HTLC keyed to hash H. The user reveals the preimage of H on-chain to claim the on-chain BTC the provider had locked there (or symmetrically the other direction). Because both legs share the same preimage, either both legs settle or both refund — atomic and trustless.

Two common use cases:
- Swap-in (on-chain BTC → Lightning balance): A new Lightning node with no inbound liquidity can pay a provider on-chain and receive Lightning sats. Solves the inbound-liquidity bootstrapping problem.
- Swap-out (Lightning balance → on-chain BTC): A routing node draining toward one side of its channels can rebalance by swapping Lightning sats back to on-chain BTC.

Services like Boltz, Lightning Loop, and Submarine Swaps provide the counterparty. Fees are higher than pure Lightning payments — you're paying for liquidity rebalancing plus one on-chain transaction — but it's still the cleanest non-custodial bridge between L1 and L2.

Related terms

Where you'll see this