Atomic Swaps, Explained

Atomic Swaps, Explained

A new model of making exchanges in the blockchain industry called "Atomic Swaps" is taking the whole sphere to a higher level.

Introducing Atomic Swaps

Atomic Swap is a comparatively new model in the sphere of blockchains. It’s a revolutionary way of making exchanges without the third-person requirement. It’s a variety of smart contract where several people perform exchanges from some coin to another among various blockchains excluding any centralized controlling institution.

This is a really amazing opportunity for users, so you can transfer any coin to a platform with another primary coin or you can just perform it off-chain and all these actions are executed without third-party engagement.

History of Atomic Swaps

In 2012 man, who’s known as Sergio Demian Lerner, has drawn a plan for the initial trustless exchange model. A year later Tier Nolan designed a model of Atomic Swaps and revealed the working manner of it. Despite the fact that Lerner was the chief to have the idea of this kind of exchanges, Nolan is acknowledged as an author of the model, cause he was the chief to bring this theory to life in a model version.

But all these models and drafts were just a hypothesis. The initial Atomic Swap exchange was executed in September 2017. This was held between Litecoin and Decred.

Nowadays, there are many various exchanges that permit their participants performing this method of exchanges.

Do we really need Atomic Swaps?

Atomic Swaps were invented because the older methods of cryptocurrency exchanges faced some actually significant problems.

The first problem is connected with the high venture of being hacked. There’re many examples when very famous centralized exchanges were attacked by hackers and lost a lot of coins.

The second issue is related to the wrong management model of some centralized exchanges, which sometimes also bring to hacks and money loses.

The third is that the huge part of nowadays centralized exchanges cannot deal with a huge quantity of demand changes.

And the last one is that despite the fact that blockchains, cryptocurrencies and all this sphere is intended to be decentralized, this kind of exchange platforms are registered and controlled by a government of the country they are founded in.

These are four main reasons that make us believe that we truly need the Atomic Swap technology.

The method of operating

Let’s understand this by an example. Imagine that John has 0.5 BTC and he wants to get 1 ETH instead. So he wants to make an exchange with Ann.

Ann makes a special smart contract, known as a hashlock. This hashlock is taking a needed amount of sum and locks it with a special secret passcode.

For creating this lock Ann needs to:

1. Pick a preimage, which is a long queue of numbers. And this is just that passcode that is going to open the lock when needed.

2. Apply this passcode to generate a hash.

3. Lock her 1 ETH with this hash in a contract and transfer it to John. John will be able to get coin only if he shows a preimage that led to the hash creation.

You may think that John can cheat and generate the passcode knowing the hash, but it’s almost improbable. So, he’ll have to wait until the two sides of the contract are done and Ann gives him the passcode.

When John receives this contract, he checks the number of coins by looking for it in the public chain. Then he does all these steps too and sends a 0.5 BTC contract to Ann. Now when Ann wants to open the lock she uses a preimage, which is becoming public and John can use it to unlock ETH too. And they both get the money they need.

As the hash for both contracts was the same, the preimage is the same too. But there’s a little issue with this if Ann decides not to give the preimage to open Bitcoin she received from John, John won’t be able to unlock Ethereum he received. And this will be as long as Ann shows the preimage.

Benefits of using Atomic Swaps

There some really important and good advantages that Atomic Swaps have compared to centralized exchanges.

1. The ability to make wallet-to-wallet transfers rapidly and safely.

2. Atomic Swaps system makes all processes quicker but takes fewer charges for them.

3. Common methods of exchanges have a big probability of being hacked. This model of exchanges is more protected from all type of attacks.

4. It easies all the transaction method by excluding the requirement of a middleman.

5. There’s no necessity to provide someone with your personal data.

Problems that Atomic Swaps can face

The primary issue that this method has faced, is that users still cannot exchange all the currencies by applying it. There’re still some coins that don’t support Atomic Swaps.

Large info is going to slow the process. Despite the fact that rapidness is one of the main advantages of the method, large data is still going to slow the transaction process. So, if you need to transfer something huge just split it to some small parts.

The third thing is that like many coins there are also many wallets that don’t support Atomic Swaps. But this obstacle is easy to determine, cause the number of wallets that are adopting this model is growing day-by-day.

Famous one

Komodo is the leading and the most popular exchange that enables working with Atomic Swaps. Maybe the fact that it’s considered to be decentralized exchanges, makes it easier adopting this model.

The team’s leader was the first man to take Nolan’s model and write an algorithm to make the model work in real life. In the first period, this algorithm was supporting only NXT swaps, but then it was improved and introduced to masses.

Nowadays, there’re hundreds of Atomic Swaps that were conducted by Komodo.