DEFINITION of 'Atomic Swaps'

Atomic swap is a smart contract technology that enables exchange of one cryptocurrency for another without using centralized intermediaries, such as exchanges.

Atomic swaps can take place directly between blockchains of different cryptocurrencies or they can be conducted off-chain, away from the main blockchain. They first came into prominence in September 2017, when an atomic swap between Decred and Litecoin was conducted

Since then, other startups and decentralized exchanges have allowed users the same facility. For example, Lightning Labs, a startup that uses bitcoin’s lightning network for transactions, has conducted off-chain swaps using the technology.

Cryptocurrencies and decentralized exchanges, such as 0x and Altcoin.io, have also incorporated the technology. 

BREAKING DOWN 'Atomic Swaps'

As it occurs today, the process for exchanging cryptocurrencies is time-consuming and complex. This is due to several reasons. For example, the fragmented nature of today’s cryptocurrency ecosystem presents several challenges to average traders.

Not all cryptocurrency exchanges support all coins. As such, a trader wishing to exchange her coin for another one that is not supported on the current exchange may need to migrate accounts or make several conversions between intermediate coins to accomplish her goal. There is also an associated counterparty risk, if the trader wishes to exchange her coins with another trader.  

Atomic swaps solve this problem through the use of Hash Timelock Contracts (HTLC). As its name denotes, HTLC is a time-bound smart contract between parties that involves the generation of a cryptographic hash function, which can be verified between them. (See also: Understanding Smart Contracts.)

Simply, atomic swaps require both parties to acknowledge receipt of funds within a specified timeframe using a cryptographic hash function. If one of the involved parties fails to confirm the transaction within the timeframe, then the entire transaction is voided and funds are not exchanged. The latter action helps remove counterparty risk.  

An example of an atomic swap transaction is shown below:

Suppose Alice is a trader interested in converting 100 bitcoins to an equivalent litecoins with Bob. She submits her transaction to bitcoin’s blockchain. During this process, Alice generates a number for a cryptographic hash function to encrypt the transaction. Bob repeats the same process at his end by similarly submitting his transaction to litecoin’s blockchain.

Both Alice and Bob unlock their respective funds using their respective numbers. They have to do this within a specified timeframe or else the transfer will not take place. Atomic swaps can also be used in conjunction with a lightning network to conduct off-chain exchanges. (See also: Bitcoin's Lightning Network: Three Possible Problems.)

RELATED TERMS
  1. Reverse Swap

    A reverse swap is an exchange of cash flow streams that undoes ...
  2. Swap Curve

    A swap curve identifies the relationship between swap rates at ...
  3. Quanto Swap

    A quanto swap is a cross-currency derivative where the underlying ...
  4. Inflation Swap

    An inflation swap is a transaction in which two parties exchange ...
  5. Currency Swap

    A swap that involves the exchange of principal and interest in ...
  6. Master Swap Agreement

    A basic, standardized swap contract created by the International ...
Related Articles
  1. Tech

    How Will Lightning Network Evolve In The Future?

    Here are three ways in which Lightning Network, one of the solutions being proposed to scale bitcoin's blockchain, is evolving to solve its problems.
  2. Trading

    What Warren Buffet Calls "Weapons of Mass Destruction": Understanding the Swap Industry

    A full analysis of how the swap industry works.
  3. Trading

    Currency Swap Basics

    Find out what makes currency swaps unique and slightly more complicated than other types of swaps.
  4. Tech

    Is Bitcoin's Lightning Network a Game Changer?

    The Lightning network promises faster transaction speed and micropayments on bitcoin's blockchain.
  5. Tech

    What is the Bitcoin "Lightning Network?"

    Bitcoin developers have touted a new "lightning network" service which may be able to provide instantaneous transactions.
  6. Tech

    How Bitcoin Works

    Miners, hashes, keys, cold storage, blocks - it's confusing. We can help you understand how bitcoin works.
  7. Trading

    Hedging with currency swaps

    The wrong currency movement can crush positive portfolio returns. Find out how to hedge against it with currency swaps.
  8. Tech

    Bitcoin Vs. Litecoin: What's The Difference?

    Litecoin is often referred to as "the silver to Bitcoin's gold." But what is Litecoin, and how does it compare to its more famous counterpart?
  9. Trading

    How To Value Interest Rate Swaps

    Interest rate swaps are derivative instruments that enable counterparties to exchange fixed and floating cash flows.
  10. Tech

    Litecoin Surge: 5 Likely Scenarios Why It Occurred

    As bitcoin's price has soared, Litecoin tagged along for the ride. What's behind the Litecoin groundswell?
RELATED FAQS
  1. When was the first swap agreement and why were swaps created?

    Learn about the history of swap agreements, the first swap agreement between IBM and the World Bank, and how swaps have evolved ... Read Answer >>
  2. How do companies benefit from interest rate and currency swaps?

    Interest rate and currency swaps help companies manage exposure to rate fluctuations and acquire a lower rate than they would ... Read Answer >>
  3. What Does the Bitcoin Blockchain Record?

    Read about the bitcoin blockchain, a public ledger shared among all bitcoin users that records the information of every single ... Read Answer >>
Hot Definitions
  1. Discount Rate

    Discount rate is the interest rate charged to commercial banks and other depository institutions for loans received from ...
  2. Economies of Scale

    Economies of scale refer to reduced costs per unit that arise from increased total output of a product. For example, a larger ...
  3. Quick Ratio

    The quick ratio measures a company’s ability to meet its short-term obligations with its most liquid assets.
  4. Leverage

    Leverage results from using borrowed capital as a source of funding when investing to expand the firm's asset base and generate ...
  5. Financial Risk

    Financial risk is the possibility that shareholders will lose money when investing in a company if its cash flow fails to ...
  6. Enterprise Value (EV)

    Enterprise Value (EV) is a measure of a company's total value, often used as a more comprehensive alternative to equity market ...
Trading Center