Atomic Swaps & Etomic Swaps, Explained in Plain English

in #blockchain6 years ago

A  simplified walk-through of Atomic & Etomic Swaps and why they  matter…for the non-tech-savvy blockchain enthusiast and cryptocurrency  investor

If  you follow cryptocurrency news, you’ve no doubt seen “Atomic Swap”  being tossed and tagged about. Maybe you’ve even invested or traded on  related news, promises, or projects purporting Atomic Swap capabilities.

What Exactly is an Atomic Swap?

It’s quite simple: an Atomic Swap  is a trade of one cryptocurrency directly for another, between the two  parties wallets..without the use of any intermediary party, token, or  exchange.

For  example, let’s say Bob wants Bitcoin in exchange for his Litecoin.  Sally has Bitcoin and wants to buy some Litecoin. And let’s assume these  two don’t know each other so this is a trust-less relationship…and for  all intents and purposes, anonymous.

When  Bob and Sally perform an Atomic Swap, they each receive their desired  token at an agreed upon price, directly between their wallets. The end  result: Bob sends Sally Litecoin and receives Bitcoin in his Bitcoin  wallet. Sally receives Bob’s Litecoin direct from his LTC wallet into  her LTC wallet.

The trade is completed, instantly and securely, between these two trust-less parties  and their appropriate wallets. And this simple person-to-person  exchange is accomplished without the need of any intermediary wallet,  exchange, token or 3rd party. They are in total control and ownership of  their private keys the whole time and the only time their money moves  is during the actual trade directly out of/into the designated wallets.

Wallet-to-Wallet Trading by Komodo

Because  Atomic Swap is wallet-to-wallet, all that’s required is for you to have  a wallet for each token you intend to trade as well as some sort of app  to perform the coding and commands for this magical feat.

Enter the Dragon

The leader in the dark arts of Atomic Swaps is the development team who brought us BitcoinDark, now redeveloped as Komodo Platform (KMD).  These guys have been so busy developing world-class blockchain dApps  (Decentralized Applications) they’ve nearly gone unnoticed…until last  summer when they announced dICOs and a fully functioning DEX  (Decentralized Exchange), a tool they developed specifically capable of  performing Atomic Swaps.

A dev team who actually completes projects?? You must be mad!

The Komodo developers have created a powerful dApp called BarterDEX,  which allows anyone to perform Atomic Swaps of virtually any  bitcoin-based token. It is essentially a DEX and Atomic Swapping tool  all wrapped into one, with an advanced, intuitive exchange-like  graphical interface.

An AtomicSwap-Enabled DEX

There  are important differentiating factors between what can be considered a  DEX versus an Atomic Swap application, most importantly as I pointed out  before is that an Atomic Swap means there is no “middleman”, it’s  wallet-to-wallet trading. BarterDEX gives users the power of both types  of applications by creating an Atomic Swap dapp that also comes packaged  with all the features you’d expect from a DEX..allowing order books,  order placing and management, order history between all the running  dApps, charting provided within the GUI, and many other exchange  features not even offered by the most advanced centralized exchanges.

The Game Changer

Because  an Atomic Swap needs some specialized instructions and code to be  carried out, BarterDEX handles this complexity “under the hood”,  allowing an easy and familiar user experience through the GUI. Users  running BarterDEX are connected to one another, each making up a part of  this decentralized exchange network. In this way users have  connectivity with one another and within the GUI can interact much the  same as using a centralized exchange (order books, graphs, etc)…albeit  completely decentralized and each user entirely in control of, and  owning, their own wallet, orders, etc.

When  a user closes their BarterDEX dApp, they are off the “network”…because  your dapp is acting as a node in this decentralized network, ultimately  you are your own exchange when you run BarterDEX and when you’re done,  you can shut down your exchange at will.

Wallet Management

Besides  the correct commands and coding to perform a swap, the other piece of  the puzzle for Bob and Sally to solve is having a wallet for each token  they want to dabble in.

BarterDEX  gives users two options: Native or Electrum Server, for each token they  want to work with. For example, when a user first sets up BarterDEX  they can either generate a new KMD wallet or import an existing one.  Next, they would choose the coins they want to work with and select  either Native or Electrum Server for each. If the user chooses Native,  BarterDEX will look at their local system for the natively running  wallet…for example if the user has Bitcoin wallet running locally. They  can then see their balance and do trades from that wallet directly on  BarterDEX.

Since  Bob didn’t have BTC, let’s assume he has not yet set up a BTC wallet.  And let’s assume Sally already has both an LTC and BTC wallet.

In  a scenario like this, perhaps Bob would want to import his locally  running Litecoin wallet (Native) and use Electrum Servers for Bitcoin  (since he isn’t running a BTC wallet locally), which in turn generates  for him a BTC wallet that he now owns, without the need to install it  locally.

Alternatively,  of course, he could also have all the wallets he will be interacting  with running locally and just choose Native for each he adds into  BarterDEX…allowing the dApp to connect locally to all the wallets.

Locally  running wallets may not be the right answer for everyone however. The  idea of using electrum servers simplifies and speeds up the process in  BarterDEX for users who may just be trading in and out of various coins,  like you would on a central exchange, without wanting to hodl in a  wallet. But the major advantage over centralized solutions, even in the  case of quick day trades, is that when  using BarterDEX your funds are on wallets generated within BarterDEX  for which you can actually backup the private keys and which you own. They are not owned by anyone else, anywhere else.

And as the saying goes, “if you don’t own the keys, you don’t own the coins.”

Happening Now: AtomicSwaps

At the time of this writing, Komodo’s BarterDEX, has been used to perform more than 70,000 Atomic Swaps by real-world users (see a live running total here)  of various tokens on public chains as well as thousands of other swaps  within test environments. Komodo Platform is the only project which has  completed such an outstanding task in development of Atomic Swapping,  and they are just getting started.

With  the addition of Decentralized ICOs or dICOs, Komodo is disrupting the  Crowdsale model, providing a platform for other projects to build upon  utilizing the built-in privacy and anonymity features inherent within  their blockchain, fast tx times within their ecosystem, Smart Contracts  (coming soon) and a dPoW model which gives all new projects  Bitcoin-level security.

Komodo’s  most recent and very exciting development however, is Etomic  Swapping…performing swaps between Bitcoin-based tokens and  Ethereum-based tokens, which I’ll discuss in just a moment.

Why Atomic Swap?

Before  we get to Etomic Swaps (Ethereum-Bitcoin Trades) I first want to  outline some of the primary reasons the very concept of Atomic Swapping  is important and why it matters to investors, users and the future of  cryptocurrency, by looking at some of the key problems being solved.

SECURITY

Atomic  Swaps solves the problem of jeopardizing your funds when you use a 3rd  party exchange or any exchange for which you don’t hold the private key.  Even with decentralized exchanges such as EtherDelta, you must deposit  your funds into the Smart Contract in order to trade…your funds must  leave your wallet. This is risky and costly. (The EtherDelta Hack)

Another  glaring problem investors and traders come up against time and again on  centralized exchanges, is the problem of “Wallet maintenance” or  disabled withdrawals. Most users speculate these are deliberate attempts  at protecting their cashflow. Regardless, once your funds are on an  exchange, they are not under your control and for all intents and  purposes are not your funds during that time.

Those  of us who’ve been around for a couple years have witnessed a couple  exchanges vanishing, taking funds with them. Whether deliberate, hacked,  or technical issues (data corruption etc), the risk is real and  prevalent.

REGULATION

We  all cringe when we hear any talk of regulation in the news; we jump to  our crypto price tickers and watch the blood bath ensue as the markets  all fall with Bitcoin. One of the most important problems being  addressed with Atomic Swaps directly impacts the cryptocurrency  industry’s resistance to regulation.

One  of the most important features of cryptocurrency is its decentralized,  unregulated, “the people’s money” nature. The benefits associated with  holding value that is beyond regulation and government control.

With  centralization comes regulation. As we’ve seen with many events over  the course of the past few years, centralized exchanges are consistently  and effectively targeted, impacting investors, traders, and even  developers and projects.

Decentralizing  trading of tokens, removes these targets from the equation for  investors and traders alike. Wallet-to-Wallet trading is also in true  form following the principles and philosophy upon which Bitcoin was  originally founded. And for good reason, as we see how deviation from  the basic principle of decentralization of all things, impacts the  industry.

SPEED

Atomic  Swapping eliminates several steps and the time/confirmations required  to complete those steps. Centralized exchanges require upwards of 50  confirmations for a transaction to be cleared for trading. Attempts at  decentralized exchanges often have a backlog of transactions waiting to  be broadcast, often failing, running out of gas, etc. Even centralized  exchanges are no stranger to backlogs or catastrophic server failures or  events causing delays and errors, lost transactions, etc.

With  Atomic Swaps, you simply trade immediately from your wallet. No sending  your funds anywhere but the actual buyer while receiving your new  exchanged token directly from them in return. Instant wallet-to-wallet  trading.

COMPLICATIONS

As  I mentioned, there are no intermediaries…including no intermediary  tokens with Atomic Swaps. If I want to exchange LTC for GRS  (Groestlcoin) for example on a traditional exchange, I’d first have to  fulfill an order to sell my LTC for BTC. Then I’d go over to the GRS  screen and buy GRS using the BTC. Not only is this time consuming and  costly, it’s additional steps that Atomic Swapping removes. These sorts  of complications are often easy to get used to, you keep track of what  exchanges have which pairings, etc. But if the complications can be  removed and the benefit is a cleaner, less error-prone, faster  transaction…it’s a no-brainer to those of us who’ve been trading for a  while.

FEES

The  last I’ll mention in this article, is the very obvious issue of fees  and cost. Many new traders learn the hard way, after stressing out over  getting their Ether or Bitcoin into an exchange to buy an Alt-coin, that  when they go to withdraw that Alt back to their wallet, the exchange is  imposing a hefty fee.

In  some cases, usually the higher risk exchanges, this fee can be upwards  of 10% and often the exchange will not adjust the fee as the market  price drives up, meaning a 10 coin fee that was $1 yesterday, may  suddenly be $100 today.

This is not to mention fees and some of the very questionable fee-structures imposed by many exchanges for performing trades.

Problem Solving and Innovation

Komodo  Platform continues to demonstrate just how focused they are on solving,  innovating and creating useful working dApps and this is evidenced by  their Github commit history  over the past year alone. They are currently ranked #1 within the  Cryptocurrency industry for updates, fixes, and new releases of dApps.

What About Swapping Ethereum and ERC20 Tokens?

Now that you have an understanding of Atomic Swaps, which involves Bitcoin based tokens, let’s talk Ethereum and Etomic Swaps.

What  if Bob wants to buy ETH or another ERC20 Token such as BAT or OMG using  his LTC, or his newly acquired BTC? Because of the underlying protocols  involved with ERC20 and how significantly different Ethereum is from  Bitcoin, a normal Atomic Swap is not the right approach.

And  up until very recently there were no alternatives besides trading using  a 3rd party service or exchange. Even users who simply wanted to  exchange one ERC20 Token for another ERC20 Token, both tokens living  within Ethereum, were out of luck. This is because Ethereum-based DEXs  such as EtherDelta are developed using a Smart Contract and require  traders to deposit funds in, exchange them for ETH, exchange for the new  desired ERC20 and then withdraw…this process costing time, fees, risk  and complicated steps…within an inherently volatile system.

Things Are Just Very Different

The  primary reason for the gap between Bitcoin based and Ethereum based  tokens is very simple: Ethereum is not built or based on Bitcoin and  Ethereum tokens are Smart Contracts, coded in Solidity.

Most  Alt-coins have a very similar approach to their blockchain and the  protocols used for the token, allowing relative programmatic ease for  developers to get these blockchains to “talk” to each other in a trade,  the way Komodo devs have programmed BarterDEX to do.

So the underlying protocols for the ERC20  standard pose a challenge that doesn’t allow for very simple 1-to-1  trades like we see with Atomic Swapping. There is the very real need for  an intermediary…and in order to make this AtomicSwap-Friendly, it needs  to be an intermediary that is within the control and ownership of the  parties involved…not a 3rd party.

A Bridge Between Ethereum and Bitcoin (Cross-Chain Trading)

To bridge the divide between these very different technologies (Ethereum and Bitcoin or Bitcoin-based chains) ETOMIC was developed  and is now in use within BarterDEX. ETOMIC is a purely utility token, a  decentralized intermediary which the user owns and controls…acting as a  “bridge” between the Ethereum blockchain and any other Bitcoin-based  blockchain (including Bitcoin itself).

This  means, using BarterDEX which now utilizes ETOMIC, Bob can buy OMG or  BAT or any ERC20 Token (and ETH itself of course) using his Litecoin or  Bitcoin. Bob is happy and the crypto-community has been innovated even  further, to allow exactly the sort of decentralized solutions it was  meant to promote.

In  the Etomic Swap, both parties are always in control and retain  ownership over their funds, their orders, the entire process until the  order is fulfilled and they then receive their funds traded. They are  still participating in a truly decentralized Atomic Swap transaction.

Joining the “AtomicSwap-Enabled” Revolution

Blockchain  technology is at its core decentralized. While I use centralized  exchanges like I’m sure many of you do, the future is moving toward  decentralization of all things and DEXs have evolved along nicely to  this point.

But  what we are seeing now with Komodo’s BarterDEX is a revolutionary new  approach to trading, that just makes sense and seems like it should have  been this way from day 1: The AtomicSwap-Enabled DEX.

With  the recent innovations by the Komodo team in cross-chain trading using  ETOMIC-Swaps, that approach is becoming more usable, applicable and  moving toward mass adoption much faster than we may have anticipated.

If  you’d like to get a first hand look, check out the dApp and start  playing around with the features. Installing and using BarterDEX is  relatively simple and easy.

I’ve created a quick YouTube video that walks you through the basic install steps: Getting Started with BarterDEX

UPDATE:
I’m  now working for Utrum.io, the revolutionary curating platform for  crypto-investments and analyses, and we are using Atomic Swap technology  to do our crowdsale.

You  can do your own atomic swap using our OOT token and get OOT at a fixed  “ICO” price at the same time :) by following the video I created walking  through the process using BarterDex:

See you on on the DEX!

- - -

If  you want to really sink your teeth in to BarterDEX, read up on the  documentation or need support and guidance, Komodo Platform has very  helpful resources and a YouTube Channel:

BarterDEX Documentation

Komodo Platform FAQ

Komodo Platform YouTube Channel


Sort:  

Hey @abarefootpoet, I upvoted your post! You can give me a follow and I will follow you back and upvote some of your future posts! Thank you and have a nice day. :)

Hello @abarefootpoet! This is a friendly reminder that a Partiko user has just followed you! Congratulations!

To get realtime push notification on your phone about new followers in the future, download and login Partiko using the link below. You will also get 3000 Partiko Points for free, and Partiko Points can be converted into Steem token!

https://partiko.app/referral/partiko

Congratulations @abarefootpoet! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 3 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.034
BTC 63877.55
ETH 3143.56
USDT 1.00
SBD 3.97