Your Guide in the World of Cryptos
Atomic Swaps: What’s That Like
To start with, Atomic Swap is a technology of direct trade between two different cryptocurrencies with no third parties, middlemen, intermediary tokens etc. Alice sends Bitcoins to Bob, Bob sends Litecoins to Alice. That’s it. The story is about Alice and Bob’s wallets containing cryptos, their decision to exchange, and their computers connected to their respective blockchains.
If Alice owned 5 Bitcoins, but instead wanted 100 Litecoins, and Bob owned 100 Litecoins, but instead wanted 5 Bitcoins, then Bob and Alice could make a trade. To avoid Alice’s possible cheating in accepting Bob’s 100 Litecoins, but then failing to send her 5 Bitcoins, atomic swaps utilizes what is known as hash time-locked contracts (HTLCs).
Hash time-locked contracts ensure that the atomic swap process is completely trustless by ensuring both parties fulfill the requirements of the trade. If this proof is not received within 24 hours (the timeframe depends on various factors), the money is returned to their respective owners..
That’s why this technology matters, as the trade is cancelled if only one of the two parties is unsatisfied..
Therefore, for a trade between Alice and Bob to take place, both must submit their transactions to their respective blockchains, Alice on the Bitcoin blockchain, and Bob on the Litecoin blockchain. In order for Alice to claim the 100 Litecoins sent from Bob, she must produce a number that only she knows, which is used to generate a cryptographic hash (a very long row of letters and numbers), thus providing proof of payment.
Atomic Swaps: Present and Future Application
Currently, this technology is being used for sending money from one blockchain to another. For example, in Swap.Online, we use it for BTC ⇔ ETH and ERC-20 ⇔ BTC swaps. Everyone can change their cryptos in a safe and decentralized manner. You can try it yourself: just follow the instruction manual!
Research on the future of this technology is being carried out in two directions. Firstly, there are a couple of emerging solutions for executing swaps above the blockchain (second-layer scalability) e.g. Lightning Network for Bitcoin, Raiden Network, and Liquidity Network for Ethereum. They are trying to somehow solve the problem of blockchain overloads. Secondly, many researchers are trying to find commercial applications for Atomic Swaps. It is highly likely that they will be used in statistics, banking, logistics, state registers and other areas.
What can we derive from this article? The technology of Atomic Swaps is a way to transfer cryptos from one blockchain to another with the use of special smart contracts set for a limited amount of time. The technology is used for decentralized peer-to-peer cryptocurrency trading.