Exchange cryptocurrencies with atomic swaps

2 33
Avatar for tsakf
Written by
3 years ago

Cryptocurrencies were created to do transactions without a trusted party. There are many cryptocurrencies around, so the need to exchange them was created. There are many cryptocurrency exchanges, but they are a trusted party needed for the exchange transactions. Some peer to peer exchanges came up, but there is another option. Cross-chain trade transactions. With cross-chain trade transactions, you get the security that blockchain offers without the need of a trusted party.

Atomic swaps

To exchange one cryptocurrency to another, atomic swaps is the tool, that let this happen, without the need of a trusted third-party. This new piece of technology, is looking to revolutionize the way in which users transact with each other. To ensure that either party will do the transaction, atomic swaps utilizes what is known as hash time-locked contracts (HTLCs). Hash time-locked contracts ensure that the atomic swap process is completely trustless by ensuring that both fulfill the requirements of the trade.

The recipient has to acknowledge receiving payment prior to a deadline with the generation of a cryptographic proof of payment. If the receiver does not do this, he risks the payment, and the funds will return to the sender. The receiver must send this number to the other party, so the sender uses this number to inform the contract that the receiver has accepted the payment and the funds are released for both.

Lightning network is needed

There are some fundamental requirements for the technology to work. First, it is the lightning network.

If a hash time-locked contract can be thought of as linking two blockchains together, the lightning network can be thought of as linking payment channels together. Both parties must be linked with payment channels. Another requirement is, that both blockchains should use the same cryptographic hash function, like Bitcoin and Litecoin, that use the SHA-256 function. This is needed, because if a different hash function is used, then the other contract of the atomic swap, will not generate the same hash value from the number provided, so there is no agreement about the payment status.

Where are we now?

Atomic swap transactions, have been tested on a few SHA-256 blockchains. Decred and Litecoin Atomic Swap happened in September 2017, Litecoin and Vertcoin Atomic Swap were done in the same month but it is still at work. On-chain atomic swaps, have limitations, and that’s why they are not used very much. In addition to the same cryptocurrency hash function, time locked contracts should be supported also, and programming skills are needed to understand the whole concept.

Future of Atomic Swaps looks bright

The lightning network, will help for off-chain atomic swaps, that overcome the limitations of on-chain swaps with time locked contracts. There are services like Komodo, that try to make atomic swaps available to different blockchains. This will boost usage, and a friendly user experience is needed, for not technical savvy users, to use the atomic swap contracts. Atomic swaps, are in their infancy, and we will see many developments soon.

Image from Pixabay


12
$ 0.04
$ 0.04 from @TheRandomRewarder
Sponsors of tsakf
empty
empty
empty
Avatar for tsakf
Written by
3 years ago

Comments

We are witnessing the development of Blockchains. 2 years ago, feeless transaction was the major goal to be reached by crypto enthusiasts. However, now we are discussing cross-chain, off-chain atomic swaps, second layer solutions, NFTs etc. We are so lucky and every day I realize it with new advancement. I hope major crypto currencies can be adapted to off-chain swaps to iniate more improvements on them. Thanks my dear @tsakf for your nice post 😌

$ 0.00
3 years ago

Actually, I do not understand much the content of this article since it needs thorough understanding and expertise. Anyway, I would like to thank you for this especially in sharing your expertise and experience. Aja!

Please join this community: https://read.cash/c/life-experience-fd31. I will make sure to comment on your post every now and then once I see them submitted here. Thanks a lot!

$ 0.00
User's avatar Jim
3 years ago