Atomic swaps_ how the lightning network extends to altcoins – nasdaq. com

Let’s say Alice has 200 litecoins, but prefers 1 bitcoin. Bitcoin exchange canada And Bob has 1 bitcoin, but prefers 200 litecoins. Bitcoin news latest So Alice and Bob agree to trade. What is bitcoin backed by But neither Alice nor Bob trust each other, so neither wants to be the first to send over the coins.


E bitcoin The other may not return the favor.

Atomic swaps utilize a clever trick known as a hash time-locked contract , which in turn leverages the potential of multisignature addresses and time-locks . What is a bitcoin All this is enabled by the basic scripting language found in Bitcoin and most altcoins, including Litecoin.

In short, Alice and Bob submit transactions to both blockchains: one on Bitcoin and one on Litecoin. Bitcoin charts usd The Bitcoin transaction sends 1 bitcoin from Bob to Alice, but Alice can only claim this bitcoin if she reveals a secret number only she knows. Graph of bitcoin value The Litecoin transaction sends 200 litecoins from Alice to Bob, but requires the same secret number on both chains.

When Alice claims her bitcoin, she reveals her secret number on the Bitcoin blockchain. Bitcoin historical price data And with that same secret number, Bob can, in turn, claim his 200 litecoins.

Even though the transactions are on completely different blockchains, they are effectively linked. Bitcoin price drop Bob just needs to monitor the Bitcoin blockchain to see if Alice claimed her bitcoin so that he can claim his litecoins.

All this works today. Bitcoin exchange price But it is a bit of a hassle. Bitcoin value gbp Alice and Bob need to find each other to set up the atomic swap, which then requires several transactions on multiple blockchains.

( Note: there are some extra steps to ensure that Alice actually does claim her bitcoin within a limited amount of time so that Bob can also claim his litecoins in a timely manner. Bitcoin historical prices The specifics are beyond the scope of this article; however, for details on how hash time-locked contracts work, see Understanding the Lightning Network, Part 2: Creating the Network .)

The lightning network is specifically designed for Bitcoin. Official bitcoin website But altcoins that are forked from Bitcoin’s codebase – like Litecoin, Dogecoin or Zcash – are typically capable of hosting lightning networks as well. E money bitcoin Other altcoins, as long as they include similar or more extensive scripting capabilities (like Ethereum or Ethereum Classic), enable similar solutions.

Like atomic swaps, the lightning network utilizes hash time-locked contracts. Bitcoin price twitter Where atomic swaps effectively link blockchains, the lightning network links payment channels. Bitcoin price in 2009 This way, if both Alice and Bob have a payment channel open with Carol, they can transact through Carol, without needing to trust Carol.

And exactly because the underlying mechanics are the same, it’s no stretch to merge the lightning network with atomic swaps. Bitcoin currency exchange This process makes different lightning networks interoperable across blockchains.

Let’s say, for example, that Alice wants to buy a computer from Bob, for which Bob charges 1 bitcoin, but Alice only owns litecoins. Bitcoin price inr Luckily, Carol has a Litecoin channel open with Alice, and a Bitcoin channel open with Bob. Bitcoin price prediction chart So Alice can now send 200 litecoins to Carol, for Carol to send 1 bitcoin to Bob. What is the price of bitcoin Since this is all linked with hash time-locked contracts, Carol effectively acts as a trustless payment processor.

And if Alice and Bob both have a Bitcoin payment channel as well as a Litecoin channel with Carol, they can also swap funds. Bitcoin exchange philippines Alice can send 200 litecoins to Carol, which Carol forwards to Bob. Bitcoin community Bob then sends 1 bitcoin to Carol in exchange, which Carol now forwards to Alice. 4 bitcoins to usd And again, all this is still linked with hash time-locked contracts, so now Carol effectively acts as a trustless altcoin exchange.

Lastly, alternative lightning networks may even improve Bitcoin’s lightning network in some ways. Bitcoin price drop today For example, a bitcoin-to-bitcoin payment could be routed through Litecoin peers, if that happens to be the cheapest route. Bitcoin exchange euro Or, users operating on multiple coins could rebalance their channels. 2 bitcoins to usd If Alice has 400 litecoins but no bitcoins in her channel with Bob, she may want to exchange 200 litecoins to fund her Bitcoin channel.

One is denial of service (DoS) protection. Bitcoin price converter While the mechanics of the lightning network ensure that no peers can steal funds, intermediaries can block or stall the payment process. Bitcoin value now To solve this, channels with non-cooperating peers must be closed. Bitcoin value forecast This form of punishment should make DoS attacks expensive, as non-cooperating peers need to keep opening channels.

But to verify that the channel was closed and the attacker punished, each peer along a payment chain must be able to monitor all participants. Bitcoin price in 2010 Even if only two peers along a chain of six use Litecoin, all six peers should be able to recognize a Litecoin transaction in case the channel is closed.

And of course, lightning networks must first be rolled out. Wiki bitcoin This, in most cases, requires a malleability fix, at least for optimal performance. Bitcoin currency chart Segregated Witness – the malleability fix proposed by the Bitcoin Core development team – currently awaits activation on both the Bitcoin network and on several altcoins , including Litecoin.

Thanks to Amiko Pay developer Corné Plooy and Litecoin inventor Charlie Lee for input. Bitcoin price in 2012 Lee also wrote about the potential of linking Bitcoin and Litecoin lightning networks here .