Trading Your Altcoins for Bitcoin with the Power of Atomic Swaps [A How To Guide]

Written by nicholas-otieno | Published 2020/01/16
Tech Story Tags: altcoin-trading | cryptocurrency | trading-bitcoin | atomic-swaps | cross-chain-trading | how-do-atomic-swaps-work | liquid-wallet | atomic-dex

TLDR With atomic swaps, you can trade different altcoins directly to other traders and investors using atomic swaps. Atomic swaps are completely decentralized, allowing traders to exchange cryptocurrencies without the need for centralized exchanges – third-party intermediaries – that are prone to mismanagement, hacking, and attacks. atomic swaps leave crypto holders in complete control of their crypto at all times, thus eliminating the hacking risk. Such exchanges are known to charge fees that hit customers’ portfolios, such as fees for sending money to other users.via the TL;DR App

Bitcoin remains a strong buy, and its future is overall positive. If you want to sell your underperforming altcoins and buy bitcoins, then atomic swaps can help you to achieve that.

With the use of atomic swaps, many cryptocurrency users now have a better option when it comes to trading their altcoins for bitcoins, rather than relying on centralized exchanges.

Issues with Exchanges

Today, trading altcoins mostly takes place on centralized marketplaces called exchanges.
Centralized exchange platforms like Gemini, Binance, Coinbase, and others are the financial institutions of the crypto world. To some extent, centralized exchanges have become important gatekeepers for crypto trading.  
Currently, most centralized exchanges compel traders to transfer crypto assets via a wallet that is hosted and controlled by the exchange. These funds are stored in a “hot wallet”
But traders don’t control their private key for hot wallets. Therefore, this places their investment at the mercy of exchanges. 
Centralized exchanges, therefore, expose users to loss of their funds through hacks of those platforms or straight-up scams where owners disappear with the funds.
This emphasizes a pearl of common wisdom in this cryptocurrency ecosystem: “not your keys, not your funds.” If we don’t control the private key of the account with the assets, then we don’t own the funds.
Furthermore, exchanges are known to charge fees that hit customers’ portfolios. Several exchanges also require KYC, a requirement that crypto-anarchists see as harmful to their privacy.

A Solution for Cross-Chain Trading

With atomic swaps, you can trade different altcoins directly to other traders and investors. Atomic swaps are completely decentralized, allowing traders to exchange cryptocurrencies without the need for centralized exchanges – third-party intermediaries – that are prone to mismanagement, hacking, and attacks.
Atomic swaps connect users directly without an intermediary and allow for a virtually infinite number of trading markets to be created on the fly. Any crypto-asset becomes interchangeable with any other offering on the market at that time. Everything can be performed on one smooth motion, which is what users actively seek in this era. 
Moreover, atomic swaps leave crypto holders in complete control of their crypto at all times, thus eliminating the hacking risk. 
When using centralized trading platforms, there are always some fees you’ll pay. Whether it’s on the withdrawal or deposit side, you will pay either way.
But through atomic swaps, deposits and withdrawals fees are non-existent. Users will only pay on-chain transaction fees for sending money to other users, which is normal. Such trades take place across their individual networks or blockchains.

How Do Atomic Swaps Work?

While several projects are working in various DEX protocols, few of them have developed decentralized exchanges that execute the atomic swaps. Such decentralized exchange platforms include Liquid wallet, Atomic wallet, Atomicswapwallet.io, Swap.Online, and AtomicDEX. These are wallets, which crypto traders who want to dump their altcoins using atomic swaps, can use.
Such atomic swap wallets are designed in a manner that prevents any of the involved parties from cheating. Hashed Time Lock Contract (HTLC) is the technique that enables trading tokens in an atomic swap.
Now let’s understand how such protocols work, step-by-step. For example, Alice would like to trade her Litecoin for Bitcoin. 
Step 0
Alice (the Maker), therefore, posts a trade order on the decentralized exchange wallets mentioned above. This step is listed as 0 because it occurs before the atomic swap starts.
Step 1: DEX Fee Payment
The Taker (i.e., in our case is Bob) sees the Maker’s offer and accepts it. Bob commits to the trade by paying the DEX fee that is only 0.15% of the total trade amount.
 The DEX fee plays a crucial purpose as it ensures that the Taker doesn’t spam the network with rapid requests. However, the Maker doesn’t pay any trading fees on the DEX wallets.
Once the Taker has paid the DEX fee, the atomic swap has started officially. The Maker receives the fee payment and generates the second step.
Step 2: Maker Payment Is Sent
The Maker deposits her Litecoin into the HTLC contract and specifies Bob as the beneficiary. The funds are locked with the hash. Alice then generates a key to access the hash and shares it with Bob.
Step 3: Taker Payment Is Sent
Bob uses the hash and key sent by Alice to deposit his Bitcoin into the HTLC contract. He then specifies Alice as the beneficiary.
Step 4: Claim Process
Alice has the original key, which was used to produce the hash. She then uses the key to initiate the claim button on the HTLC contract so that to claim the trade payment and receive the Bitcoins from Bob. As soon as Alice claims the Bitcoin, Bob also is able to claim the Litecoin, and the swap is now complete.   
That’s all how atomic swaps work.
The process ensures a trustless, secure, peer-to-peer exchange. There are no intermediaries. Only a cleverly designed protocol leverages cryptographic techniques to ensure neither party can cheat in the trade. It is an atomic process that implies either (a) the swap happens exactly as Alice and Bob agree, or (b) nothing takes place, and both Alice’s and Bob’s funds are returned to them.
The HTLC contract has timeout features, which allow the parties to get their money back from the contract’s lockbox in case the deal fell apart. 

Conclusion

Several altcoins have reached all-time lows, with some losing 99% of their value from their all-time highs. One way to diversify your investment is to sell the underperforming altcoins and buy bitcoins.
You could think of diversifying your investment and buying some bitcoins and remain with some major altcoins. The crucial consideration is to make an informed purchase and minimize your risk. 
Thanks to technological advancement. Decentralized exchanges have evolved, and now you don’t have to rely on centralized exchanges. Crypto users now have access to a truly decentralized means of trading cryptocurrencies through atomic swaps, while being able to control over their crypto assets at all times.

Written by nicholas-otieno | Nicholas Otieno is a content writer with a focus on Fintech. He is passionate about helping peopl
Published by HackerNoon on 2020/01/16