WTF are Atomic Swaps? 🤔For Newbies, yes you! 😂

Jeffrey Garcia
5 min readSep 25, 2020

--

Atomic swaps have been generating a lot of buzz lately in the blockchain world. It’s not uncommon to hear them being called “the future of crypto trading.”

Are you new to the blockchain space? Did you wake up this morning thinking WTF are atomic swaps? Have you been researching atomic swaps for so long you’ve forgotten what day it is? I completely understand what you are going through my friend 🤣. That is why I am here to guide you through this topic. Let’s begin our journey into the world of atomic swaps!

Atomic swaps have been generating a lot of buzz lately in the blockchain world. It’s not uncommon to hear them being called “the future of crypto trading.” Before we dive into understanding the core features of atomic swaps, we must start from the beginning and ask a general question, what are atomic swaps, and what is their purpose in the blockchain space?🤔

What are atomic swaps, and what is their purpose in the blockchain space?

That’s a great question! Hold up, let me grab my coffee first☕️. Ahh, ok let’s get down to business😌. For starters, an atomic swap is a peer-to-peer trade between different cryptocurrencies without a middle man.

“Middle man?!? I thought the whole point of cryptocurrencies was to remove third-parties and centralization?”

Yes, cryptocurrency gave us a way to send money peer-to-peer, but we still have traditionally had to go through a third party to exchange them. If you want to use fiat to buy or sell cryptocurrency, you currently only have one option: use a centralized exchange (CEX) such as Binance or Coinbase.

For example: I want to buy 1 Bitcoin using $ from my bank account. So I would have to go on the Coinbase app and connect my account to my bank, then deposit money into my wallet. From there, I can use my fiat to buy 1 Bitcoin. BOOM, easy right?

Well, from this example, the process is very simple. But there are downsides to storing your cryptocurrencies on a centralized exchange like Coinbase. The downsides are….

- They’re prone to hacks.

- They charge high withdrawal and trading fees, costing crypto traders like myself a lot of money.😭

- Users don’t have access to their own private keys for their wallets on the exchange. (The #1 rule of being a crypto trader is if you don’t own the private keys to your wallet, you don’t own your coins😤). This puts all of the user’s trust in the hands of the exchange operators.

All of this sounds very familiar, stock exchanges ..cough..cough. This is where decentralized exchanges (DEXs) come into the game. Yay!😁

The purpose of decentralized exchanges is to solve the issues that happen on centralized exchanges. What makes these exchanges special? Here’s a few points.

- You can store coins in your wallet w/ private keys included (You never give up control over your private keys and your funds).

- Start trading immediately. Avoid deposit and withdrawal wait times.

- Fast transaction times and low trading fees are very convenient.

This is all amazing because all these features can be found in one application. It’s like ordering a #1 Big Mac meal at McDonalds🍔🍟🥤, YUMMY! 😋

Currently, there are many blockchain projects that have created or are in the process of building a decentralized exchange. For example, Komodo (KMD), is currently working on releasing their pro version of the AtomicDEX wallet… coming soon to a theater near you🍿🎥. The AtomicDEX wallet is a secure, non-custodial wallet to store and trade hundreds of different types of cryptocurrencies such as Bitcoin, Komodo, Ethereum and ERC-20 tokens; you name it! What makes the AtomicDEX wallet stand out is the atomic swap protocol. This technology allows you to trade any coin to any person from your wallet without sending your coins to an exchange first. In the end, the atomic swap framework is one of the most important features that powers decentralized exchanges.

Now that we talked about what atomic swaps are and their purpose, we can now dive a little bit deeper and ask the question, how do atomic swaps work? Get your scuba gear ready guys!🌊🐙🤿

How do atomic swaps work?

Before I start, If you made it this far in reading the article, give yourself a high five!😄 Alright, let’s talk.

In total, there are 5 steps to an atomic swap and the swaps are designed so that each party has an incentive to continue with the trade as agreed. Check out the example below.

Example: Two people, A and B. A has BTC, B has KMD. They agreed on swap price 1 BTC = 100 KMD. A is the maker (seller), B is the taker (buyer).

1. Taker Sends <dexfee>

- B pays the dex fee so that A will start the process by locking his coins

2. Maker Successfully Sends <maker payment>

- A picks a random number: secret A

- A creates a utxo on the Bitcoin blockchain with value: 1 BTC encumbrance: the value can be claimed by A after 20 hours or by B if he knows the secret A

3. Taker Successfully Sends <taker payment>

- After seeing the above utxo, B creates the following utxo on the KMD blockchain : value : 100 KMD encumbrance : the value can be claimed by B after 10 hours or by A if he knows the secret A

4. Maker Spends <taker payment>

A uses the secret A and claims the KMD, thereby revealing the secret

5. Taker Spends <maker payment>

B now uses the public secret A to claim the BTC

This sounds cool, right? All of this means that decentralized exchanges supporting atomic swaps are a safer, faster, cheaper, and more convenient way to trade cryptocurrencies compared to centralized exchanges.

Atomic swaps have great potiental, but there are drawbacks that are currently stopping traders from using decentralized exchanges.

What might be holding you back from using DEXs and what are the downsides so far?

Here are some major points below….

- There is no direct fiat currency payments where you can deposit $ into your wallet

- Lack of trading and low liquidity volume can cause trades to fail

- Lack of technical analysis tools for traders like myself

Reading these points just broke my heart … someone please give me some tissues😢. BUT HOLD UP GUYS! THERE IS GOOD NEWS! 😄 These issues are small and can easily be fixed with time.

In the end, the emergence of atomic swap platforms such as Komodo’s AtomicDEX have changed the game in the blockchain space. This will help pave the path for users to be a part of a new level of decentralization; giving everyone freedom and control of their funds. With the current support from centralized exchanges such as Binance, there is no doubt that decentralized exchanges will be an even more important part of the future. As long as we are all supporting each other with a clear vision and focus on collaboration, the blockchain and cryptocurrency space will continue to grow and prosper. #Realtalk

Thanks for coming to my TEDtalk! Peace from the beast! #bars😎

Are you looking to try out a Decentralized Exchange? Try out Komodo’s AtomicDEX!

https://atomicdex.io/

Want to learn more about Komodo (KMD)?

https://komodoplatform.com/

Come join our cool community on Discord!

https://komodoplatform.com/discord

--

--

Jeffrey Garcia

@binghamtonu Alumni, @KomodoPlatform Intern, Blockchain Enthusiast, Founder of Bodega Eats