In this article, you will learn what is an atomic swap exchange. One of the features of cryptocurrencies is that they are decentralized. However, in reality, it is not completely decentralized. For the buying and selling of cryptocurrencies, the most popular option is to use a centralized exchange. But a solution for this problem has been able to come up with something called atomic swap.
What Is an Atomic Swap Exchange?
Atomic swaps, also known as atomic cross-chain trading, offer a way to swap cryptocurrencies peer-to-peer from different blockchains directly without the requirement for a third party, such as an exchange.
Obviously such a swap has to take place in a set time frame, which - in Bitcoin - is ensured by a special type of smart contract called Hashed Timelock Contract (HTLC). A HTLC has an inbuilt timer ensures that the transaction is completed within the set timeframe. If the transaction is not executed within this time frame, it is automatically canceled.
There are two types of atomic swaps: on-chain swaps between two different cryptocurrencies on two seperate blockchains, and off-chain swaps on second-layer channels off a main blockchain, such as the Lightning Network.
Since payments on the Lightning Network don't require block confirmations or compete for space within blocks, they are convenient to use in environments where instant transaction speed is a high priority, such as in retail. They also help to pave the way of instant micropayments in the expanding space of internet-connected devices.
Atomic Swaps: On-chain vs. Off-chain
It's important to note that atomic swaps can be executed either as on-chain or off-chain functions.
On-chain atomic swaps, as the name suggests, take place on either currency's blockchain. Currently, for these swaps to work, both currencies must use the same hashing algorithm, and they also must support HTLC. Back in September of 2017. Litecoin and Decred conducted a successful on-chain atomic swap, the first of its kind.
Off-chain atomic swaps allow for, you guessed it, off-blockchain exchange of the currencies in question. This takes place on a secondary layer of nodes, and at this point, off-chain atomic swaps are an extension of the Bitcoin Lightning Network .Bitcoin and Litecoin executed the first ever off-chain atomic swap using the Lightning Network back in November of 2017.
Why Do Atomic Swaps Matter?
Atomic swaps could bring greater security to an exchange atmosphere ridden with risks, including funding misallocation and hacking attacks. There's something to be said about a trading feature that allows you to conduct trades without having to go through a centralized intermediary.
On this point, atomic swaps streamline the entire trading process to a point of complete convenience. Theoretically, atomic swaps could be developed to provide universal trading pairs from currency to currency. As long as users make asks and bids and are creating a market for these swaps, you can trade in these pairs. Moreover, atomic swaps could see wallet integration, allowing you to trade currencies directly from your software, mobile, or web wallet–no more moving funds to and from exchanges.
Bottom Line
Atomic swaps could be next evolution in decentralized trading. There are a few projects out there looking to turn this dream into a decentralized reality. So, this article is about what is an atomic swap exchange.



















