The majority of bitcoin (BTC) trading takes place on centrally controlled exchanges. This also applies to trading in other crypto coins.
However, there is also another option: atomic swaps. This allows you to keep money under your own management and still exchange currencies. You can read how this works in this article.
Example in practice
Imagine, you want to sell Dash (DASH) and want Litecoin (LTC) in return. At this point, we must then trade the Dash for, for example, Bitcoin, in order to be able to exchange the Bitcoin to Litecoin afterwards. This usually happens within an exchange where you also have to pay fees twice for both transactions.
In addition, you must have a lot of confidence in the exchange. These exchanges are mainly centralized and therefore prone to hacks. Unfortunately, we can cite numerous examples from the past where these centralized exchanges were hacked and many cryptocurrencies disappeared.
Wouldn't it be much easier to sell these 2 different tokens peer to peer? This saves a lot of fees, can be done without an exchange and is therefore a lot easier and cheaper.
The disadvantage of this is that you have to trust other parties, because you have to cross the coins at the same time. We can use atomic swaps to strengthen confidence in the transaction.
Atomic swaps
Atomic swaps ensure that currencies are only released on both sides of a transaction if both parts of the transaction are present. So if, as in the example above, Litecoin (LTC) has to be exchanged with Dash (DASH), the coins will only be released if both the Litecoin (LTC) and Dash (DASH) are present in the transaction.
Suppose you have a bit of Litecoin left somewhere and you would like to become a full Bitcoiner, then you can also use these atomic swaps.
This eliminates the need for trust between both parties. The reason for this is that if one of the parties decides not to give the currencies, the transaction will simply not go through. The money will return to the original owner in such a failed transaction.
The hash within the transaction plays a major role in this swap. The transaction can only proceed if the private key, which matches the hash of the smart contract, is used to transfer the cryptocurrencies from owner.
Smart contract
The rules of an atomic swap are laid down in a smart contract. This is a piece of written software that states that the money from a transaction is only released when both parties have put the currencies in the transaction.
We also often refer to atomic swaps as cross-chain atomic swaps, because they often work with two cryptocurrencies with a different hash algorithm that you want to trade with each other. These cryptocurrencies are therefore from another blockchain. At the moment, atomic swaps are not often used yet, but this certainly has a lot of potential in the future.
Watch the video below to better understand an atomic swap:
Why an atomic swap?
In an ideal world, we live in a decentralized society. But how decentralized is that society when we always have to use a third party to change cryptocurrencies?
Currently, many still use different exchanges and blindly trust them. However, if we want to trade decentrally in cryptocurrencies, an atomic swap may be the ideal solution. We are again cutting out a third party in our society.
Not only does decentralized thought play a role in cutting out the exchanges, but many other adverse factors that exchanges entail will no longer apply in the future. An example of this is the speed of changing your currency.
Without using a third party and / or third cryptocurrency it is possible to get your desired cryptocurrency much faster. The next advantage of trading without an exchange is the cutting of fees and transaction costs. These will be kept to a minimum with atomic swaps.
In terms of security, trading cryptocurrencies by using atomic swaps is much safer. With atomic swaps, the smart contracts provide this certainty. These contracts leave no room for human error or manipulation by either party.
These smart contracts describe that if a transaction does not occur within the specified time, the transaction as a whole is canceled. Both parties will get back their original cryptocurrencies. We call the name for these specific smart contracts with atomic swaps Hashed Time Locked Contract (HTLC).
However, there are still a number of drawbacks when performing an atomic swap. These barriers are mainly technical. The main obstacle is that the blockchains of the different cryptocurrencies must use the same hashing algorithm.
Hashing algorithm
An example of two cryptocurrencies that use a different hashing algorithm are Bitcoin (BTC) and Ethereum (ETH). Bitcoin uses the hashing algorithm SHA-256 while the Ethereum blockchain uses SHA-3. As a result, it is not possible to form an atomic swap between these two popular cryptocurrencies. But a solution also seems to have been found for this, namely the cross-chain atomic swap.
Liquality is an example of a party that is very busy with this. They strive to realize a cross-chain atomic swap. An example of a solution they have realized are the OTC atomic swaps. The OTC atomic swaps make it possible to perform an atomic swap with another party via a web interface or desktop application. In such a swap it can be indicated how much both parties want to give or receive, after which the swap can be executed and the currencies are received. This has made making an atomic swap much easier.
Another drawback is that the personal data of users during an atomic swap can be checked on a blockchain explorer. This makes it easy to link addresses and link users to the swap.
Future
Is the atomic swap a miracle cure for the future? Or is it just a step in the right direction? The atomic swap requires users to agree to the rules of an atomic swap, but they generally provide the best level of security.
They are only a tool in the arsenal against the problems that occur in many centralized exchanges. As the underlying blockchains enable cross-chain swaps and improve the user interface, the user experience will improve.
Recognizing the tradeoffs and offering easy-to-use alternatives means that a user doesn't have to give up all the favorable decentralized features by resorting to a centralized exchange.
In the future, the best decentralized exchanges are likely to take a pragmatic approach and offer a range of options that will change over time to improve the experience and security.
It is more than clear that the blockchain and crypto industry is shifting to the decentralized world. The atomic swap will play a vital role in trading when this happens.
My articles:
- The gambling market is one of the most important places for mass adoption of crypto
- New Bitcoin economy threatens traditional markets
- Be warned: The pump and dump explained!
- Break up Bitcoin (BTC) transactions via Lightning Network for large amounts
- Masternodes, a way to generate passive income
- Bitcoin (BTC) Mempool: How does the queue for BTC transactions work?
- What do banks do with your money? This is why we need to embrace Bitcoin (BTC)
- What happens to miners when all Bitcoin (BTC) is in circulation?
- Give Bitcoin (BTC) as a surprise gift? With Flitz you can send Lightning gift cards
- Do atomic swaps make Bitcoin (BTC) exchanges redundant?
- Origin Protocol $OGN donates 100% of all proceeds from the ‘Stay At Home’ Shop to stop Corona
- Bitcoin (BTC) before, during and after a financial crisis
- 4 Bitcoin (BTC) tips to spend your time at home
- Be aware: another XRP Scam with Ripple CEO’s Name
- Discord crypto raindrops - passive income
- Guide to crypto tipping on Twitter