Although still in testing phase, the lightning network can now be used to send transactions across different blockchains. The Lightning Labs development team successfully swapped testnet bitcoin for testnet litecoin through a lightning channel
"Previous atomic swaps that I have done was on-chain, and had the on-chain limitations of slow [transactions] and high transaction fees, "Litecoin creator Charlie Lee told Bitcoin Magazine, referring to an older trick to exchange different types of coins trustlessly. "Off-chain atomic swaps are significantly better. They are instant, [have] low fees, and better protect one's privacy. "
Cryptocurrency exchanges, near-seamless multi-coin payment processors and more.
Bitcoin and Litecoin
The lightning network is the highly anticipated second-layer payment network to be deployed on top of Bitcoin. It is relatively easy to deploy lightning support for other cryptocurrencies that are forked from Bitcoin's codebase – like Litecoin.
Interestingly, if the lightning network runs on different blockchains, these chains can effectively be linked together. It is possible to send one of the two types of coin and forward another, it is possible to send bitcoins on one end of a channel that will end up as the equivalent in litecoin on the other end.
In a Medium post published in the first week of 2017, Lee explained that this is the potential to create these kinds of "bridges" between the cryptocurrencies made him his weight behind the Segregated Witness (SegWit) soft forks on both Litecoin and Bitcoin.
When sawed on Litecoin last spring, Lee's vision came one step closer to reality. Because the soft fork had not yet activated on Bitcoin at that time, Lightning Labs DECIDED to add Litecoin support to their LND lightning network implementation. Thus, by the time SegWit activated on Bitcoin last summer, LND was already compatible with both chains.
The test network of the two blockchains are now made interoperable through the lightning network for the first time, allowing users to exchange one type of coin for the other.
"The primary advantages over previous solutions are speed, cost and privacy," Lightning Labs developer Conner Fromknecht told Bitcoin Magazine. "Transfers are more or less instant, and do not require the cost of an on-chain transaction. Additionally, the transactions are never broadcast, and leave no trace on the blockchain, offering privacy benefits. And with any luck, these privacy benefits will only continue to improve. "
The Test (and the Potential)
This week's specific test was done on a local machine, on which he created two nodes: "Alice" and "Bob." These two nodes were modified to be able to monitor both the Bitcoin and Litecoin testnets. From a to lightning channel that felt testnet litecoin from Alice to Bob and testnet bitcoin back from Bob to Alice at a fixed exchange rate. While still in an experimental setting, the test was successful; Lightning Labs today published a blog post and a video detailing the results.
In the context of the lightning network. For example, peers on the network could act as cryptocurrency exchanges, competing with one another to offer the best exchange rates.
"Arguably the most important benefit of lightning swaps is the ability to efficiently exchange different currencies without a custodian," Fromknecht said. "Our ecosystem heavily depends on exchanges to fulfill this role today, but Lightning swaps offer users a choice to get the best of both worlds – instant exchanges without relinquishing control of your money."
Similarly, such exchangers could act as payment processors: it would be much easier for users to spend litecoin at merchants that only accept bitcoins (or vice versa). And it's even conceivable that bitcoin-to-bitcoin payments over the lightning network will route via Litecoin hubs, if that's the cheapest way to get funds from A to B.
For Lee, at least, this is not as unrelated as it sounds, and the successful tests mark another step towards his vision for the lightning network on Litecoin and Bitcoin.
"The Litecoin team is excited to work with Lightning Labs to explore the true potential of instant cross-chain atomic swaps," he concluded.
For a more in-depth technical explanation of these kinds of atomic swaps, see our previous article "Atomic Scaps: How the Lightning Network Extends to Altcoins"Or the blog post and video published by Lightning Labs today.