What is Atomic Swap?
Let's find out Atomic Swap meaning, definition in crypto, what is Atomic Swap, and all other detailed facts.
Atomic swap describes the transfer of cryptocurrency that occurs directly between two parties without requiring any intermediary.
In many cases, traders use the services of a centralized exchange (CEX) to purchase or sell cryptocurrencies. This requires both parties to find a reliable exchange service. Centralized exchanges are flawed as they can experience downtime if the demand surges. They also are subject to state regulations, which vary from country to country.
Unlike CEX services, atomic swaps allow traders to exchange cryptocurrencies directly from one wallet to another. Atomic swaps utilize a smart contract developed for decentralized exchanges (DEX).
Atomic swaps are one of the most decentralized cryptocurrency exchange methods. Automated Market Maker (AMM) DEXs usually rely on centralized liquidity pools to enable trading. The transaction speeds are faster than other services.
Atomic swaps use hash timelock contracts (HTLC), which contain a hashlock that’s used to lock and unlock the deposited crypto. The only party that holds access to the hashlock key is the depositor. Atomic swaps also have a timelock that sets an automatic return of the funds to the depositor in case the parties do not complete the transaction within a specific timeframe.
When an atomic swap occurs, only two scenarios are possible. In the first scenario, both parties receive the funds, and the transaction is successful. In the other scenario, nothing happens. Both parties retain their funds, discounting the transaction fee. Atomic swaps are among the most secure methods of trading digital assets.
To initiate an atomic swap, one of the two parties involved creates an HTLC address to deposit their cryptocurrency or tokens. A passcode and a hash are automatically generated. Party A forwards the hash to Party B. Party B can then use the hash to generate an address of their own.
Party B deposits their assets in their address which Party A can access with the initial password. The contract then automatically forwards the passcode to Party B to access the assets that Party A had deposited.
Both parties have to sign the contracts within a specific time period. If the contracts remain unsigned, the deposits are returned to each party and the transaction does not proceed.
Traders can use atomic swaps on-chain to trade different native coins throughout different blockchains. Atomic swap technology is considered to be protocol agnostic. This means that different crypto assets, like Bitcoin (BTC) and Ethereum (ETH) can be swapped without relying on wrapped tokens or opting to use a centralized exchange.