Since the inception of Lightning network (LN), one problem has plagued it more than anything else- the fact that Lightning Network has interoperability constraints with the main Bitcoin network despite using the same currency, Bitcoin (BTC).

A new technology named ‘Submarine Swaps’ solves this issue by using a sort of smart contract. This allows addresses on the Bitcoin blockchain (main network, mainnet, mainchain) to send and receive Bitcoin from addresses on the Lightning Network (LN).

What is the Bitcoin Lightning Network?

This separation means that users dealing directly on the Bitcoin blockchain (the mainchain) are unable to directly send or receive funds from a Lightning Network user (a second layer protocol) and vice-versa, until now.

This separation between the Lightning Network and the main network led to some obvious issues. Due to its inability to send to other Bitcoin mainnet users, Lightning Network practically becomes another, smaller network in and of itself. The LN should complement the mainchain, not compete with it.

Bitcoin addresses vs. Lightning Invoice

The Bitcoin network uses addresses as identifiers for sending, receiving and storing coins. Given that the LN operates as an invoicing system, it uses an invoice number. Nonetheless, invoices relate to a Bitcoin multi-signature address and invoices are settled through smart contracts.

What Are Submarine Swaps?

Submarine Swaps is a technology to make the Bitcoin blockchain interoperable with the Lightning Network, a second layer protocol designed to make Bitcoin fast and cheap as it once was.

Submarine Swaps allow users to make trustless transactions (send/receive) between lightning addresses and on-chain addresses (mainchain).

The CTO of Lightning Labs Olaoluwa Osuntokun first came up with the Submarine Swap concept, but Alex Bosworth came to the same idea independently.

For both the LN and the mainchain users, this technology is a welcomed one as it will eliminate any transaction barrier that currently exists between them.

Submarine Swaps developer Alex Bosworth explained that the technology makes it very easy for one to run Lightning Network as the mainnet users will be included.

How do Submarine Swaps work

The technique behind this technology is actually simple. Whenever a Lightning Network user wants to pay someone on the mainnet they can send their funds to a submarine swap contract.

The trustless protocol will proceed to send funds directly to its mainnet wallet. As soon as a transaction with comparable funds is received, the funds are automatically released to the intended recipient. The entire process works from LN to mainnet and vice versa.

Bosworth stated that:

There’s lots of different ways it can be used. So let’s say an exchange wants to send to a lightning invoice but it doesn’t have lightning funds, or it doesn’t have a lightning wallet; in that case, it could ask somebody who does have that to assist them, and then they could do so in a way where its locked to their on-chain unit.

According to Bosworth, Submarine Swaps could be added into wallets, thus making it possible for mainnet users that don’t even know about LN to benefit from the technology (fast and cheap transactions).

He pointed out that the technology is a flexible one, and the swap providers could be the one and the same person. He believes that the reward for transactions will be enough to convince users to put their Bitcoin to work, and this will lead to adequate liquidity.

Submarine Swaps begin beta testing

Bosworth believes that the technology is in its early stage though it is currently being tested in the main Bitcoin network. Although, he added a note of caution:

“[…] things are moving along but I wouldn’t say it’s like super safe because not everything is 100 percent yet.”

Lightning Network users continue to witness growing functionality thanks to the efforts of the crypto community. The development of the Submarine Swap helps LN in its quest to provide users with a more favorable Bitcoin experience.

In the meantime, the Lightning Network (LN) continues to grow every day: