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.
Here is the original post:
Atomic Swap: Definition, How It Works With Cryptocurrency Trade - Investopedia
- Bitcoin Millionaire, Originally Funded by Grandmother's $1245 Gift, Seeks New Cryptocurrency Investment Options - Analytics Insight [Last Updated On: December 6th, 2023] [Originally Added On: December 6th, 2023]
- Bitcoin Tops $41,000 for First Time in 20 Months - PYMNTS.com [Last Updated On: December 6th, 2023] [Originally Added On: December 6th, 2023]
- Evolving threats in cryptocurrency: The outdated wallet dilemma | Opinion - crypto.news [Last Updated On: December 6th, 2023] [Originally Added On: December 6th, 2023]
- Premier Cryptocurrency Selections For 2023: VC Spectra, Terra LUNA, And dYdX - The Crypto Basic [Last Updated On: December 6th, 2023] [Originally Added On: December 6th, 2023]
- Why is the crypto market down today? - Cointelegraph [Last Updated On: December 6th, 2023] [Originally Added On: December 6th, 2023]
- 'Fugitive' Spanish aristocrat behind North Korea cryptocurrency conference arrested - The Record from Recorded Future News [Last Updated On: December 6th, 2023] [Originally Added On: December 6th, 2023]
- Beyond Bitcoin and Dogecoin: Top Cryptocurrency Investments to Watch in 2023 - Finbold - Finance in Bold [Last Updated On: December 6th, 2023] [Originally Added On: December 6th, 2023]
- Timing The Market: Is A New Cryptocurrency Rivaling Solana And Polkadot For Investment? - The Crypto Basic [Last Updated On: December 6th, 2023] [Originally Added On: December 6th, 2023]
- Take Control of Your Cryptocurrency Security with BTC Mixing - Medium [Last Updated On: December 6th, 2023] [Originally Added On: December 6th, 2023]
- Bitcoin extends gains to above $43K; crypto-linked stocks climb (Cryptocurrency:BTC-USD) - Seeking Alpha [Last Updated On: December 6th, 2023] [Originally Added On: December 6th, 2023]
- What Is the Role of Cryptocurrency in the Field of Online Casinos? - Live Bitcoin News [Last Updated On: December 6th, 2023] [Originally Added On: December 6th, 2023]
- Cryptocurrency Industry Spends Record $18.96 Million in Federal Lobbying So Far in 2023 - Cryptonews [Last Updated On: December 6th, 2023] [Originally Added On: December 6th, 2023]
- What To Expect From Bitcoin and Crypto Markets In 2024 - Investopedia [Last Updated On: December 6th, 2023] [Originally Added On: December 6th, 2023]
- The Role of Cryptocurrency in the Insurance Industry: Claims Processing, Risk Management, and so on - Robotics and Automation News [Last Updated On: December 6th, 2023] [Originally Added On: December 6th, 2023]
- Shiba Inu Flips LTC and DAI to Become 16th Biggest Cryptocurrency By Market Cap - The Crypto Basic [Last Updated On: December 6th, 2023] [Originally Added On: December 6th, 2023]
- First-of-its-kind cryptocurrency banking coming to Brazil - InvestorsObserver [Last Updated On: December 6th, 2023] [Originally Added On: December 6th, 2023]
- What is market manipulation in cryptocurrency? - Cointelegraph [Last Updated On: December 6th, 2023] [Originally Added On: December 6th, 2023]
- Binance Tops PYMNTS' Provider Ranking of Crypto Wallets - PYMNTS.com [Last Updated On: December 6th, 2023] [Originally Added On: December 6th, 2023]
- Boise Man Sentenced for Role in Conspiracy to Use Cryptocurrency to Launder Drug Proceeds - bigcountrynewsconnection.com [Last Updated On: December 6th, 2023] [Originally Added On: December 6th, 2023]
- Coinbase Slips Seven Spots in Latest Ranking of Crypto Apps - PYMNTS.com [Last Updated On: December 6th, 2023] [Originally Added On: December 6th, 2023]
- Bitcoin's price dynamics: Unraveling the cryptocurrency's volatility - VentureBeat [Last Updated On: December 6th, 2023] [Originally Added On: December 6th, 2023]
- Celsius waiting to unstake $470M in Ethereum amid bankruptcy - CryptoTicker.io - Bitcoin Price, Ethereum Price & Crypto News [Last Updated On: January 8th, 2024] [Originally Added On: January 8th, 2024]
- Why Bitcoin ETF Approval Will Not Be a 'Sell the News' Event Analysts - BeInCrypto [Last Updated On: January 8th, 2024] [Originally Added On: January 8th, 2024]
- Introduction Discover the exciting world of Coincertik, a groundbreaking cryptocurrency project - Medium [Last Updated On: January 8th, 2024] [Originally Added On: January 8th, 2024]
- Crypto Price Today: BTC Above $43k; Altcoins Landed in Reds - Analytics Insight [Last Updated On: January 8th, 2024] [Originally Added On: January 8th, 2024]
- NFT Investments to change its name to Phoenix Digital Assets - FX News Group [Last Updated On: January 8th, 2024] [Originally Added On: January 8th, 2024]
- Solana (SOL) Outperforms Ethereum (ETH) by This Overlooked Criterion, Analyst Says By U.Today - Investing.com [Last Updated On: January 8th, 2024] [Originally Added On: January 8th, 2024]
- REPORT | CryptoCurrency Hacks Declined by Over 50% in 2023 with Nearly $30 Million Per Incident - bitcoinke.io [Last Updated On: January 8th, 2024] [Originally Added On: January 8th, 2024]
- The Rising Contender in Cryptocurrency: Could This New Token Surpass NEAR Protocol and BNB? - BSC NEWS [Last Updated On: January 8th, 2024] [Originally Added On: January 8th, 2024]
- Why the Crypto Market Is Down Today - BeInCrypto [Last Updated On: January 8th, 2024] [Originally Added On: January 8th, 2024]
- Top 10 Cryptocurrencies In January 2024 Forbes Advisor UK - Forbes [Last Updated On: January 8th, 2024] [Originally Added On: January 8th, 2024]
- Why is The Cryptocurrency Market Down Today? - Watcher Guru [Last Updated On: January 8th, 2024] [Originally Added On: January 8th, 2024]
- Why cant more Texans profit like Bitcoin miners for using less power? - The Texas Tribune [Last Updated On: January 8th, 2024] [Originally Added On: January 8th, 2024]
- Which Cryptocurrency Will Kindle the First Bull Run of 2024? Investors Are Betting on Green Bitcoin - NewsBTC [Last Updated On: January 8th, 2024] [Originally Added On: January 8th, 2024]
- Here's what happened in crypto today - Cointelegraph [Last Updated On: January 8th, 2024] [Originally Added On: January 8th, 2024]
- Bitcoin Price Prediction: Can Bitcoin Reach $1000000 by 2025? Forbes Advisor INDIA - Forbes [Last Updated On: January 8th, 2024] [Originally Added On: January 8th, 2024]
- Cardano Falls 10% In Rout By Investing.com - Investing.com [Last Updated On: January 8th, 2024] [Originally Added On: January 8th, 2024]
- Why Is Crypto Going Up Today: January 2024 - Forbes [Last Updated On: January 8th, 2024] [Originally Added On: January 8th, 2024]
- Top 10 cryptocurrencies of 2024 - USA TODAY [Last Updated On: January 8th, 2024] [Originally Added On: January 8th, 2024]
- Coinbase Plans to Offer Crypto Derivatives in Europe - PYMNTS.com [Last Updated On: January 8th, 2024] [Originally Added On: January 8th, 2024]
- $1.2 million mysteriously deposited in missing Bitcoin founder's abandoned wallet money deposited anonymously in ... - Tom's Hardware [Last Updated On: January 8th, 2024] [Originally Added On: January 8th, 2024]
- How to Build Your Own Cryptocurrency from Scratch - Analytics Insight [Last Updated On: January 8th, 2024] [Originally Added On: January 8th, 2024]
- Over $24 Billion in Cryptocurrency Received by Illicit Addresses in 2023, Down 40% from 2022: Chainalysis - Cryptonews [Last Updated On: January 19th, 2024] [Originally Added On: January 19th, 2024]
- How a 'crypto drainer' tricked people into handing over $80 million in assets worldwide - The Record from Recorded Future News [Last Updated On: January 19th, 2024] [Originally Added On: January 19th, 2024]
- Bitcoin maintain Its dominance in the cryptocurrency market in 2024? - CXOToday.com [Last Updated On: January 19th, 2024] [Originally Added On: January 19th, 2024]
- VeChain X Twitter Hacked Amidst Cryptocurrency Market Surge - Crypto Times [Last Updated On: January 19th, 2024] [Originally Added On: January 19th, 2024]
- CoinbarPay Introduces a Brand New Ecosystem Cryptocurrency on XDB CHAIN to Expand the Adoption of Crypto ... - CryptoPotato [Last Updated On: January 19th, 2024] [Originally Added On: January 19th, 2024]
- HashKey reaches unicorn valuation after raising US$100 million - South China Morning Post [Last Updated On: January 19th, 2024] [Originally Added On: January 19th, 2024]
- Edmonton man and his cryptocurrency company sanctioned for breaching Alberta securities laws - Yahoo News Canada [Last Updated On: January 19th, 2024] [Originally Added On: January 19th, 2024]
- Crucial Bitcoin (BTC) Resistance Is Hit, Will Shiba Inu (SHIB) Gain or Lose Zero? Cardano (ADA) in Trouble By U.Today - Investing.com [Last Updated On: January 19th, 2024] [Originally Added On: January 19th, 2024]
- Could This Meme Cryptocurrency Skyrocket in 2024: Analysis of New Trending Altcoin ApeMax - Finbold - Finance in Bold [Last Updated On: January 19th, 2024] [Originally Added On: January 19th, 2024]
- Unlocking Tomorrow-Navigating the Thrilling Frontier of Blockchain Beyond Cryptocurrency - Medium [Last Updated On: January 19th, 2024] [Originally Added On: January 19th, 2024]
- Binance Records $4.6 Billion in Inflows Following Settlement - PYMNTS.com [Last Updated On: January 19th, 2024] [Originally Added On: January 19th, 2024]
- Cryptocurrency: Top 5 Altcoins That Could Yield Maximum Profit In 2024 - Watcher Guru [Last Updated On: January 19th, 2024] [Originally Added On: January 19th, 2024]
- Cryptocurrency Trader Turns $300 into $1.03 Million in 10 Days - Watcher Guru [Last Updated On: January 19th, 2024] [Originally Added On: January 19th, 2024]
- Fraudsters Move From Bitcoin to Stablecoins for Scams - PYMNTS.com [Last Updated On: January 19th, 2024] [Originally Added On: January 19th, 2024]
- Unveiling the Cryptocurrency Spark: a Journey into Fascinating Aspects of the Technology - Block Telegraph [Last Updated On: January 19th, 2024] [Originally Added On: January 19th, 2024]
- Chainalysis observes decrease in cryptocurrency crime in 2023 - TechTarget [Last Updated On: January 19th, 2024] [Originally Added On: January 19th, 2024]
- How a 27-Year-Old Codebreaker Busted the Myth of Bitcoin's Anonymity - WIRED [Last Updated On: January 19th, 2024] [Originally Added On: January 19th, 2024]
- Is Bitcoin Mining Profitable In 2024? Forbes Advisor INDIA - Forbes [Last Updated On: February 12th, 2024] [Originally Added On: February 12th, 2024]
- Free PlayZap $PZP Tokens: Your Gateway to Cryptocurrency! - Medium [Last Updated On: February 12th, 2024] [Originally Added On: February 12th, 2024]
- BTC Surges Beyond $48K, Reaching New Heights in Cryptocurrency Market - CoinGape [Last Updated On: February 12th, 2024] [Originally Added On: February 12th, 2024]
- Cryptocurrency: 3 Coins Under $0.1 That Could Turn $1 Into $10 In 2024 - Watcher Guru [Last Updated On: February 12th, 2024] [Originally Added On: February 12th, 2024]
- Joystream $JOY Airdrop: Your Path to Free Cryptocurrency - Medium [Last Updated On: February 12th, 2024] [Originally Added On: February 12th, 2024]
- Top 10 Cryptocurrencies In February 2024 Forbes Advisor UK - Forbes [Last Updated On: February 12th, 2024] [Originally Added On: February 12th, 2024]
- The Biden administration now requires large cryptocurrency miners to report their energy use - Engadget [Last Updated On: February 12th, 2024] [Originally Added On: February 12th, 2024]
- Bitcoin price predictions: How much more could it rise in 2024? - Euronews [Last Updated On: February 12th, 2024] [Originally Added On: February 12th, 2024]
- Ethereum experiment ERC404 is an NFT-cryptocurrency hybrid and it's already generated $87m in trades - DLNews [Last Updated On: February 12th, 2024] [Originally Added On: February 12th, 2024]
- 'Bitcoin Rodney' charged in Maryland, arrested with one-way ticket to UAE - The Baltimore Banner [Last Updated On: February 12th, 2024] [Originally Added On: February 12th, 2024]
- Seize the Opportunity: Claim r/CryptoCurrency Moons $MOON Airdrop Tokens - Medium [Last Updated On: February 12th, 2024] [Originally Added On: February 12th, 2024]
- Cryptocurrency mining in the US could be using as much electricity as Washington state - The Real News Network [Last Updated On: February 12th, 2024] [Originally Added On: February 12th, 2024]
- Top Cryptocurrency for Immediate 10x Gains in February 2024 - Finbold - Finance in Bold [Last Updated On: February 12th, 2024] [Originally Added On: February 12th, 2024]
- How to Stake r/CryptoCurrency Moons Using the Dappradar Platform - Medium [Last Updated On: February 12th, 2024] [Originally Added On: February 12th, 2024]
- Opinion: The Future of Cryptocurrency Policy: Jefferson or Xi - The Missouri Times [Last Updated On: February 12th, 2024] [Originally Added On: February 12th, 2024]
- Top Cryptocurrency Statistics and Trends in 2024 Forbes Advisor Australia - Forbes [Last Updated On: February 12th, 2024] [Originally Added On: February 12th, 2024]
- What Can You Buy With Bitcoin? - Investopedia [Last Updated On: February 12th, 2024] [Originally Added On: February 12th, 2024]
- Experts reveal the steps to take to avoid a cryptocurrency scam - Coos Bay World [Last Updated On: February 12th, 2024] [Originally Added On: February 12th, 2024]
- Shiba Inu A Cryptocurrency That Can Give You $1 Million? - Watcher Guru [Last Updated On: February 12th, 2024] [Originally Added On: February 12th, 2024]
- 10 Best Cryptocurrencies To Buy In February 2024 - Forbes [Last Updated On: February 12th, 2024] [Originally Added On: February 12th, 2024]
- NY AG Alleges $3 Billion Fraud in Updated Crypto Scam Case - PYMNTS.com [Last Updated On: February 12th, 2024] [Originally Added On: February 12th, 2024]