Bitcoin Forum
May 08, 2024, 09:36:59 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Atomic Swap - is it a best way to exchange cryptocurrencies?  (Read 178 times)
nick_bogdan (OP)
Member
**
Offline Offline

Activity: 80
Merit: 11


View Profile
May 21, 2018, 02:14:47 PM
 #1

In brief, this technology uses  HLTC, which is the combination  of two different technologies, hashlock and timelock. Hashlock contains a cryptographic task (something like a secret password), which guarantees that any part cannot send its funds unless another part has done so. The timelock acts as a protection in case if within a certain time one of the participants canceled the transaction or did not fulfill the contract conditions within a certain period of time.

So, in our situation, the atomic swap acts as the arbitration of the cryptocurrencies exchange transaction. An important condition is a limited time - all participants confirm their participation within certain deadlines. Otherwise, one of the terms of the exchange will be violated and the transaction will be canceled.

Let's say you decided to exchange your BTC for LTC of Anna Smith.

You open a payment channel in the  Bitcoin, while Anna Smith opens a similar payment channel in LiteCoin blockchain. After that, you need to create and specify a contract using a swap. The contract contains all the necessary information, the number of coins, wallet addresses, information about payment channels, etc.

You generate data that you sent 1 BTC to the Bitcoin-wallet of Anna Smith. However, this data contains information that as long as the number of Litecoins specified in the contract is not received on the light-coin wallet, your BTC will not be sent to Anna Smith. Similar data are specified by  Anna Smith.

Therefore, the arbitrator of the transaction is the blockchain itself, which does not allow the participants of the transaction to deceive each other. If one of the terms of the contract is not fulfilled, the transaction is simply not executed and the coins remain in the owners' hands. This allows you to ignore centralized exchanges and make transactions directly between users, which opens the possibility of creating a decentralized exchange that will not have access to the funds of users - but only to help them find each other.
1715204219
Hero Member
*
Offline Offline

Posts: 1715204219

View Profile Personal Message (Offline)

Ignore
1715204219
Reply with quote  #2

1715204219
Report to moderator
1715204219
Hero Member
*
Offline Offline

Posts: 1715204219

View Profile Personal Message (Offline)

Ignore
1715204219
Reply with quote  #2

1715204219
Report to moderator
You get merit points when someone likes your post enough to give you some. And for every 2 merit points you receive, you can send 1 merit point to someone else!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3388
Merit: 6631


Just writing some code


View Profile WWW
May 21, 2018, 03:38:24 PM
Merited by ABCbits (1)
 #2

Not all coins can have HTLCs (they don't all have OP_CLTV) so this method does not work for some coins.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!