Atomic Swap Will Drop a Bomb on the Crypto Industry – Here’s Why
In late 2017, Bitcoin took the world by storm, but as the public began to learn about how many cryptocurrencies were available to buy, they became quickly aware of the disadvantages of centralized exchanges.
Simply put, these exchanges can be very frustrating to use. Many of them ask for personal information which you may not want to share.
There is also an inherent degree of vulnerability with centralized exchanges, since they represent a single point of failure which can be targeted by hackers.
Because the exchange holds your private keys, you are also trusting that some rogue employee there won’t abscond with your funds as well.
Then there is the issue of fees. The truth is, if an exchange or anyone else acts as a trusted third party facilitating a transaction, they are going to want a cut of it, and transaction fees can be very high on some exchanges.
This has led to many debates over which is the best crypto exchange. But perhaps that’s asking the wrong question…
Wouldn’t it be great if there was a way to safely and cheaply trade cryptocurrencies without having to involve a third party?
A way where it was also guaranteed that neither party could cheat the other?
Well, now it is possible thanks to Atomic Swaps; a groundbreaking new form of trading that could revolutionize how cryptocurrencies transactions take place.
What is an Atomic Swap?
An atomic swap is a type of Peer to Peer (P2P) cryptocurrency transaction where you trade two cryptocurrencies on different blockchains via smart contract without involving a third party.
However, swapping two ERC20 tokens (meaning 2 tokens built using Ethereum) would not be considered an atomic swap. That’s because both tokens exist on the same blockchain, and swapping them is much simpler from a technical standpoint— an important difference to keep in mind.
How does it Work?
Now you can do this on an exchange as we described above, but you’ll have to pay transaction fees, in addition to all the other downsides of using a centralized exchange.
What if you could swap your BTC directly with someone else who has LTC? Well, there are a number of challenges.
- One of you has to begin the transaction. If you send the BTC to the other person with the LTC first — let’s call him Jim — what is to prevent Jim from simply taking your BTC and leaving without sending you the LTC in return? Likewise, if Jim sends you the LTC first, how does he know that you’re not just going to take it and run? Each of you are forced to trust that the other person will honor their end of the bargain, and unless you know for a fact that the other person will do so if you send your BTC first, you are taking a huge risk.
- As we covered above, swapping BTC for LTC would be considered a cross-chain transaction because these two cryptocurrencies are on different blockchains.
Here’s where atomic swaps come in to save the day. Atomic swapping involves the creation of a special type of smart contract that locks the funds inside and only releases them to both parties when certain conditions are met. If these conditions are not met, then both parties are automatically refunded.
One way to understand atomic swaps is to look at the Lightening Network, a scaling solution for Bitcoin designed by Lightening Labs which has successfully sped up transaction times and lowered costs.
Atomic swaps work in a similar way by making use of a hashed timelock contract, or “HTLC”. The HTLC requires multi-signature verification by both parties to successfully execute.
The contract’s hash lock requires both parties to put their signatures on their respective ends of the transaction, and the timelock ensures that both parties will be 100% refunded if the trade does not successfully complete within a specific timeframe.
Atomic swaps can be done either on-chain (meaning on the same blockchain) or off-chain with a secondary set of nodes, kind of like how the Lightening Network functions.
Let’s go back to our example of you and Jim. If you want to begin the transaction, you open up the payment channel with Jim and create a contract address, which acts sort of like lockbox or safe that holds the funds.
You deposit your BTC into the cryptographic “lockbox” and you create a secret data value— a phrase or question perhaps— which acts like a “key.”
When Jim receives your hash, he creates a separate contract address and deposits his LTC which shares the same key as yours. In order for the transaction to complete, you need to sign the contract address created by Jim, and Jim needs to sign the contract address created by you.
The two of you will do this by signing it with the key value (the secret phrase or question in this example).
In the process of signing off Jim’s contract address, you also reveal that key value to Jim, and now that he has it, Jim can sign and open the other contract address, and both of you receive the coins you want.
An atomic swap smart contract is designed in such a way that interdependency is required; it cannot be successfully completed unless both parties do their part.
If there is some sort of technical problem with the network, or the time lock expires, all funds are returned automatically to the original owners.
What are the Most Popular Atomic Swaps?
This form of trading is still in its early stages of adoption, but to date, successful atomic swaps have been performed with Litecoin and Decred, Bitcoin to Litecoin, Bitcoin Cash to Decred, and a handful of other variations.
You can check the stats on services like BarterDEX which allow atomic swaps to see what the most popular pairings are, although this is subject to frequent change.
How Do Atomic Swaps Effect the Growth of Cryptocurrency?
Does everything above sound really complicated?
Don’t worry, because, in the near future, it is likely that atomic swapping will be a feature that is built into many different wallets, and that this will all happen on the backend level.
You won’t have to think about all these technical details. You’ll simply be able to trade simply and effortlessly in a 100% secure manner, without having to involve a third party.
Atomic swaps could ultimately be what leads to the mainstream adoption of cryptocurrencies. While atomic swap combinations have been somewhat limited so far, the ultimate goal is to for individuals, merchants, and any other entity to be able to instantly swap one currency for another in real time, for a completely frictionless user experience.
The Future of Atomic Swaps
This could spell the end of centralized exchanges in the long run, although it is likely that with such a critical mass of users, these companies will continue to exist for some time.
Atomic Swapping will also make regulation of crypto trading more difficult, since there will not be a single target at which legislation or regulation can be aimed, as is the case with centrally-run exchanges.
When can we expect this?
It may be a lot sooner than we think. These next few years will be pivotal in the development of cryptocurrency, and it is likely that atomic swaps will play an important role.
Feature Image Credit: shutterstock.com
Inpost Image Credit: 3iq.ca, medium.com
DisclaimerThe writer’s views are expressed as a personal opinion and are for information purposes only. It is not intended to be investment advice. Seek a duly licensed professional for investment advice.
The Lightning Network is a payment protocol that operates on blockchain digital currencies. Shutterstock Images Block...
What would JP Morgan Chase say about the JPM Coin? Shutterstock Images The 15th of February 2019 has now become a mi...
A Bitcoin-ETF would be an investment medium using Bitcoin as the main asset. shutterstock.com Regulators have been ...
ICO might be declining now, but experts say that it holds a great future. Shutterstock Images Even with talk of ICO...