Wednesday, 19 September 2018

Atomic Swap

In the world of cryptocurrency, there is a strong focus on how different ecosystems seemingly compete with one another. It always appears to be Bitcoin against the rest of the markets. When atomic swaps will be introduced, that situation could change rather quickly. The objective of atomic swaps is to create interoperability between altcoins and Bitcoin. It is expected this feature will be introduced by the Lightning Network.


It is safe to say there is a growing need for ways to convert Bitcoin into altcoins and vice versa. Right now this process can only be done through centralized services, such as exchanges. Luckily, it appears a technological solution is just waiting around the corner. That is, assuming we will ever see the Lightning Network activate on the Bitcoin network. The upcoming UASF activation will pave the way for this to happen come August 1st.

This technological feature in question is known as an atomic swap. In some circles, it is also known as atomic cross-chain trading, but it means exactly the same. The concept of atomic swaps is not all that new as it was first introduced back in 2013. It has taken some time until cryptocurrency developers found a way to make this concept become a reality, but it appears the Lightning Network will grant us this power.

An atomic swap works in the same way users would send funds to one another, but there are some major differences. More specifically, it allows users to cross-trade different cryptocurrencies without relying on centralized parties. If user A has bitcoin, and user B wants Ethereum Classic, for example, they can agree to a fixed trading price and complete the transaction immediately.


One might argue using an atomic swap would require a certain degree of trust, but that is not the case. Every atomic swap uses a hashed time-locked contract, which is a part of the scripting language used for most major cryptocurrencies in existence right now. Both parties submit their individual transaction to the appropriate blockchain. User A sends bitcoin on the Bitcoin blockchain, and user B sends ETC on the Ethereum Classic chain. The recipient can only claim this transaction by revealing a secret number.

This results in both transactions being linked to one another, despite them taking place across two different blockchains. The process sounds a lot more complicated than it really is.Or to be more precise, it will be a lot easier on the Lightning Network is successfully activated on the Bitcoin network. Any altcoin forked from Bitcoin’s codebase is more than capable of implementing the Lightning Network as well. Litecoin may be one of the first to do so.  Other currencies require extensive scripting capabilities to make atomic swaps possible.

Once different lightning networks can execute atomic swaps on their own, this whole process will become a lot less complicated. Users can open payment channels on both blockchains and effectively create a transaction processor. This also means users can swap different currencies they do not even own themselves, as long as they have a payment channel to someone who does own said coin. It will, potentially, replace cryptocurrency exchanges altogether. It will take some until atomic swaps become a reality, but it is certainly something to look forward to.



First-Ever Atomic Cross-Blockchain Swap Between Litecoin and Decred Completed


On September 19, the developers behind Litecoin and Decred successfully completed the first-ever cross-blockchain atomic swap between the Decred and Litecoin blockchain networks.

Previously, Litecoin creator Charlie Lee proposed the possibility of performing atomic swaps between litecoin and bitcoin upon the integration of the Bitcoin Core development team’s transaction malleability and scaling solution Segregated Witness (SegWit). On-chain atomic swaps completely eliminate the necessity of intermediaries and third-party service providers such as trading platforms.

For instance, normally, if a user wants to exchange Decred for Litecoin, they would visit cryptocurrency trading platforms such as ShapeShift of Bittrex. But, a cross-blockchain network between the two blockchains enables the user to directly send decred to a litecoin holder and receive litecoin back through the same channel without using an external platform or exchange.

“This is an important step in a direction that allows users to conduct trustless, cross-chain, over-the-counter (“OTC”) trades without a third party. This disintermediates the exchange process between cryptocurrencies that support these swap transactions,” wrote the Decred development team.

On-chain atomic swap between two blockchain networks or cryptocurrencies can be done if the structures of the blockchains are fundamentally similar. Both decred and litecoin are forks of bitcoin or structured after the Bitcoin protocol. Hence, Decred and Litecoin developers were also able to develop on-chain channels that allow litecoin, bitcoin, and decred users to swap between these cryptoassets.


In fact, Lee was able to complete an on-chain atomic swap of one litecoin for 55 vertcoin with James Lovejoy, the lead developer of Vertcoin, using the same technology.


The completion of atomic swaps between Decred and Litecoin is an important milestone regards to the development and deployment of decentralized cryptocurrency exchanges. For years, projects such as Bitsquare have focused on building distributed and peer-to-peer trading platforms that are free of intermediaries and administrators. But, none of the projects have seen commercial success as of yet.

In regions like China wherein cryptocurrency users will soon not be allowed to trade bitcoin and other digital currencies due to the imposition of a nationwide ban on exchanges, the presence of decentralized cryptocurrency trading platforms through atomic swaps would allow users to circumvent the government and impractical policies.

The Decred development team explained that as an exchange, atomic swaps are not efficient enough. But, atomic swaps can be practically implemented into decentralized over-the-counter (OTC) markets, which can be used to trade cryptocurrencies directly. LocalBitcoins, for instance, is an example of an OTC market wherein traders directly trade bitcoin and other cryptocurrencies for fiat money. Essentially, atomic swaps enable developers to create a decentralized LocalBitcoins platform.

“On-chain atomic swaps are not useful in all cases where users want to perform an exchange. This process is well-suited to larger trades that do not require a particularly low latency or high frequency. Since the process involves on-chain transactions, the speed of the process is bound by the mining of blocks, which can take roughly an hour in a worst-case scenario with Bitcoin,” explained the Decred development team.

Still, the development of atomic swaps is at an early stage. However, it is evident that the potential of atomic swaps in the market of OTC and P2P cryptocurrency trading is truly promising. In the upcoming months, the Decred development team aims to continue testing atomic swaps between Bitcoin Core, Litecoin Core and dcrwallet and encourage users of the three cryptocurrencies to integrate the technology into their GUI wallets.

Creamcoin Marketcap