is your single stop for crypto

Atomic Swaps for Beginners

Basics Trading

What is an Atomic Swap?

An atomic swap sometimes called an atomic cross-chain trade, is an exchange of a cryptocurrency between two parties without the need of a third-party intermediary.  Using what’s known as hash time-locked contracts (HTLC) both users can rest assured that their trades are safe.

For example, Alex has 50 Litecoins, and McKayla has 3 Bitcoins, using this system when they both agree to trade there is no need for an exchange or third-party system to intervene to ensure that the trade takes place or that one party doesn’t just keep the other party’s funds.

This is ensured because as Alex submits his payment to the blockchain, he must provide a number of that cryptographic hash. The same goes for McKayla when she adds her Bitcoins to her blockchain, in order to claim her Litecoins from Alex, she must provide the same number showing that she provided her part of the deal.  If the funds are not claimed by the deadline, they are returned to the original owner.

Requirements of an Atomic Swap

For this to work, the lightning network between the two currencies must exist. What the heck is that? Well if McKayla and Alex want to trade with each other, they are doing that through payment channels. Payment channels are linked together by a lightning network.

In addition, the same cryptographic hash function has to be used if the transaction is to occur between two different blockchains. This is to allow for the HTLC to work correctly when it comes to the user providing the number that was generated via the hash function.

Current State of Atomic Swaps

Currently, the creator of Litecoin, Charlie Lee, has made atomic swaps between Bitcoin, Litecoin, and two other coins. This is fantastic news and makes for a brilliant future for atomic swapping and decentralized currency exchanging.  The downside of this is that the only current way for this to happen is to download a copy of both of the blockchains for the currency that you are engaging with. It doesn’t seem too feasible for most users.

A recent development with the Komodo team is their BarterDex exchange. This exchange has successfully completed an atomic swap using an Electrum server. This is important because the Electrum server allows a user to do a swap without downloading the whole blockchain.

The Future of Atomic Swaps

The prospects of swapping are looking more practical for the average user once again after giving it some time. The current limitations are that the interfaces and the knowledge to get the job done require more technical and programming language than the average user, even a cryptocurrency investing user has.  The future looks bright. After we let the technically savvy work out the bugs, then will come the user experience with slick interfaces to bring it down and usable for the average user.