Understanding Atomic Swap in Crypto
During our childhood, some of us liked to collect various gaming or cartoonish cards. These cards were like a lottery, so you would randomly get a bunch of different cards when you bought a pack. Some of them were common, others were rare, and some seemingly didn’t even exist.
Whenever we would meet up with our friends, we would trade these cards. The person with many common cards would trade them for rare cards, or the person with similar rare cards would trade them for another different rare card. This type of trading was simple and super-fast, and we didn’t have to panic about someone else stealing my cards. This is just an easy example of our topic that we are about to understand.
BTC exchanging with Litecoin on Coinbase
Like swapping our childhood cards, you need to have some cryptocurrency coins or tokens that you desire to swap to another coin or token in the crypto world. The current way to do that is using a centralized exchange like Coinbase. For this, you must sign up to the Coinbase, but this is a lengthy process as they want all of your Know Your Customer information, which means you have to send them your social security number, pictures of yourself, your home address, and your home address phone number.
They want to identify you even more than your accountant does, and if you have some Bitcoin, you have to deposit it onto their exchange. It is bad for two reasons: you have to pay a transaction fee of ten dollars. The second bad thing is that you have to deposit into a wallet they have access to. This implies that you have to trust that they will not steal your crypto. Suppose you have to change your Bitcoin to something else. You have to sell your bitcoin on their exchange for cash. Now, Coinbase usually takes a fee at this point since you’re using them to sell your bitcoin. Now that you have this cash, you can use this cash to buy Litecoin. And now, as there will be a buying fee too, so Coinbase is making a decent small change on you doing all of this. Finally, to keep it secure, you have to transfer your Litecoin from Coinbase to your wallet, which issues another network fee, but it isn’t as much as transferring bitcoin because Litecoin is cheaper. Hence, this whole process is a long process with many fees, and you inherently have to trust Coinbase with all of your tokens.
What is an Atomic Swap?
Atomic swaps are automatic exchange contracts that authorize two parties or users to trade tokens from different blockchains, sometimes cited as atomic cross-chain trading. This mechanism eliminates the need for centralized third-party entities when executing trades. An Atomic Swap allows you to swap your coins with another person, ensuring that they both can transfer their tokens in a trustless manner.
BTC to Litecoin on Atomic Swap
If you want to do the same trading of your bitcoin to Litecoin, Atomic Swaps can do this for you by using a third party. That is very similar to a smart contract. For this purpose, you put some bitcoins to this third part written code, and someone else puts in their Litecoin. This is the point where you both have already agreed to how much you want to trade, and now it’s non-negotiable. Now you lock your coins into a metaphorical locked box, and then you handle this box to the other person.
Similarly, the other person locks their coins into a metaphorical locked box, and then they give it to you. Now, when this transaction happens, someone gets the key to unlock their box, and when they do, the other person automatically gets their access and key to unlock their box, so you have essentially swapped tokens. Now atomic swaps are great for several reasons. The first one is that there is no room for human error. This exemplifies that if you deposit your coins in a Coinbase, Coinbase gets hacked, and you could lose your coins in that hack. The second one is that the fees are extremely low because there are no crazy transaction fees, and the waiting time is very minimal compared to using a central exchange. The top of all these reasons is that you also don’t need to give up any personal information, no social security number or profile pic. This is how atomic swaps work and why they’re commonly used. They do an excellent job of allowing users to swap their tokens.
What does the Atomic part of the Atomic Swap mean?
Atomic in the computer science world means exactly as planned, or it won’t happen at all. In the matter of an atomic swap, it means that the swap will only happen if both the parties do exactly what they said they would do, sending their coins to the intermediary. It also implies they have to send the exact number of coins. In contrast, the non-atomic swap means sending your coins to a stranger who said they would give you their coins, hoping that they do. Atomic swap essentially gets rid of the risk involved with swapping your coins with someone else.
What are the technicals of Atomic Swap, and how do they work?
They use a hashed time lock smart contract, which means the deposited funds aren’t accessible until both users have submitted their funds. If both parties do not submit their decided funds, the users will eventually get their money back when the time-locked part is up.
Limitations of Atomic Swap
Atomic Swap has some limitations that include, in general, both cryptocurrencies should have the same hashing algorithm and support similar smart contracts. Following these rules greatly limits which coins and tokens users can swap.
Progression of Atomic Swap
Atomic swaps are new, and progress is being made every day. Briefly, atomic swaps are a great tool to move your money and crypto from one place to another. They will ultimately change, adapt and evolve to fit in the future. We are eagerly waiting to see how it makes its name in the crypto world with its excellent technicals.