What Are Atomic Swaps All About?

What are Atomic Swaps?

Atomic Swaps are the exchange of peer-to-peer digital currencies from one party to another, without involving third-party services such as the crypto exchange. So during this process, users have full control and ownership of their private keys.

On September 20, 2017, Decred and Litecoin successfully implemented the first atomic swap.

Interesting things to note about atomic swaps are:

1. Atomic swaps can be made between separate blockchain with different coins

2. Or atomic swaps can also be done through off-chain channels which are branches of the main blockchain

Atomic swaps are also known as cross-chain trading (inter-blockchain)

How does Atomic Swaps work?

Two parties who will be involved in atomic swaps decide a shared secret. Both parties will share their cryptocurrency if – and only if the secret they have is suitable. This way, if someone suddenly appeared in this exchange, he could not take the coin because he did not know the secret that had been determined.

The following is a brief illustration to illustrate how it works.

What Are Atomic Swaps All About?

Suppose Alice has a BTC and wants to have LTC while Bob instead has LTC and wants BTC. Alice then creates a value and creates a hash which is used to create a contract address and save the BTC there. Then Alice sends the hash to Bob. Then Bob makes his contract address via the hash and sends the LTC to it. So that Alice can retrieve the LTC, she must open the address key using its value. When Alice unlocked and took the LTC, the value of the key was given to Bob who used it to retrieve BTC.

To do this, there is the name Hashed Timelock Contracts or HTLCs. If Coinvestors are familiar with the Lightning Network, should Coinvestors also know how to work on HTLC? Now we will give a brief description of what HTLC is.

What are Hashed Time Contracts?

Hashed Timelock Contracts is a special form of payment channel. The payment channel is basically a state off-chain channel that records payments.

A state channel is a two-way communication channel between participants that allows them to interact outside the blockchain, which normally appears on the blockchain. What will happen is the transaction time will decrease drastically because investors no longer depend on third parties, such as miners, to validate your transactions.

So what are the provisions for doing an off-chain state channel?

1. A segment of the blockchain state is locked using a multi-signature or smart contract, which is agreed upon by a number of participants.

2.Participants interact with each other by agreeing on inter-participant transactions without giving miners anything

3. The entire set of transactions is then stored on the blockchain

The state channel can be closed at a point determined by the previous participant. Closure can occur due to several things:

1. Time lapsed: for example, the participant agrees to open the state channel and closes it after 2 hours

2. Can be caused by the number of transactions that occur: for example, closed after a $ 100 transaction occurs.

Then, what is HTLC?

HTLC develops payment channels that use “timelocks” by introducing “hash locks” along with existing timelocks.

HTLC allows opening payment channels where a fund can be transferred between parties before a predetermined deadline. This payment is known through the submission of cryptographic evidence. At the same time, another HTLC feature allows one party to cancel the payment given to him and return it to the party making the payment. The point is to use a multi-signature transaction system that makes both parties responsible for the success of a swap.

Limitations of Atomic Swaps

1 Adoption, the limitation faced by atomic swaps today is that there are three conditions that must be fulfilled so that two cryptocurrencies can be involved in atomic swaps, namely

*Both cryptocurrency must have a hash algorithm attached to it

*Both digital currencies must be able to start hashed timelock contracts

*Must have special programming functions

At present, these three conditions will greatly limit the amount of cryptocurrency that can be involved in atomic swaps.

2. Speed

Atomic swaps still need a lot of improvements to be fast enough to handle large volumes of data. Especially for this, lightning networks can greatly help atomic swaps

3. Lack of compatibility

Nowadays there are many wallets that have sprung up and adopted atomic swap technology, but in fact, the number of compatible wallets and exchanges is still very low. More support is needed from the exchange so that usage and research on atomic swaps can be wider.


What Are Atomic Swaps All About?

Lack of scalability and interoperability are the two biggest problems facing the crypto world today. As the saying goes “once two oars, three islands are exceeded” Atomic Swaps can be a solution for both problems. Atomic swaps are technologies that have great potential to bring us to the evolution of digital currency trading.

Leave a Reply

Your email address will not be published. Required fields are marked *