Atomic swaps: what they are, how they work, and exchange services

 Despite the increased volatility, the cryptocurrency market is developing and is constantly being replenished with new digital assets. By 2021, their number has reached more than 6,000 , most of which are present in different percentages in the portfolios of cryptocurrency investors and traders.


The increased supply creates a need for cryptocurrency exchange. Until recently, it was carried out with the help of intermediaries - a cryptocurrency exchange or exchanger . But this implies a commission and additional conversion costs.


Atomic swaps: what they are, how they work, and exchange services

What are atomic swaps

Atomic swaps are a transfer and conversion technology that allows you to directly make exchange transactions without the involvement of third parties. Atomic Swap exchange transactions will allow you to make instant transactions.


For the first time this technology was mentioned in the theoretical developments of Sergio Demian. But it was only in theory, without the possibility of implementation in practice. A year later, Tyr Nolan presented a detailed report on the feasibility of implementing an atomic swap procedure. And in 2017, a breakthrough occurred that could completely change the system of monetary transactions in the cryptocurrency industry - the first direct exchange between Litecoin and Decred was completed without third intermediaries.


Benefits of exchanging through an atomic swap system

  • Instant conversion (while the process through exchanges can take a long time).
  • No commissions (when converting from one cryptocurrency into a single one, and after buying another cryptocurrency, an investor may lose a decent amount depending on the volume).
  • The exchange may not have the required cryptocurrency to complete the atomic swap, as their portfolio is often limited. This leads to additional costs of money and time due to the search for the desired asset on other platforms.
  • Increased security compared to cryptocurrency exchanges, which are at risk of being hacked, shutdown due to management issues, and more.

The essence of the atomic swap system

For clarity, let's take two cryptocurrency speculators as an example. One has bitcoins that he would like to exchange for litecoins. The second party to the transaction just has the required amount of litecoins, and wanted to sell them in order to purchase bitcoins for an equivalent amount.


To carry out a transaction, both participants must transfer their funds to a cryptocurrency exchange and, with the help of an intermediary, make an exchange (in other words, a purchase / sale transaction). On the one hand, it increases the level of trust. On the other hand, it creates the limitations and obstacles described above.

Moreover, some blockchains cannot communicate with each other. Or it is severely limited as in the situation with Bitcoin and Ethereum. The reason lies in the different protocols and algorithms for the transaction. Therefore, most exchanges require first transferring the asset into the base cryptocurrency (in most cases, Bitcoin acts as it) in order to make an exchange. As a result, the investor is forced to overpay even more money to make additional conversions.

The technical component of swaps

Conversion of cryptocurrencies using an atomic swap implementation is carried out using Hash Time Locked Contracts (HTLC), which means hashed contracts with a temporary lock.


For the operation to be completed, the participants opened secret codes in the blockchain, which were previously known only to the owner of the cryptocurrency. The second additional condition is the installation of two cryptocurrency blockchains that will participate in the swap.

HTLC does not overload the main network, which makes the transfer instant, unlike a similar operation on the exchange or other intermediaries. This is a temporary smart contract . Within a predetermined period, both participants must confirm the transaction using a special generated payment order. Without this, the transfer will not take place, which reduces the risks of money theft to zero. If one of the participants does not confirm the transfer in time, the funds will be automatically returned.


Step-by-step exchange procedure through atomic swaps

  1. The first participant creates a contract address (this is a kind of cryptocurrency safe deposit box), where the number of coins that he wants to exchange is stored. It generates a number, the second participant should not know it.
  2. The first participant comes up with the code and creates a hash. This is a kind of lock, and the number is a key to open, which the buyer can use.
  3. The second participant looks at the address and makes sure the goods are in stock. Then it creates a similar address.
  4. One sends another hash, but a signature is required to complete the transaction.

HTLC technology is created in such a way that both parties depend on each other for a successful exchange.
The Lightning Network is not required to complete the transaction, but it can simplify the process.

What services can you use to exchange atomic swaps?

For a successful transfer operation, it is necessary to have platforms of both parties that will participate in the exchange. For most average users, this will be difficult. But now big companies are working to solve the problem.

Komodo is working on the creation of BarterDEX, the developers have successfully tested the service with an Electrum server, which eliminates the need to download the entire blockchain. The company linked the Ethereum and Bitcoin blockchains, making it possible to exchange atomic swaps through BarterDEX for most of the existing cryptocurrency coins.

Other worthy services that support p2p exchanges include:

  • Blocknet;
  • Altcoin.io;
  • Atomic Wallet.

Disadvantages of atomic swaps

In addition to the difficulties of installing both blockchains, not all cryptocurrency wallets are capable of accepting coins that are subject to exchange. But the current shortcomings will be corrected in the near future, as many large companies have taken up the implementation of such an exchange system due to the great prospects.

How quickly do you think atomic swaps will enter the daily routine of crypto traders? Or will they be in demand at all?

Comments

Popular posts from this blog

What is Fintech, its future, and how does it work

What is Bitcoin Gold or BCG simple and easy explanation

Buy Bitcoin with Binance with MasterCard or Visa