Atomic Swap Explained

XcelLab
XcelPay Magazine

--

An atomic swap is a smart contract technology that empowers the exchange of one cryptocurrency for an alternative cryptocurrency without using central intermediaries, such as exchanges.

Atomic swaps can take place unswervingly amid blockchains of different cryptocurrencies, or they can be conducted off-chain, away from the foremost blockchain. They first came into prominence in September 2017, when an atomic swap between Decreed and Litecoin was conducted.

Since then, other start-ups and decentralized exchanges have allowed users the same facility. For example, Lightning Labs, a start-up that uses bitcoin’s lightning network for transactions, has conducted off-chain swaps using the technology. Cryptocurrencies and decentralized exchanges, such as 0x and Altcoin.io, have also incorporated the technology.

Atomic Swaps Break Down

As it occurs today, the process for switching cryptocurrencies is time-consuming and complex. This is due to several reasons. For example, the disjointed nature of today’s cryptocurrency ecosystem presents several challenges to average traders.

Not all cryptocurrency exchanges support all coins. As such, a trader wishing to exchange her coin for another one that is not supported on the current exchange may need to migrate accounts or make several conversions between intermediate coins to accomplish her goal. There is also an associated counterparty risk if the trader wishes to exchange her coins with another trader.

Atomic swaps solve this problem through the use of Hash Time- lock Contracts (HTLC). As its name denotes, HTLC is a time-bound smart contract between parties that involves the generation of a cryptographic hash function, which can be verified between them.

Atomic swaps necessitate both parties to admit receipt of funds within a specified timeframe using a cryptographic hash function. If one of the involved parties fails to authorize the contract within the timeframe, then the entire transaction is voided, and funds are not exchanged. The latter action helps remove counterparty risk.

--

--

XcelLab
XcelPay Magazine

XcelLab has embarked on an ambitious journey to build an eco-system driven by blockchain technology, and crypto use-cases that are built to address the issues a