ATOMIC SWAP. A short intro

3년 전

Atomic swaps are a means of exchanging coins across blockchains, without a centralised party like an exchange or escrow. The development of atomic swaps is critical in continuing to develop a secure crypto ecosystem with trustless, decentralised trading. 

When you trade crypto on a regular exchange, you send your coins to a company, who (hopefully, but by no means always) store them safely for you. Your balance is credited in their database, a record is created with the funds you deposit, and their order-matching engine pairs your buys and sells with those of other users.

It all works pretty well, most of the time. When it doesn’t, though, it can be catastrophic. Traders and investors have lost billions of dollars in crypto when exchanges have been hacked, or gone offline at a critical time for one reason or another.

This is where atomic swaps come in. They allow traders to exchange coins on different blockchains, peer-to-peer. No hacks, no downtime, no trust required. Let’s say Linda and Richard want to exchange BTC and LTC:

1) Linda creates a secret phrase and hashes it (a hash is a one-way mathematical function – you can easily create the hash from the secret phrase, but not the phrase from the hash)
2) Linda creates a transaction to Richard on the Bitcoin network that includes the hash she created. It has the condition that the transaction will only be executed when the secret to the hash is revealed.
3) Richard creates the corresponding transfer to Linda on the Litecoin network, with the same hash as part of the condition. Richard does not know the secret, but knows that Linda’s transaction will only complete when she reveals it.
4) Linda publishes the secret to the hash, executing Richards’s transaction to her on the Litecoin network.
5) The secret is now public, so Richard can execute Linda’s transaction to him on the Bitcoin network.
6) Linda and Richard can both put other conditions in their transactions, such as cancelling them if the secret isn’t revealed within a certain amount of time.

The new generation of decentralised exchanges will feature atomic swaps, all within a handy user interface that manages the secret creation for you. 

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.

Disclaimer: information provided by @cryptomedics does not constitute as investment advice, financial advice, trading advice, or any other sort of advice, and you should not treat any of the website's content as such. Do conduct your own due diligence and always do your own research before investing. If you like our content, show us some love, upvote, resteeem it and join our Telegram Discussion or the Main CryptoMedics Channel.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  trending

Coins mentioned in post:

CoinPrice (USD)📈 24h📈 7d