What Is an Atomic Swap?
An atomic swap is an exchange of cryptocurrencies from separate blockchains. The idea is to remove centralized intermediaries like exchanges and reduce the steps needed to trade tokens, but many exchanges and businesses have created swap solutions to make the process easier.
The term atomic derives from the term "atomic state" in which a state has no substates. This refers to a cryptocurrency transaction between two people using different blockchains that either happens or it doesn'tthere are no alternatives.
Most atomic swap-enabled wallets and blockchains use smart contracts. Smart contracts are programs within blockchains that execute when certain conditions are met. In this case, the conditions are that each party agrees to the transaction before a timer runs out. Using a smart contract in the trade prevents either party from stealing a cryptocurrency from the other.
Atomic swaps are also called cross-chain atomic swaps.
Each cryptocurrency is supported by a blockchain, designed only to accept transactions in specific tokens. For example, the Bitcoin and Ethereum blockchains each have a native token that cannot be transferred to the other. You first need to convert them to fiat currency and then buy the other using other cryptocurrencies and exchanges to get the one you want. Depending on the cryptocurrency, this can take several trades. Atomic swaps allow you to exchange tokens from different blockchains in one trade.
Some decentralized exchanges can conduct atomic swaps for you. A decentralized exchange (DEX) has no central authority regulating it; it is a platform you can trade on without third parties. You can also choose from cross-chain swap providers, where you transfer your digital assets into another wallet, conduct the swap, and transfer them back out.
Atomic swaps rely on each party to provide proof through key encryption and acceptance of both parties through the encrypted key.
The concept was conceived shortly after altcoinscryptocurrencies other than Bitcoinmaterialized. The creation of altcoins meant some cryptocurrency owners became interested in moving capital between coins. This type of token swap first appeared in September 2017, when an atomic swap between Decred and Litecoin was conducted.
Since then, startups and decentralized exchanges have created ways to facilitate swaps and given users the same ability. For example, Lightning Labs, a startup that created the Lightning Network for Bitcoin transactions, has conducted off-chain swaps utilizing the technology.
Special cryptocurrency wallets have also been developed that are capable of cross-chain atomic swapsLiquality has developed a wallet that will swap Bitcoin, ETH, and more by connecting to swap providers like 1inch, Jupiter, and Sovryn.
In an atomic swap, two token owners agree to exchange their tokens. A smart contract is programmed to lock the tokens of both owners, and redeem them in the tokens desired. For instance, if Alice wanted to trade one bitcoin (BTC) for an equal amount of Bob's monero (XMR), the smart contract would lock both amounts on their respective blockchains. Once Alice and Bob agree on the trade, the smart contract would redeem Bob's BTC on the Bitcoin network and Alice's XMR on the Monero network.
Atomic swaps use Hash Timelock Contracts (HTLC) to automate the exchange of tokens. As its name denotes, HTLC is a time-bound smart contract between parties that involves generating one cryptographic hash on each end.
A cryptographic hash function is an algorithm that converts data of variable length, such as a person's wallet address and transaction information. It converts it to a hexadecimal number with a fixed length. In general, the number that is generated is called the hash.
HTLC requires both parties to acknowledge receipt of funds within a specified timeframe. If one party fails to confirm the transaction within the timeframe, the entire transaction is voided, and funds are not transferred. This eliminates counterparty risk, or the risk that one party will accept the offered coins and decline the transfer of their coins.
Atomic swaps sound complicated, but for most users, they can be very simple. Atomic swap-enabled wallets or decentralized exchanges like Atomic Swap or Uniswap let you choose from your cryptocurrency to swap for another token. The swap might be labeled "Exchange" or "Swap" in the wallet's interface.
Once you've selected the appropriate action, you choose the tokens you want to swap; you'll see the amount you'll receive in the token you're swapping. The interface should tell you the swap rate and network fees, let you double-check the transaction, and give you a button to press to initiate the trade.
Depending on the network, whether you're using an exchange or trading with another user, the swap can take several minutes to complete. For example, Atomic Wallet's instructions state that a swap should take about 20 minutes, but other wallets or decentralized exchanges might take less or more time.
Atomic swaps are generally initiated by users and executed by a smart contract. The smart contract can be programmed in many ways, but most tend to lock up the tokens being swapped or burn them, then issue the new tokens to the transferees.
When two entities want to trade tokens, they can use an atomic swap to ensure no third parties are involved. This technique is faster and generally cheaper than going through exchanges or other token swap service providers.
In most cases, the only publicly available information is the token amounts and the users' public addresses. However, if other information has been made available, these addresses can be traced back to their owners, so they are realistically pseudonymous.
The term atomic swap is used to refer to two users trading tokens from incompatible blockchains. The swaps are generally executed by smart contracts, which lock or burn the original tokens and issue new ones on the corresponding blockchains.
The comments, opinions, and analyses expressed on Investopedia are for informational purposes only. Read ourwarranty and liability disclaimerfor more info.
See the article here:
Atomic Swap: Definition, How It Works With Cryptocurrency Trade - Investopedia
- Crypto()Currency - CryptoCurrency.org [Last Updated On: April 26th, 2014] [Originally Added On: April 26th, 2014]
- Cryptocurrency - Wikipedia, the free encyclopedia [Last Updated On: April 26th, 2014] [Originally Added On: April 26th, 2014]
- TNW - Stefan Molyneux - Money, Power and Politics The Cryptocurrency Revolution - Video [Last Updated On: April 26th, 2014] [Originally Added On: April 26th, 2014]
- How to Set Up a Ripple (CryptoCurrency) Generating System! - Video [Last Updated On: April 26th, 2014] [Originally Added On: April 26th, 2014]
- Bitcoin / Cryptocurrency - An Extensive FAQ - Video [Last Updated On: April 26th, 2014] [Originally Added On: April 26th, 2014]
- --- The Great Debate --- Bitcoin vs Altcoin @ The CryptoCurrency Convention 4/9/14 - - Video [Last Updated On: April 26th, 2014] [Originally Added On: April 26th, 2014]
- Bryce Weiner @ CryptoCurrency Convention 4/9/14 - - Video [Last Updated On: April 26th, 2014] [Originally Added On: April 26th, 2014]
- Popularcoin @ CryptoCurrency Convention 4/9/14 - Joshua Nold - Video [Last Updated On: April 26th, 2014] [Originally Added On: April 26th, 2014]
- TimeKoin @ CryptoCurrency Convention 4/9/14 - Michael Brown - Video [Last Updated On: April 26th, 2014] [Originally Added On: April 26th, 2014]
- Infinitecoin @ CryptoCurrency Convention 4/9/14 - Loring Small - Video [Last Updated On: April 26th, 2014] [Originally Added On: April 26th, 2014]
- Bitcoin Exchange CryptoRush Loses Millions of BlackCoin Cryptocurrency - Video [Last Updated On: April 26th, 2014] [Originally Added On: April 26th, 2014]
- Brock Pierce, Entrepreneur "FireSide Chat" @ CryptoCurrency Convention NYC - 4/9/14 - Video [Last Updated On: April 26th, 2014] [Originally Added On: April 26th, 2014]
- [OFFICIAL SPONSOR] Nick Spanos, Bitcoin Center NYC @ CryptoCurrency Convention 4/9/14 - Video [Last Updated On: April 26th, 2014] [Originally Added On: April 26th, 2014]
- AuroraCoin @ CryptoCurrency Convention NYC 4/9/14 - David Lio - Video [Last Updated On: April 26th, 2014] [Originally Added On: April 26th, 2014]
- Dogecoin Founder Speaks on the Future of Cryptocurrency [Last Updated On: April 27th, 2014] [Originally Added On: April 27th, 2014]
- As Bitcoin Soars in Value, Alternative Cryptocurrencies ... [Last Updated On: April 27th, 2014] [Originally Added On: April 27th, 2014]
- Florincoin @ CryptoCurrency Convention NYC 4/9/14 - Joe Fiscella - Video [Last Updated On: April 27th, 2014] [Originally Added On: April 27th, 2014]
- DigiByte @ CryptoCurrency Convention NYC 4/9/14 - Jared Tate - Video [Last Updated On: April 27th, 2014] [Originally Added On: April 27th, 2014]
- Digitalcoin @ CryptoCurrency Convention NYC 4/9/14 - Andrew Davidson - Video [Last Updated On: April 27th, 2014] [Originally Added On: April 27th, 2014]
- PotCoin @ CryptoCurrency Convention NYC 4/9/14 - Nick Iversen - Video [Last Updated On: April 27th, 2014] [Originally Added On: April 27th, 2014]
- ZenithCoin @ CryptoCurrency Convention NYC 4/9/14 - Eddie Corral - Video [Last Updated On: April 27th, 2014] [Originally Added On: April 27th, 2014]
- BitAngels Co-Founder, David Johnson @ CryptoCurrency Convention NYC 4/9/14 - Video [Last Updated On: April 27th, 2014] [Originally Added On: April 27th, 2014]
- Australian dogecoin founder speaks on the future of cryptocurrency [Last Updated On: April 28th, 2014] [Originally Added On: April 28th, 2014]
- Coinnext Cryptocurrency Exchange Coming Soon - Video [Last Updated On: April 29th, 2014] [Originally Added On: April 29th, 2014]
- Cryptocurrency News Round-Up: MtGox Hearing Begins as Bitcoin gets Bloomberg Endorsement [Last Updated On: May 1st, 2014] [Originally Added On: May 1st, 2014]
- mTrader.org - Cryptocurrency Mining System - Video [Last Updated On: May 1st, 2014] [Originally Added On: May 1st, 2014]
- CryptoCurrency - cryptobars commodity Launch! - Video [Last Updated On: May 1st, 2014] [Originally Added On: May 1st, 2014]
- The Mises View: "Taxing Cryptocurrency" | Jeff Deist - Video [Last Updated On: May 2nd, 2014] [Originally Added On: May 2nd, 2014]
- Coin Pursuit Launches SliceFeeds Interactive Cryptocurrency Network [Last Updated On: May 3rd, 2014] [Originally Added On: May 3rd, 2014]
- Cryptocurrency | Ground Zero with Clyde Lewis [Last Updated On: May 3rd, 2014] [Originally Added On: May 3rd, 2014]
- CS 171 Final Project: Cryptocurrency Visualizations - Video [Last Updated On: May 3rd, 2014] [Originally Added On: May 3rd, 2014]
- Cryptocurrency Explained The Tech Guy 1046 - Video [Last Updated On: May 3rd, 2014] [Originally Added On: May 3rd, 2014]
- Know How 74 Cryptocurrency - Video [Last Updated On: May 4th, 2014] [Originally Added On: May 4th, 2014]
- MIT undergrads will each receive $100 in bitcoin [Last Updated On: May 5th, 2014] [Originally Added On: May 5th, 2014]
- cryptocurrency - Fortune Finance: Hedge Funds, Markets ... [Last Updated On: May 8th, 2014] [Originally Added On: May 8th, 2014]
- Bitcoin wins US election panel's approval for political donations [Last Updated On: May 9th, 2014] [Originally Added On: May 9th, 2014]
- CryptoCurrency of the World Unite! - Video [Last Updated On: May 9th, 2014] [Originally Added On: May 9th, 2014]
- Major Dogecoin Wallet Hacked, Shut Down [Last Updated On: May 13th, 2014] [Originally Added On: May 13th, 2014]
- Such hack, much sad: Doge Vault reportedly loses $56,000 in heist [Last Updated On: May 13th, 2014] [Originally Added On: May 13th, 2014]
- BBT Presents: Ode to Cryptocurrency - Video [Last Updated On: May 13th, 2014] [Originally Added On: May 13th, 2014]
- Scryptify Cryptocurrency Video - Crypto Currency Exchanges - Video [Last Updated On: May 13th, 2014] [Originally Added On: May 13th, 2014]
- AMD cuts Radeon R9 280 price as inflation woes die down [Last Updated On: May 15th, 2014] [Originally Added On: May 15th, 2014]
- The Cryptocurrency Certification Consortium - Video [Last Updated On: May 15th, 2014] [Originally Added On: May 15th, 2014]
- Bitpagar Cryptocurrency - Video [Last Updated On: May 16th, 2014] [Originally Added On: May 16th, 2014]
- TagPro - Cryptocurrency Juke Session w/ LTB & Counterpary - Video [Last Updated On: May 16th, 2014] [Originally Added On: May 16th, 2014]
- How to Mine Cryptocurrency Safely - Video [Last Updated On: May 16th, 2014] [Originally Added On: May 16th, 2014]
- Bunnycoin - Innovative New Cryptocurrency - Video [Last Updated On: May 16th, 2014] [Originally Added On: May 16th, 2014]
- Jan Irvin on Learning, Statism, Culture, Cryptocurrency and Voluntarism -- Potent News Podcast #1 - Video [Last Updated On: May 16th, 2014] [Originally Added On: May 16th, 2014]
- Nxt cryptocurrency platform: Proof of Stake mining system - Video [Last Updated On: May 18th, 2014] [Originally Added On: May 18th, 2014]
- Cryptocurrency Round-Up: Darkcoin Rise Continues; Dogecoin Saved My Life & Bitcoin Explainer Videos [Last Updated On: May 19th, 2014] [Originally Added On: May 19th, 2014]
- Givecoin.info Announces Partnership with Do A Bit of Good: World's First Charitable Mining Screensaver [Last Updated On: May 21st, 2014] [Originally Added On: May 21st, 2014]
- Cryptocurrency: Get Mining! - Video [Last Updated On: May 22nd, 2014] [Originally Added On: May 22nd, 2014]
- Violincoin - The first cryptocurrency for musician - - Video [Last Updated On: May 22nd, 2014] [Originally Added On: May 22nd, 2014]
- Trollcoin - The Fun Cryptocurrency! - Video [Last Updated On: May 22nd, 2014] [Originally Added On: May 22nd, 2014]
- Cryptocurrency and Nonprofits with Eric Nakagawa - Video [Last Updated On: May 23rd, 2014] [Originally Added On: May 23rd, 2014]
- The Cryptocurrency Store - Video [Last Updated On: May 23rd, 2014] [Originally Added On: May 23rd, 2014]
- The Cryptocurrency Store (Spanish/Espagnol) - Video [Last Updated On: May 23rd, 2014] [Originally Added On: May 23rd, 2014]
- How To Trade CryptoCurrency: Sign up to a safe and reliable exchange for trading CryptoCurrency - Video [Last Updated On: May 23rd, 2014] [Originally Added On: May 23rd, 2014]
- UT students to launch cryptocurrency exchange [Last Updated On: May 24th, 2014] [Originally Added On: May 24th, 2014]
- Videoconferencia Cryptocurrency 201243946 - Video [Last Updated On: May 27th, 2014] [Originally Added On: May 27th, 2014]
- VideoCharla Jesus Ramos Cryptocurrency - Video [Last Updated On: May 27th, 2014] [Originally Added On: May 27th, 2014]
- Cryptocurrency Round-Up: Bitcoin Pioneer Dies and Digital Currency's Status in Australia [Last Updated On: August 31st, 2014] [Originally Added On: August 31st, 2014]
- Bitcoin enthusiasts discuss the cryptocurrency - Video [Last Updated On: August 31st, 2014] [Originally Added On: August 31st, 2014]
- Make Fast 1.0 up to 10.00 BTC or Any Cryptocurrency REAL CASH - Video [Last Updated On: August 31st, 2014] [Originally Added On: August 31st, 2014]
- Halcyon cryptocurrency - Video [Last Updated On: August 31st, 2014] [Originally Added On: August 31st, 2014]
- Selling products / services / fiat money for cryptocurrency - Coinkite PoS Terminal - Video [Last Updated On: August 31st, 2014] [Originally Added On: August 31st, 2014]
- Selling cryptocurrency to customers - Coinkite PoS Terminal - Video [Last Updated On: August 31st, 2014] [Originally Added On: August 31st, 2014]
- Cryptocurrency Made Simple - A Plain English Guide to Bitcoins [Last Updated On: September 8th, 2014] [Originally Added On: September 8th, 2014]
- PotatoCoin - The cryptocurrency for the third world - Video [Last Updated On: September 8th, 2014] [Originally Added On: September 8th, 2014]
- How To Trade One Kind Of Cryptocurrency For A Different Kind Of Cryptocurrency - Video [Last Updated On: September 8th, 2014] [Originally Added On: September 8th, 2014]
- How To Fund Your Bleutrade Cryptocurrency Trading Account - Video [Last Updated On: September 8th, 2014] [Originally Added On: September 8th, 2014]
- How To Open An Account At Bleutrade.com Cryptocurrency Exchange - Video [Last Updated On: September 8th, 2014] [Originally Added On: September 8th, 2014]
- Cryptocurrency Round-Up: Apple Pay Boosts Bitcoin, Nakamoto Negotiates With Hacker [Last Updated On: September 11th, 2014] [Originally Added On: September 11th, 2014]
- Qoinpro Cryptocurrency Faucet ok - Video [Last Updated On: September 12th, 2014] [Originally Added On: September 12th, 2014]
- Weekly Roundup - CEX.IO - Multi-Functional cryptocurrency exchange - Video [Last Updated On: September 12th, 2014] [Originally Added On: September 12th, 2014]
- TCR #27: Cryptocurrency growth, 9/11 Anniversary, CDC Scandal, Face Your Fears - Video [Last Updated On: September 12th, 2014] [Originally Added On: September 12th, 2014]
- VanosEnigmA 011 Bitcoin-Comedy BitcoinDog CryptoCurrency-Cat Naughty - Video [Last Updated On: September 15th, 2014] [Originally Added On: September 15th, 2014]
- WikiLeaks Avoided Bitcoin to Prevent Government 'Destroying' Cryptocurrency [Last Updated On: September 16th, 2014] [Originally Added On: September 16th, 2014]
- LXC Coin crowdfunds in challenge to Bitcoin [Last Updated On: September 16th, 2014] [Originally Added On: September 16th, 2014]
- Why Bitcoin Is Poised To Win Big In Las Vegas [Last Updated On: September 19th, 2014] [Originally Added On: September 19th, 2014]