Close Menu
  • News
    • Bitcoin
    • Altcoins
    • DeFi
    • Regulation
    • Market Cap
    • Web 3
    • Scam
  • Blockchain
  • NFT
  • Metaverse
  • Analysis
  • Learn
  • Blog
  • Contact
    • Tech7685@gmail.com
What's Hot

XRP – Price on a steady climb – Bullish sentiment becomes stronger

2025-05-15

Pi Network will open source next week, but there is still one catch

2025-05-15

Dubai Government announces a partnership with Crypto.com to accept payments in digital assets

2025-05-14
Facebook X (Twitter) Instagram
  • Contact
  • Terms & Conditions
  • Privacy Policy
  • DMCA
  • Advertise
  • BitcoinPlatform.com
Facebook X (Twitter) Instagram
Free Cryptocurrency – Bitcoin | Altcoins | Blockchain | News Stories Updated Daily
  • News
    • Bitcoin
    • Altcoins
    • DeFi
    • Regulation
    • Market Cap
    • Web 3
    • Scam
  • Blockchain

    Raiinmaker and Elizaos Partner to build ethical and transparent AI systems

    2025-05-14

    Strengthening the future of Music & Web3 Infrastructure

    2025-05-14

    SyntternNet Partners with Hive Intelligence to transfer AI agents to the chains in 60+ block chains

    2025-05-14

    Co-founder of Solana Anatoly proposes a Metablokchain concept

    2025-05-14

    Layer-2 Blockchain explosion ends safe integration on the risks of third parties risks

    2025-05-14
  • NFT

    British Museum puts sculptures from Dürer’s ‘Rhinoceros’ on Bitcoin Blockchain

    2025-05-14

    The Shibuya streaming platform from PPLEPPLEASR is back with 5 epic short films

    2025-05-14

    AI Sports Betting Agent wants to disrupt the Tipster industry using Crypto

    2025-05-14

    Bidding starts at Ross Ulbricht’s pre-judgment and prison thinking of the fact that he is starting a new chapter

    2025-05-14

    Why this Facebook group places the news on NFTS

    2025-05-13
  • Metaverse

    Shib: The Metaverse – Part of the expanding Shiba Inu ecosystem

    2025-01-03

    Experience to Earn: Everdome’s Metaverse Frontier

    2024-12-30

    Beyond Bots: Meta Motivo and the Dawn of Human Digital Life

    2024-12-13

    Exploring NetVRk: What’s Behind This AI-Powered Virtual Universe?

    2024-10-28

    Council of Europe emphasizes the impact of Metaverse on privacy and democracy

    2024-09-05
  • Analysis

    XRP – Price on a steady climb – Bullish sentiment becomes stronger

    2025-05-15

    Robinhood acquires Kevin O’Leary-stunned crypto company Wonderfi for $ 179,000,000

    2025-05-14

    $ 36 is in the cards as a period of 3 months becomes bullish?

    2025-05-14

    Low Cap Nasdaq-Gentered Company reveals $ 300,000,000 fundraising plan to acquire crypto, including the Trump token of the president: report

    2025-05-14

    Why $ 2.69 contains the key

    2025-05-14
  • Learn

    What Is Proof-of-Work (PoW)?

    2025-05-12

    What Is Proof-of-Authority (PoA)?

    2025-05-10

    What Is Proof-of-Stake (PoS)? A Beginner’s Guide

    2025-05-09

    What Is a Layer-1 (L1) Blockchain?

    2025-05-03

    What is a Layer-2 (L2) Blockchain Network Solution?

    2025-05-02
  • Blog
  • Contact
    • Tech7685@gmail.com
Free Cryptocurrency – Bitcoin | Altcoins | Blockchain | News Stories Updated Daily
Home»Blockchain»Mercury Layer’s Lightning Latch Swap Protocol
Blockchain

Mercury Layer’s Lightning Latch Swap Protocol

2024-03-19No Comments7 Mins Read
Share
Facebook Twitter LinkedIn Pinterest Email

Commerceblock has released a new atomic swap protocol for use with statechains on their Mercury Layer protocol. The HSM server has introduced functionality to support atomic swapping of two statechains, as well as forcing an atomic swap of a statechain for a Lightning payment. This is the first example of concretely defined and built interactions between statechains and the Lightning Network. Synergy between both protocols has been postulated since the concept of a state chain was originally proposed by Ruben Somsen, specifically as a way to overcome the limitation of transferring an entire state chain of UTXO at once.

Basic state chain swaps

To support the new swap protocols, the HSM server must add some new fields to the database entries that track each statechain it facilitates. To facilitate statechain-to-statechain exchanges, the server must maintain:

  • Batch_id: A value to associate statechains that are swapped in a group.
  • Batch time: A time that starts a counter after which the statechains can be “reclaimed” if the swap fails.
  • Locked: A value indicating whether or not the state chain is locked and limited to regular transfers.

This allows the HSM server to track and enforce all the variables necessary to ensure a secure atomic swap. When initiating a swap, users must communicate directly with each other to establish a shared batch_id between them. From this point on, they trade all the necessary information needed to enable a normal statechain transfer, and send that information plus the batch_id and batch-time to the server. They essentially start the regular transfer process, but also link the variables to connect the individual state chains as participants in an exchange and how long the timeout period is for that.

The server will apply a lock to each statechain with the same batch_id in the transfer process at this point. Until the timeout expires, or until all statechains in the database using the same batch_id are unlocked by their current owners, the server will not approve any transfers. The nice thing about the way the HSM enforces the swap logic is that it doesn’t matter who contacts the server first. When the server receives a message using a batch_id, it checks each statechain in its database and if there is a pre-existing batch time for that batch_id, it sets it as the same. This ensures that no matter who registers the swap first, they all use the same time value for the timeout function.

See also  Access Protocol launches $25,000 quest with Superboard to introduce transferable subscriptions

Each client involved in the swap at this point checks and downloads the messages that initiated the transfer protocol, and after verifying that they are correct, sends a message to the server to unlock their statechain, thus removing the transfer restrictions cancelled. Whenever someone tries to complete a transfer on the receiver side of one of the statechains involved in the swap, the server checks to see if all statechains with the same batch_id have been unlocked. If even one with the associated batch_id is still locked, the server will not complete a transfer for any of them. If a swap fails before the timeout, the server continues to limit the completion of the swap transfer, but allows the current owners to initialize a new transfer to itself to effectively cancel the swap.

Lightning bolt

The Lightning Latch functionality, which involves swapping a statechain for a Lightning payment, works much the same as the statechain-to-statechain swap. Here are the new fields the server must maintain for the Lightning swap:

  • Batch_id: A value to associate statechains that are swapped in a group.
  • Batch time: A time that starts a counter after which the statechains can be “reclaimed” if the swap fails.
  • Pre-image: The pre-image of the Lightning payment, which is generated by the HSM server.
  • Locked_1 and lock_2: There are two lock fields for the Lightning swap, one authorized by each involved user.

Similar to statechain-to-statechain exchanges, users set and share a random batch_id. The current statechain owner then sends a message to the server with the affected batch_id and statechain and asks it to generate a hashlock preimage for a Lightning payment. This user then generates a Lightning invoice using this preimage, and the second user contacts the server to confirm that it generated the preimage. The current statechain owner then begins the statechain transfer process and uploads the transfer message to the server.

See also  Neon EVM unveils Solana-native framework for Ethereum dApp integration

After confirming this, the second user who attempts to trade for the statechain will initiate the Lightning payment. At this point, the server is the only one with the preimage, so the statechain owner cannot complete the payment yet. The current owner, after verifying the pending Lighting payment, sends an unlock message to the server to remove the first lock from the statechain. The receiver finally verifies the transfer message and if it is valid, it also sends a message to the server to remove the lock.

Now that both locks have been removed, the HSM server will release the preimage to the current statechain owner to complete the Lightning payment, and the statechain transfer to the recipient will be completed.

This plan does require that you can trust the statechain operator to function honestly, but that is not fundamentally a change to the pre-existing trust model of statechain use in general. The operator has no control over users’ funds at any point, nor does it learn anything about the Lightning payment details.

What is this good for?

This scheme is a far cry from the originally posited interaction between statechains and Lightning channels, where one is stacked on top of the other, but even as a simple starting point it offers functional usability for existing Lightning users. Channel rebalancing is a necessity for many nodes; if capacity is pushed completely to one side or the other, the usefulness of that channel for routing payments is limited. Many companies and users have begun to experiment with using Liquid as a mechanism for this, as on-chain costs increase and swaps into and out of the Lightning Network become more expensive.

Statechains provide an alternative mechanism to a federated sidechain to alleviate some of the fees associated with managing channel balances. Instead of having to swap directly to the main chain or use a side chain, funds can be swapped to a state chain and held there until they are needed to swap funds back to a channel. Similar cost savings can be achieved while still retaining the ability to unilaterally claim your funds on the main chain.

See also  Hedera introduces Hitachi America as a member of the Board of Directors

Another potential use case (TRIGGER WARNING) would be the possibility of more efficient ordinal trading marketplaces. Because ordinal numbers are simply an index scheme that follows paths back in the transaction history to specific satoshis, they can easily be taken off-chain into a state chain. That dynamic combined with Lightning Latch could enable cheaper and faster off-chain purchases of ordinal numbers. Someone could build a marketplace where they could be sold directly off-chain via the Lightning Network.

It’s even possible one day that Lightning customers could somehow become aware of which statechain operators trust specific Lightning nodes that Latch can be used to route payments by passing statechains between different nodes instead of conventional Lightning channels.

On the front of pure statechain-to-statechain transfers, this offers the potential for a message passing layer to create a Coinjoin-like system that mixes coins off-chain, similar to the original mixing functionality in Commerceblock’s first statechain implementation.

While it’s a very simple premise, Lightning Latch and its statechain swap functionality opens the first door of statechains that integrate into the existing Lightning Network – and other similar layers to come in the future – in a way that lets them all integrate seamlessly. function as a single network in terms of payment routing and liquidity management. Even as we debate the need and usefulness of covenants, there is still a lot of room to build on what we already have.

You can listen to the Commerceblock team explain the logic beyond the protocol here:

Chat with Dr. @TTrevethan on why you should build a lightning bolt on @mercurylayer #bitcoin #layer2 pic.twitter.com/CKVG9aHTQ6

— Nicholas Gregory (@gregory_nico) March 15, 2024

And for a more technical explanation, here:

Going over the technical details of how lightning bolt will work with @TTrevethan on @mercurylayer #bitcoin #layer2 pic.twitter.com/aQIcjh2ukq

— Nicholas Gregory (@gregory_nico) March 16, 2024



Source link

Latch Layers Lightning Mercury Protocol Swap
Share. Facebook Twitter Pinterest LinkedIn Tumblr Email

Related Posts

Raiinmaker and Elizaos Partner to build ethical and transparent AI systems

2025-05-14

Strengthening the future of Music & Web3 Infrastructure

2025-05-14

SyntternNet Partners with Hive Intelligence to transfer AI agents to the chains in 60+ block chains

2025-05-14

Co-founder of Solana Anatoly proposes a Metablokchain concept

2025-05-14
Add A Comment

Comments are closed.

Top Posts

Kraken NFT Marketplace launches, supports 250 NFT collections

2023-06-08

This is why a green September close is important for the Bitcoin price

2024-09-20

The rise of mobile trade and the power of B2Core Android -app 2.2

2025-03-03
Editors Picks

Bitcoin vs Altcoins – Whale Interest, Market Sentiment and More…

2025-01-12

NFT giants protest Blur and OpenSea over royalty rates

2023-10-16

Upcoming Drops: July 31 – August 6

2023-07-31

IoTeX (IOTX) Price Prediction 2024 2025 2026 2027

2024-03-17
About
About

Our mission is to develop a community of people who try to make financially sound decisions. The website strives to educate individuals in making wise choices about Cryptocurrencies, Defi, NFT, Metaverse and more.

We're social. Connect with us:

Facebook X (Twitter) Instagram Pinterest YouTube
Top Insights

XRP – Price on a steady climb – Bullish sentiment becomes stronger

Pi Network will open source next week, but there is still one catch

Dubai Government announces a partnership with Crypto.com to accept payments in digital assets

Get Informed

Subscribe to Updates

Get the latest news and Update from Free.cc about Crypto, Metaverse, NFT and more.

  • Contact
  • Terms & Conditions
  • Privacy Policy
  • DMCA
  • Advertise
  • BitcoinPlatform.com
© 2025 Free.cc - All rights reserved. Contact: info@free.cc

Type above and press Enter to search. Press Esc to cancel.

  • bitcoinBitcoin(BTC)$102,891.12-0.81%
  • ethereumEthereum(ETH)$2,593.99-2.61%
  • tetherTether USDt(USDT)$1.000.00%
  • rippleXRP(XRP)$2.53-1.85%
  • binancecoinBNB(BNB)$651.19-1.73%
  • solanaSolana(SOL)$175.02-3.57%
  • usd-coinUSDC(USDC)$1.00-0.01%
  • dogecoinDogecoin(DOGE)$0.233974-2.91%
  • cardanoCardano(ADA)$0.79-3.61%
  • tronTRON(TRX)$0.2730450.06%
  • suiSui(SUI)$3.87-3.38%
  • chainlinkChainlink(LINK)$16.78-3.00%
  • avalanche-2Avalanche(AVAX)$24.56-7.18%
  • stellarStellar(XLM)$0.304115-2.34%
  • shiba-inuShiba Inu(SHIB)$0.000016-4.94%
  • hedera-hashgraphHedera(HBAR)$0.204825-4.22%
  • hyperliquidHyperliquid(HYPE)$25.00-3.19%
  • unus-sed-leoUNUS SED LEO(LEO)$8.891.19%
  • the-open-networkToncoin(TON)$3.25-4.98%
  • bitcoin-cashBitcoin Cash(BCH)$398.79-2.47%
  • polkadotPolkadot(DOT)$4.92-5.63%
  • litecoinLitecoin(LTC)$100.03-3.70%
  • moneroMonero(XMR)$345.64-0.66%
  • piPi(PI)$0.88-31.00%
  • pepePepe(PEPE)$0.000014-3.00%
  • bitget-tokenBitget Token(BGB)$4.73-1.98%
  • daiDai(DAI)$1.000.00%
  • ethena-usdeEthena USDe(USDE)$1.00-0.03%
  • uniswapUniswap(UNI)$6.63-4.08%
  • bittensorBittensor(TAO)$445.19-4.97%
  • nearNEAR Protocol(NEAR)$3.01-7.20%
  • aptosAptos(APT)$5.78-4.65%
  • aaveAave(AAVE)$228.69-1.75%
  • okbOKB(OKB)$54.49-0.32%
  • ondo-financeOndo(ONDO)$1.00-3.21%
  • kaspaKaspa(KAS)$0.119468-1.03%
  • ethereum-classicEthereum Classic(ETC)$19.68-4.65%
  • internet-computerInternet Computer(ICP)$5.57-6.09%
  • crypto-com-chainCronos(CRO)$0.101155-1.60%
  • gatechain-tokenGateToken(GT)$21.69-2.72%
  • official-trumpOFFICIAL TRUMP(TRUMP)$13.21-2.69%
  • mantleMantle(MNT)$0.77-3.58%
  • render-tokenRender(RENDER)$5.02-4.91%
  • vechainVeChain(VET)$0.029937-5.62%
  • polygon-ecosystem-tokenPOL (prev. MATIC)(POL)$0.246404-5.27%
  • ethenaEthena(ENA)$0.389562-9.98%
  • usd1World Liberty Financial USD(USD1)$1.00-0.06%
  • arbitrumArbitrum(ARB)$0.425194-6.45%
  • filecoinFilecoin(FIL)$3.02-6.38%
  • algorandAlgorand(ALGO)$0.232583-6.47%
  • bitcoinBitcoin(BTC)$102,891.12-0.81%
  • ethereumEthereum(ETH)$2,593.99-2.61%
  • tetherTether USDt(USDT)$1.000.00%
  • rippleXRP(XRP)$2.53-1.85%
  • binancecoinBNB(BNB)$651.19-1.73%
  • solanaSolana(SOL)$175.02-3.57%
  • usd-coinUSDC(USDC)$1.00-0.01%
  • dogecoinDogecoin(DOGE)$0.233974-2.91%
  • cardanoCardano(ADA)$0.79-3.61%
  • tronTRON(TRX)$0.2730450.06%
  • suiSui(SUI)$3.87-3.38%
  • chainlinkChainlink(LINK)$16.78-3.00%
  • avalanche-2Avalanche(AVAX)$24.56-7.18%
  • stellarStellar(XLM)$0.304115-2.34%
  • shiba-inuShiba Inu(SHIB)$0.000016-4.94%
  • hedera-hashgraphHedera(HBAR)$0.204825-4.22%
  • hyperliquidHyperliquid(HYPE)$25.00-3.19%
  • unus-sed-leoUNUS SED LEO(LEO)$8.891.19%
  • the-open-networkToncoin(TON)$3.25-4.98%
  • bitcoin-cashBitcoin Cash(BCH)$398.79-2.47%
  • polkadotPolkadot(DOT)$4.92-5.63%
  • litecoinLitecoin(LTC)$100.03-3.70%
  • moneroMonero(XMR)$345.64-0.66%
  • piPi(PI)$0.88-31.00%
  • pepePepe(PEPE)$0.000014-3.00%
  • bitget-tokenBitget Token(BGB)$4.73-1.98%
  • daiDai(DAI)$1.000.00%
  • ethena-usdeEthena USDe(USDE)$1.00-0.03%
  • uniswapUniswap(UNI)$6.63-4.08%
  • bittensorBittensor(TAO)$445.19-4.97%
  • nearNEAR Protocol(NEAR)$3.01-7.20%
  • aptosAptos(APT)$5.78-4.65%
  • aaveAave(AAVE)$228.69-1.75%
  • okbOKB(OKB)$54.49-0.32%
  • ondo-financeOndo(ONDO)$1.00-3.21%
  • kaspaKaspa(KAS)$0.119468-1.03%
  • ethereum-classicEthereum Classic(ETC)$19.68-4.65%
  • internet-computerInternet Computer(ICP)$5.57-6.09%
  • crypto-com-chainCronos(CRO)$0.101155-1.60%
  • gatechain-tokenGateToken(GT)$21.69-2.72%
  • official-trumpOFFICIAL TRUMP(TRUMP)$13.21-2.69%
  • mantleMantle(MNT)$0.77-3.58%
  • render-tokenRender(RENDER)$5.02-4.91%
  • vechainVeChain(VET)$0.029937-5.62%
  • polygon-ecosystem-tokenPOL (prev. MATIC)(POL)$0.246404-5.27%
  • ethenaEthena(ENA)$0.389562-9.98%
  • usd1World Liberty Financial USD(USD1)$1.00-0.06%
  • arbitrumArbitrum(ARB)$0.425194-6.45%
  • filecoinFilecoin(FIL)$3.02-6.38%
  • algorandAlgorand(ALGO)$0.232583-6.47%