How Atomic Swaps Can Change Cryptocurrency Transactions

in #bitcoin6 years ago (edited)

lightning.png

Atomic Swaps are an exchange between two different cryptocurrencies without the need for a third-party. These swaps remove the risk of one party defaulting on the trade. Also known as cross-chain trading, atomic swaps greatly change the way in which users can transact with each other.

Consider the below example, as explained by CryptoCompare:

If Alice owned 5 Bitcoins but instead wanted 100 Litecoins, she would have to go through an exchange, i.e. a third-party. However, with atomic swaps, if Bob owned 100 Litecoins but instead wanted 5 Bitcoins, then Bob and Alice could make a trade. In order to prevent, for example, Alice accepting Bob’s 100 Litecoins but then failing to send over her 5 Bitcoins, atomic swaps utilizes what is known as hash time-locked contracts (HTLCs).

HTLCs enable transactions to be both valid and trustless. To do this, the recipient in a transaction is required to acknowledge receipt of the transaction before a certain deadline. If receipt is not given prior to a deadline, the funds are sent back to the sender.

Using the Alice & Bob scenario again, the use of hashes can be explained as so:

Alice and Bob submit a transaction on the blockchains respective to their cryptocurrency. The receiver, Alice, acknowledges receipt of Bob’s payment by providing the number that was generated via a hash function. In order for Bob to prove that he got his bitcoin from Alice, he would also need to provide the same number Alice used — of which was generated from the cryptographic hash.

Atomic swaps require that participating blockchains implement the Lightning network in order for these transactions to happen. The Lightning network links the two blockchains together. Further, both blockchains need to use the same type of cryptographic hash function, like SHA-256.

So Why Should You Care?

Besides the obvious — enabling users to swap cryptocurrencies without an exchange, atomic swaps can also contribute to the longevity of a cryptocurrency. If users know that a cryptocurrency can be swapped for another one, he/she may be more apt to trade with it.

Imagine if the credit cards, AMEX and VISA, were cryptocurrencies. It is like trying to buy a shirt with your AMEX card at a store that does not accept AMEX. This is mitigated because you can trade your AMEX for VISA, of which is largely accepted at retail shops.

Good News: Atomic swaps have successfully occurred using Litecoin in exchange for Bitcoin, Vertcoin, and Decred.

Bad News: Currently, users need to have the blockchains of either currency downloaded in order to do the swap, and need to know how to use the command line. As such, atomic swaps are not really practical for the average user just yet. However, the Komodo team (developers behind a decentralized exchange known as BarterDEX) was able to complete a valid atomic swap using an Electrum server, removing the need to download an entire blockchain.

Sources: CryptoCompare, CoinSutra

Sort:  

Coins mentioned in post:

CoinPrice (USD)📈 24h📉 7d
BTCBitcoin8212.080$12.05%-18.9%
DCRDecred73.022$10.97%-24.36%
KMDKomodo3.935$10.21%-32.14%
LTCLitecoin150.133$11.52%-7.33%
VTCVertcoin3.167$22.18%-14.96%

Congratulations @jord! You received a personal award!

1 Year on Steemit

Click here to view your Board

Do not miss the last post from @steemitboard:

Christmas Challenge - The party continues

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @jord! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.29
TRX 0.11
JST 0.031
BTC 69768.04
ETH 3884.71
USDT 1.00
SBD 3.73