Subcategory:
Category:
Words:
442Pages:
2Views:
262Atomic Swap What is it Atomic swaps or atomic cross chain trading is the exchange of one cryptocurrency to another cryptocurrency without the need to trust a third party The atomic swap process is completely trustless by ensuring both parties fulfill the requirements of the trade defined in the contract If one fails to meet the requirements the time locked contract will refund the other user Let's explain an atomic swap with a classic example of Alice and Bob Alice owns one Komodo coin but really wants one Dash instead Normally Alice would have to trade her Komodo coin for an intermediary coin like Bitcoin to trade it further for one Dash If so she will lose some money because she has to trade twice It's incomprehensible that we are still paying such high fees to greedy exchanges With atomic swap technology available we will be able to trade on a peer to peer basis without the need of an exchange A time locked contract will be used to act as the escrow between Alice and Bob Alice puts in here one Komodo coin and Bob has to send his Dash to the contract The contract will take care of the swap so Alice becomes the owner of one Dash and Bob of one Komodo coin Tech details on Atomic Swap
As mentioned before an atomic swap uses a hash time locked contract This contract basically sets up a payment channel between two blockchains But not every blockchain supports payment channels To support this a blockchain needs to implement the Lightning Network It is a solution which allows to open and close payment channels who execute off chain transactions After a certain amount of time the channel will be closed and the end balances will be submitted to both blockchains In addition we are talking about hash time locked contracts A hash can be defined as a fingerprint of a piece of data by performing mathematical functions But in order to create such hash contract between blockchains both blockchains have to support the same cryptographic hash function such as SHA 256 A hash time locked contract is set up by the person who will be making the initial payment This person has to provide a specific hash which represents the amount of money that will be paid To receive the payment the recipient will have to create a cryptographic proof of payment within the specified amount of time If the recipient meets the deadline the swap will be executed Otherwise the initializer of the contract will be refunded Why do we need atomic swap technology Currently you trust centralized exchanges like Bittrex or Poloniex to trade your coins your money If something happens with an exchange there is no way to recover your coins because you cannot prove what amounts you owned Centralized exchanges are more vulnerable hacks inefficiencies manipulation and even human error can result in financial loss Atomic swap cuts out the need for an exchange completely In addition fees are reduced to zero