One of the least hyped technologies in the cryptocurrency space has the potential to transform the whole industry. In this technology, the potential to allow the wallet to wallet trade between two addresses with no intermediary. Since the beginning of the Bitcoin revolution, transactions have been mainly done in exchanges. There was a need for some centralized institutions to coordinate transactions between parties and mediate among them.
For a complete introduction to the Lighting Network, read this article on Bitcoin lightning network.
In 2013 a user in the site Bitcointalk going by the name TIer Nolan proposed a solution. This user is generally accredited as the inventor of the idea of an atomic swap.
The resin for proposing a new form of transaction was born out of the context of the time. First, we have the infamous Mt. Gox attack. In it, a total value of 500 million dollars in Bitcoin was stolen as a direct result of Max Karpele’s (founder of the exchange) incompetent management.
By no means was this an isolated event.
We also have another infamous hack in the CoinCheck attack. Here, 550 million dollars in NEM were stolen from the exchange. This created a sense of insecurity in the Japanese market, famous for its acceptance of crypto.
Another reason to want a wallet to wallet transactions is that exchanges, for good and sometimes for worse, are regulated entities. This means an entire country can be blocked from the crypto market by the decision of one government official. This could not happen with direct trade.
What is an Atomic Swap?
Well, as we hinted before, an Atomic Swap is a peer-to-peer trade of cryptocurrencies directly from a wallet’s address to another without using an intermediary. This means that all of the time, both users have complete control of their private keys. They don’t relinquish custody to a centralized exchange.
Also, an Atomic Swap doesn’t have to happen for the same coin. You can exchange one coin for another. This is particularly interesting since the first successful Atomic Swap happened between the Decred coin(DCR) and Litecoin (LTC).
This is possible because an atomic swap can happen between blockchains that use different cryptocurrencies in their network. Also, it is possible to do it off-chain in a special channel created to allow trades between native assets. This made it the first viable way to trade cryptocurrencies in a completely decentralized manner.
How does it work?
In a broad overview, both ends of an atomic swap agree on a password. The swap between the parties will only happen if the password matches. This is meant to prevent any outside actor from intercepting the transaction and taking the money.
Now that there is a general overview, the actual swap uses Hashed Timelock Contracts or (HTLC). These are used in features like Lightning Network.
Here is an article on crypto trading and everything you need to know about trading.
A Hashed timelock contract is a particular variation of a payment channel. These are off-chain state connectors specially designed to deal with payments. The State Channel works as a two-way communications lane among participants for the express reason of allowing private interactions. This reduces time to confirmation since the transaction doesn’t go to the waiting pool to be picked for the next block.
For this to happen, a group of participants locks a state of the blockchain using a smart contract or a multi-signature scheme. This means the participants are locked outside the main chain, and all of the transactions are signed between them. Finally, once all of the transactions have been completed, the resulting balances are included in the blockchain.
There are two crucial components to this interaction. The first one is the hash lock which stops funds for being transferred without the signature. Second is the Time lock, which means that the channel is only opened for a predetermined length of time.
Or as explained in the original post:
The clear significant advantage of this method is that it is entirely decentralized. This means that trades can be made between numerous parties without a centralized body, such as an exchange. Since all of the trades are wallets to the wallet, at no moment in time are the coins relinquished to a third party. All of the participants keep ownership of their assets.
Additionally, all this happens essentially between private channels. This means the costs are very low or non-existent since the participants decide this ahead of time. This opens the possibility of operability between blockchains on a one to one bases. There is no need to buy a third asset, such as BTC, if I want to trade Litecoin and Dogecoin.
Of course, there are some limitations. First, the two blockchains doing the swap need to use the same hashing algorithm. So, in the above example, trade between Litecoin and Dogecoin cannot be made. This reduces somewhat the interoperability of Atomic Swaps.
There are some privacy concerns since the signatures used during the Atomic Swaps are visible in a blockchain explorer. This means transactions could easily be linked to an account. This is harder in privacy-oriented blockchains, but the advantage is negated if a privacy coin is being traded with a public blockchain coin.
Finally, Atomic Swaps work on blockchains. There are other data architectures like DAGS and Hash Graphs that are used for decentralized systems. None of these types of protocols are compatible with Atomic Swaps.
Right now, the Atomic Swap is a new technology. It was introduced back in 2013, but it did not make its debut until 2017. There are still limitations with their use, but as the cryptocurrency world expands, uses for direct transactions become more apparent.
They offer the possibility of a completely decentralized mode of transactions. This means no longer relying on a centralized party and giving up ownership of assets. Also, a low or null transaction fee between participants. They open a new type of channel for trades for those willing to try something only possible in the blockchain.
Why does this matter in India?
Well, it is no secret that cryptocurrencies in the country exist in a rather grey area. They are not considered legal tender by the government, and exchanges are constantly under threat of the authorities’ legal actions. This is a rather perilous state for those looking to trade crypto. At any moment, the Indian State can just decide to crack down hard, and there would be no legal refuge for those providing cryptocurrencies.
In such a scenario, an on-chain way to trade between cryptocurrency is an invaluable tool. Blockchains are censorship resistant by their decentralized nature, so even if the centralized exchanges stop working, direct on-chain trading would be impossible to end. This is why Atomic Swaps are such an important concept and why everyone needs to be aware of them.
Of course, you need to hold some crypto in the first place to do Atomic Swaps. Another piece of the puzzle when it comes to censorship-resistant exchanges are peer-to-peer businesses that allow willing buyers and sellers to meet. One such type of exchange that’s very active in India is Remitano. That would work as the perfect FIAT money ramp to exchange rupees for cryptocurrencies.
Disclaimer: This is a paid post and should not be considered as news/advice.