What Is Lightning Latch?

Lightning Latch Explained

Share this article

The clear need to scale Bitcoin to more users has seen several attempts at creating solutions that provide off-chain settlement; today, Bitcoin users who feel fees are too high can move funds to one of two active side chains or the Lightning Network.

Statechains are another proposed solution for scaling Bitcoin that differs from the side-chain model or the peer-to-peer payment routing of the Lightning Network.

While all these solutions aim to improve Bitcoin’s scalability, they operate in different spheres, making different trade-offs and having different settlement methods. One issue with scaling solutions is that they can’t operate only between themselves and the base layer; they also need to interact with other scaling solutions.

If scaling solutions don’t provide interoperability with one another, they fall back to the constraints of the main chain.

For example, if a Statechain user has to move back to the base chain to pay a Lightning Network user, that defeats the purpose of off-chain transactions.

What does Lightning Latch do?

Developed by Commerceblock for their Mercury Layer statechain protocol, Lightning Latch bridges these two systems.

It allows users to seamlessly swap Bitcoin on the Lightning Network for assets on a statechain and vice versa. The Lightning latch protocol enforces the atomicity of a statecoin transfer and lightning payment—it can be used to sell a statecoin UTXO for an amount of ln-bitcoin in a private and non-custodial way without counterparty risk.

This opens up exciting possibilities for a more integrated ecosystem.

How does Lightning Latch work?

The latch transfer protocol uses the method of Hodl invoices, where funds are locked until the payment hash pre-image is revealed.

A hodl invoice can be resolved in one of two ways:

  1. The payment is complete when the recipient releases the pre-image (to the payment route).
  2. The payment is cancelled unless the recipient releases the pre-image or the invoice expires.

To initiate a trade/swap, a statechain owner would message the server with the batch_id and statechain involved, which would be required to generate a hashlock pre-image for a Lightning payment and a Lightning invoice.

  1. The Lightning network user wanting to buy the statecoins contacts the server to confirm it generated the pre-image.
  2. The current statechain owner then begins the statechain transfer process and uploads the transfer message to the server.
  3. The server is the only one with the pre-image, so the statecoin owner cannot finalize the payment yet.
  4. The statecoin owner verifies the pending Lighting payment and sends a message to remove the first lock on the statecoin.
  5. The Lightning network user verifies the transfer message, and if valid, the server removes their lock, and both parties receive their funds.

Note: In this case, the mercury server is trusted to action the request but never takes custody of any assets or learns anything about the payment.

Benefits of Lightning Latch

  • Improved Liquidity: Lightning Latch allows for a more efficient flow of funds between LN and statechains, potentially increasing liquidity on both sides.
  • Faster Transactions: Users can enjoy the speed and convenience of LN for transactions ultimately settled on the statechain.
  • Greater Flexibility: This bridge unlocks new possibilities for combining the strengths of LN and statechains, catering to a wider range of use cases.

Rebalancing Lightning channels

Rebalancing channels are necessary to keep your Lightning node functional or ensure you can route payments and earn fees. If a node operator has to rebalance in a high-fee environment, they are faced with a tough choice:

  1. Rebalance now at a fee I might not recoup for a long time
  2. Or leave my channel unbalanced until fees are cheaper.

This situation could be better, especially if Lightning is meant to function in high-fee environments. So many node runners have started using the Liquid Network as a mechanism for this, as rising on-chain fees are making swaps into and out of the Lightning Network more expensive.

The Lightning latch functionality would allow node runners to purchase or sell capacity through stablecoins or transfer funds to and from a statechain wallet they own to avoid touching the base chain and save on fees.

Ordinals marketplace

Ordinals use Bitcoin UTXOs and assign their index scheme to attribute ownership to images like NFTs or tokens in the form of BRC-20 tokens or Runes. Since ordinals tether themselves to a certain UTXO, the activity can be migrated off-chain onto a state chain.

While Statechains will not reduce the burden of the minting process, they can migrate the trading and transferring of these “assets” off-chain, leaving more block space available for standard Bitcoin transactions.

Ordinal enjoyers can trade their NFTs and tokens for statecoins or use Lightning Latch to settle their trades using Lightning invoices.

The future of statechain interoperability

Lightning Latch assists state chains in becoming interoperable with more of the Bitcoin ecosystem by enabling seamless asset exchange between LN and state chains; it paves the way for a more efficient and user-friendly experience.

It also makes it more attractive for Lightning native wallets and applications to start entertaining statechain support. We’re already seeing Lightning wallets like Mutiny adopt Fedimint support, while Liquid wallets like Green have added Lightning support.

Given the need to onboard Lightning users in a less custodial-reliant manner while also handling liquidity issues, the ability to add other custody methods to Lightning wallets will become more attractive.

Additionally, as statechain technology matures and adoption grows, we can expect even more innovative applications to emerge, blurring the lines between these scaling solutions, such as the ability for Lightning nodes to route payments by moving stablecoin UTXOs or trading ownership of lightning channels using statecoins.


Do your own research.

If you want to learn more about Lightning Latch, use this article as a starting point. Don’t trust what we say as the final word. Take the time to research other sources, and you can start by checking out the resources below.

Disclaimer: This article should not be taken as, and is not intended to provide any investment advice. It is for educational and entertainment purposes only. As of the time posting, the writers may or may not have holdings in some of the coins or tokens they cover. Please conduct your own thorough research before investing in any cryptocurrency, as all investments contain risk. All opinions expressed in these articles are my own and are in no way a reflection of the opinions of The Bitcoin Manual

Leave a Reply

Related articles

You may also be interested in

FTX repayment plan

How FTX Repayments Will Work

The collapse of FTX in November 2022 marked one of crypto’s largest failures, leaving millions of customers wondering about their funds and a plethora of

Bitcoin ATM bad rap

Bitcoin ATMs Get A Bad Rap

So you want to get some Bitcoin, but you don’t have a bank account or credit card, or you do and don’t want to tie

Cookie policy
We use our own and third party cookies to allow us to understand how the site is used and to support our marketing campaigns.