Atomic Swaps allows two parties holding tokens on two different blockchains to trade directly — and instantly — without the risk of one running off with the other’s tokens before the trade is complete. This means you don’t need an exchange anymore to exchange one token into another.
Technically an atomic swap works like this:
Atomic Swaps use hash time-locked contracts, which are part of the script language most cryptocurrencies operate on. The contracts generate random numbers, so called hashes, which can not be hacked nor reversed.
The hashes are secret to both parties until they reveal it to one another for the atomic swap to occur. Therefore either the exchange happens, or there’s no transaction at all. There are certain requirements to ensure the atomic swap process is efficient.
A very well written tutorial on how to perform an Atomic Swap is published by the team of Swap.Online on Medium:
https://medium.com/swaponline/how-to-perform-atomic-swap-exchange-f73c7ff1613bSadly not all cryptocurrencies support atomic swaps, it requires the implementation for linking payment channels of different cryptocurrency together. Another requirement to support atomic swaps, tokens have to share the same cryptographic hash function.
Advantages / disadvantages of atomic swaps:
Atomic swaps are more decentralized, more trusting, and more user-friendly. On the other hand by exchanging two requires two parties have to consent on the price and quantity of two to exchanging currencies and in a lot of cases is might be easier to exchange to BTC or ETH first.
Conclusion: Atomic Swaps will take decentralization to a whole new dimension and because there is no middle man risk, more investors will want to invest in cryptocurrency and more vendors might like to make cryptocurrency their payment methods. Finally Atomic Swaps focus on being user friendly and this is another step to introduce a broader audience to crypto, which until now was not enough tech savy. A very ambitios project dedicated to Atomic Swaps is Swap.Online.