What is atomic (atomic) swaps? Detailed description

Date:

2018-11-01 22:15:29

Views:

3558

Rating:

1Like 0Dislike

Share:

What is atomic (atomic) swaps? Detailed description Source:

An Atomic or atomic swap (atomic swaps) have the potential to completely change the system of transfer of money in kryptomere. Simply put, atomic swaps will allow people to directly trade with each other, from wallet to wallet.
Since 2012, the concept of trust with peer-to-peer cryptocurrency access remains a hot topic for discussion. In July 2012, a developer named Sergio Demian Lerner created the first outline of the Protocol trust-based exchange. The idea was great, but that's not worked as it was intended.

the

Atomic swaps: what is it?

The Breakthrough in the research of atomic swaps happened around may 2013 when shooting Nolan explained the procedure of the atomic swaps. Tyr Nolan, in fact, is considered the inventor of the atomic swaps.
In this guide we'll learn more about how to operate atomically swaps and what advantages of their introduction to the ecosystem.

the

the Problems of centralized exchanges and exchanges

Suppose Alice has a bitcoin and she wants to sell it for litecoin. Similarly, we have Bob who has litecoin, but who wants to get some bitcoins in return. Typically to implement such exchanges, they go to a centralized exchange, sell your crypt and buy a new crypt. But these exchanges have a bunch of problems.

#1. Vulnerability to hackers
Centralized exchangers often have vulnerabilities that can be used for hacking. Probably the most infamous example of such cases is hacking that hacked 550 million NEM. The worst part is that the hacking has significantly reduced the love of the cryptocurrency in Japan, but Japan is traditionally known for their good attitude to the crypt.

#2. Improper management
The infamous hacking of Mt. Gox, which took bitcoin to $ 500 million, was the result of poor management exchange CEO Karpeles max. As it spoke Andreas Antonopolous:
"Exchange Mt. Gox is a systemic risk to bitcoin, a death trap for traders and business under the control of the one who knows nothing about".

#3. The need for volumes
Exchanges can not cope with changes in demand, especially when there is a sharp increase in demand. Do you know why the price BCH has fallen by almost half on November 12? It turned out, was the growth of demand, the exchange failed to respond. Bithumb, in particular, was closed for 90 minutes and lost 60 000 BTC in volume.
the #4. The need for government regulations

As centralized exchanges are registered in individual countries, they are subject to the whims of the government. For these and other reasons, the centralized exchanges is not the best way to universal adoption.

the

What is atomic swaps?

The Atomic swap is a peer-to-peer exchange of cryptocurrency between two parties without the need to involve a third party like a crypto currency exchange. During this process, the users have full control over their own private keys.

September 20, 2017 Decred and Litecoin made the first known successful implementation of the atomic swaps.

Other interesting facts about the nuclear swap:

the
      They can be directly implemented between the individual blockchains with different native coins
      Or they can also be done through channels outside the chain and then transferred to the main blockchain
      the Atomic swap is also known as crosscanada trade

How to operate atomic swaps?

Let us imagine simpler. Two sides who are going to participate in the atomic swaps, make a decision about the shared secret. Both sides will exchange crypt only and only when their secrets are the same. So, if anyone else would interfere in this exchange, he will not be able to access the coins, because will not know their secret.
Well, the concept is clear to you. But how it actually works?

To implement the atomic swap is used so-called "hashed contracts with lock time" (Hashed Timelock Contract, or HTLC). If you are familiar with lightning network, you must know how to operate such contracts. Now we will tell about them.

What is hashed contracts with lock time?

HTLC is a form of payment channels. Payment channels is, in fact, the channels outside the main circuit who work with payments.

This channel is a two-way channel of communication between the parties and allows them to exercise outside of the blockchain the interactions that usually take place on the blockchain. This will reduce the time of the transaction because you will no longer depend on a third party like the miner who confirms your transaction.
What it takes to create such a channel?

the
      Segment of the blockchain is blocked by multishot (multi-signature) or smart contract, which is approved by participants.
      The participants interact with each other, signing the transaction, without referring to the miners.
      The entire set of transactions is then added to the blockchain.

Channels can be closed at any time specified by the participants. Closure can occur for the following reasons:

the
      time has Expired. That is, the participants may agree to keep the channel open and close it in two hours.
      Exceeded the volume of transactions. That is, we can agree that after the turnover of $ 100 the equivalent of a new channel.

HTLC is one of the most convenient applications of payment channels.

The First iteration of the payment channels used the "time blocking". HTLC also adds the lock for the hash, along with the time.

HTLC allowsto open the billing channels through which funds can be transferred between parties to a pre-agreed period. These payments are confirmed by providing cryptographic evidence. Along with this, another brilliant ability HTLC in that it allows the parties to refuse payment and return it to the payer. The idea is to use a transaction system with multiple signatures are to be delivered to exchange.

Look at the image above, taken from the Coin Central. Let's see what's going on.

the
      Alice has a little BTC, and Bob has a little LTC. They want to exchange coins.
      Together they open a payment channel. The initiator of the exchange (say, Alice) then generates the address of the contract.
      the contract Address is safe with several locks, which keeps the means and one and the second participant.
      Creating address, Alice puts your bitcoins and produces a value.
      This value acts as a key, since they made a hash acts as the lock on the safe.
      in Doing so, Alice sends the hash to Bob.
      Bob creates a contract address using a hash that is passed to Alice.
      Bob Then sends his LTC to the address of the contract.
      Alice gets the opportunity to unlock litecoin to this address because it has a value that generated a particular hash.
      Alice can obtain your LTC by signing the transaction contract, the address of Bob, and Bob can obtain your BTC by signing the transaction contract, Alice's address.
      But still Bob does not know the value that generates the hash. How exactly did he unlocks the address?
      When Alice signs the contract the address of Bob that value, it unlocks the address and disclose the value Bob.
      Bob, now knowing the value, sign the transaction for the address of Alice and gets his BTC.

Let's Summarize the process.
Alice creates a numeric value and generates a hash that is used to create a professional address and lays on him BTC. She then sends the hash to Bob. Bob generates contractual address with the hash and puts your LTC at him. To receive LTC, Alice must unlock address using its value. After getting their coins, the value of the key is transmitted to Bob. He then uses it to get your coins.

the

Atomic swaps on the blockchain, and blockchain out

The Atomic swap, as we said earlier, can be done on the blockchain and outside of the blockchain.
the Atomic swaps on the blockchain (on-chain atomic swaps)
Decred and Litecoin managed to implement the atomic swap on the blockchain. Such swap is performed directly on the blockchain of cryptocurrency. Both cryptocurrencies must:

the
      To support HTLC
      To have a single hashing algorithm

Atomic swaps outside of the blockchain

Vallakkadavu swaps, on the other hand, are the so-called "layer 2". The first nuclear swap out the blockchain was made between Bitcoin and Litecoin in November 2017 on the Bitcoin Network Lightning.

the

As different stock exchanges carry out atomic swaps

Different companies have different ways of implementing atomic swaps.

#1. Komodo

Komodo is a decentralized exchange, and its contribution to the study of atomic swaps is almost impossible to overestimate. Let's go back in time. Just a year after Nolan introduced the idea of protocols, atomic swaps, a leading developer of Komodo jl777 wrote code that allowed the first swaps.
First, this code would only allow atomic swaps between the NXT asset exchange. Then jl777 updated the code so that you can exchange the NXT asset exchange with any coins of the bitcoin Protocol.
In the summer of 2017 Komodo has taken the next step towards the wide dissemination of atomic swaps. Was developed BarterDEX, the first user interface to a fully functioning atomic swaps cryptotrading. Komodo soon began to integrate dozens of coins with the bitcoin Protocol and publicly to make thousands of atomic swaps BarterDEX.
A month after the atomic swap Litecoin-Decred, Komodo came up with a method of implementing an atomic swap with Electrum servers.
Then, in February 2018, Komodo managed to combine Ethereum coins bitcoin Protocol and implement swap between ETH and DOGE. Thus, Komodo was the first blockchain-a project, which managed to realize this feat.
By March 2018 the technology of atomic swap Komodo supported transactions 95% of all coins and tokens. At the time of writing this article on BarterDEX, decentralized exchange, the Komodo, was conducted more than 110,000 atomic swaps.
the How does the Komodo
Suppose Bob has BTC and a few KMD (Komodo tokens) on the stock exchange. Alice, too, have KMD and she wants BTC. As will be atomic swap?
First, Bob places an order to trade on the platform Komodo.
Alice sees the offer and accepts it.
Then Alice pays a fee of 0.15% of the total amount of the transaction. Bob did not yet pay.
As soon as she pays the Commission, the beginning of a nuclear swap.
Bob then sends his Deposit to provide the address. No one has access to these funds until the time allotted for the transaction, or the transaction does not take place. The security Deposit shall be in the amount of 112% of the amount initially set the order.

Alice sends its tokens KND to another safe address. Like Bob, no one has access to it.
If the deal does not pass, the swap will be canceled. In this case, Bob will get his BTC back and Alice will get their KMD.
If you pass, Bob sends BTC to Alice and completes its part of the deal.
AfterAlice will accept the money to Bob, Bob will have the opportunity to receive payment of Alice in KMD.
Now the process is complete.

#2. Blockchain.io

The Blockchain.io implements atomic swaps, combining centralized and decentralized components. Their model aims to promote trade on trust.
The list of orders is centralized, to ensure high liquidity and offers the user a choice — whether to use atomic swaps for decentralized trade.
The coins must be traded will be locked in a special escrow agreements (escrow) of the smart contract then can be freely traded. Trades occur on the platform of the exchange. When the deal was implemented, coins can be displayed.

the

Advantages of atomic swaps

the
      the Interaction between different assets is a huge problem of crypto-currencies to date. Atomic swaps will have to combine all these different coins, to help them to interact with each other. Atomic swap makes the system "agnostic to the currency." Because people with different cryptocephalinae will be able to interact with each other, it is likely that people will be more open to diversify their savings, and not just dependent on a few coins.
      Atomic swaps open doors for trust and beskonechnyh decentralized exchanges.
      Central exchange are centralized and vulnerable to attack. Atomic swaps eliminate the need to have a third party and make trading as straight as possible.
      Aside from outside attack, centralized exchanges are also vulnerable to internal maintenance issues and corruption. Service wallets or disable output and I / o special problems.
      Atomic swaps will give you full control over your money.
      Direct trade from wallet to wallet is decentralisation in its purest form. The exchanges always amenable to adjustment from the outside, which makes the whole trading process more centralized.
      As atomic swap directly connects two of the purse between them, he removes all the steps and approvals needed for centralized exchanges. This is a quicker option.
      One of the best features the cross of the swap is removing the intermediate tokens. That is, if you have LTC and want to buy Decred on the usual stock exchange, you have to sell LTC for BTC and then buy more tokens Decred. Atomic swaps will allow the transaction at once.
      Exchanges usually charge higher fees, especially when you are trying to transfer coins to the wallet.
the

Limitations of atomic swaps

#1. Adoption
The first limitation of the atomic swaps in which they face in their current iteration, is that to implement atomic swap two cryptocurrency needs to meet three conditions.

the
      Cryptocurrency needs to have one hash algorithm
      Both cryptocurrencies should be able to activate the hashed contracts with lock-in time
      Required special software functionality

Now, these features significantly limit the number of cryptocurrencies which are actually unable to participate in such swaps. But that's not the worst.

This, unfortunately, also limits the number of companies and users that can experiment with them now. It will take some time before the General masses will switch to using these exciting technologies.
the #2. Speed

Yes, we really said "speed" as one of the benefits. But.
In its current iteration, the atomic swaps require many refinements and improvements before it becomes fast enough to handle huge amounts of data. In this region lightning network can significantly improve the atomic swaps.

#3. The lack of compatibility

And Yes, more wallets welcome the technology of the atomic swaps. But the fact remains: the total number of compatible wallets and exchanges is relatively small. Great support from a greater number of exchangers will inevitably lead to more widespread use and research.

the

Conclusion

The Lack of scalability and interoperability — two of the biggest problems of cryptomeria at the moment. With atomic swaps, we have the solution that can kill two birds with one stone. It is a technology that has serious potential to lead us to a new level of cryptotrading. Hopefully, it will not be forgotten.

Recommended

CRYPTOMACH / Maximum exchange rate of Bitcoin in the future, the output of the crypts on the map, Ycash and the Board of Finance

CRYPTOMACH / Maximum exchange rate of Bitcoin in the future, the output of the crypts on the map, Ycash and the Board of Finance

the long-awaited summer. Niche cryptocurrency supported the event and gave unusually hot week. During the last seven days, we learned about the new line of graphics cards from AMD, the mining in TON and hard forks . In addition dealt with the profita...

Co-owner Bitcoin.org Coinbase Pro ridiculed and called a stock exchange Scam

Co-owner Bitcoin.org Coinbase Pro ridiculed and called a stock exchange Scam

co-Owner Bitcoin.org and most popular forum about cryptocurrency Bitcointalk.org Cobra called Coinbase Scam Pro trading platform American crypto currency exchange Coinbase. In his tweet he wrote «if you read Coinbase Pro backwards, get the word ...

The Ethereum is a cryptocurrency Scam. A new report Chainalysis

The Ethereum is a cryptocurrency Scam. A new report Chainalysis

When people learned how to create a new cryptocurrency and began to build their infrastructure like marketplaces, in the field began to appear and fraud. According to blockchain auditor Chainalysis for the past two years, fraud in the ecosystem has s...

Comments (0)

This article has no comment, be the first!

Add comment

Related News

VEB and the Grozny mayor's office transferred the housing sector on the blockchain

VEB and the Grozny mayor's office transferred the housing sector on the blockchain

In February, the first Deputy Chairman of VTB Olga Dergunova positively the prospects of the blockchain. According to her, the technology will improve the speed of transactions and security standards. To move from words to action ...

Hacker 1337. How to hack Etherscan not to cause any harm

Hacker 1337. How to hack Etherscan not to cause any harm

Monday on the website Etherscan.io appeared a pop-up message with the numbers 1337. The visitors began to panic and spread rumors about hacking Explorer. really hacked, but the damage from a hacker attack was zero. About it writes...

Jamie Dimon: I don't care about your Bitcoin!

Jamie Dimon: I don't care about your Bitcoin!

Try to imagine an old mysterious house in which the ghosts of long-gone geniuses. In similar plots of the movies they always have some unfinished business in the Parallels of our world. Cryptosphere – a mysterious old house where ...

October for 2Miners: email notifications, upgrade your bot, a new minimum payments and improved soft

October for 2Miners: email notifications, upgrade your bot, a new minimum payments and improved soft

On the street in November, Halloween is over, disguised as teenagers in the hallways no longer ask to share the sweets and trifle. This means that it's time to sum up October . A month remember many nice updates: earned notice by ...

The results Devcon4: acne Buterin told about future changes in the Ethereum 2.0

The results Devcon4: acne Buterin told about future changes in the Ethereum 2.0

Yesterday acne Buterin told about the basic ideas behind Ethereum 2.0 update. He noted that he did not want to bother the audience Devcon4 unnecessary technical details of an upgrade. Instead, he focused on how the upcoming paragr...

What's the best thing to do in a bear market of cryptocurrencies? The Council of experts

What's the best thing to do in a bear market of cryptocurrencies? The Council of experts

Captainweston firms argue that during the bear market to invest in altcoins not as risky as Bitcoin. New Wave Capital told Yahoo that altcoins with small market capitalization incredible long-term potential. A startup from San Fra...

Bears are not a problem: Coinbase has earned more than a billion dollars since the beginning of 2018

Bears are not a problem: Coinbase has earned more than a billion dollars since the beginning of 2018

Tough times in the stock market do not interfere with the whales to earn a lot of money. Special benefit in this process receive a large exchange like Coinbase. According to Bloomberg, the main income of the American exchange rose...

Hang in there, acne: Ethereum is on the verge of a new drain

Hang in there, acne: Ethereum is on the verge of a new drain

the Market is in a very precarious position, draining the last of Bitcoin is not affected by the state of altcoins. Second in terms of capitalization, the cryptocurrency fell just below the psychologically important support line, ...

Purses problematic exchange WEX leaked 18 million dollars. Should you be afraid of?

Purses problematic exchange WEX leaked 18 million dollars. Should you be afraid of?

the world's Largest cryptocurrency exchange Binance froze the accounts to which transferred more than 93 thousand on purses, allegedly linked to the problem of Russian stock exchange WEX. The representative of the Binance Lea Lee ...

Here is a twist: the developer of the standard ERC-20 proposed to create a

Here is a twist: the developer of the standard ERC-20 proposed to create a "reversible ICO"

During his speech at the annual conference Devcon4 Fabian Vogelstein proposed standard «reversible » or RICO, which will allow investors to return their funds at any time. In particular, Vogelstein identified the issue o...

EToro CEO: in the near future will be the greatest transfer of wealth in world history

EToro CEO: in the near future will be the greatest transfer of wealth in world history

10 million users worldwide — a respectable figure, especially for a developing industry of cryptocurrency. Trading platform eToro known to almost every cryptomnesia and regularly mentioned in the media. EToro CEO Yoni Assia in an ...

See you in court: in Russia will create a special panel debate on smart contracts

See you in court: in Russia will create a special panel debate on smart contracts

New technology requires a new approach of the law. In anticipation of the transition to big business «digital business» the Arbitration centre at the RSPP will set up a special panel that will resolve disputes in the fie...

The Creator of the Oyster Protocol ran off with the money. The coin fell to 52 percent

The Creator of the Oyster Protocol ran off with the money. The coin fell to 52 percent

Oyster Protocol is a hybrid platform for smart contracts, developed on the basis of Ethereum blockchains and IOTA. Oyster allows creators of web sites to profit with traffic. Instead of traditional advertising, the site owner gets...

Use LocalBitcoins? Get 5 years in prison

Use LocalBitcoins? Get 5 years in prison

According to the press release of the Ministry of justice, the defendant in Federal court, pleaded guilty to carrying out exchange transactions without an appropriate license. Jacob Burrell Campos used LocalBitcoins.com not regist...

Again divorce: exchange MapleChange suspected of stealing users money

Again divorce: exchange MapleChange suspected of stealing users money

the Canadian crypto currency exchange left the industry. Representatives of the exchange said that all their funds were stolen after a hacker attack. Is it really so? Among the victims of traders and investors MapleChange are grow...

Ripple fell to the support level. Will there be growth?

Ripple fell to the support level. Will there be growth?

the Price of Ripple in the dollar and Bitcoin got a little rolled hem. Bullrun ended before it begins? Or is it just another whale wants to buy more cheap XRP? In any case, now at 44 cents cryptocurrencies have pretty strong suppo...

Kim Dotcom: the US dollar has already entered the death spiral, it is time to buy cryptocurrency

Kim Dotcom: the US dollar has already entered the death spiral, it is time to buy cryptocurrency

According to who was in the siege of the governments of New Zealand and the United States since the shutdown of Megaupload in 2012, the dollar is not to avoid collapse. This is due to the Federal debt of the United States. Interne...

The head of the CEC of Russia: the blockchain need branding

The head of the CEC of Russia: the blockchain need branding

Why is the blockchain can not take root in Russia? Seems that the head of the Central election Commission of the Russian Federation Ella Pamfilova knows the answer. In her opinion, the public must radically change their attitude t...

Expert: Bitcoin does not devour electricity

Expert: Bitcoin does not devour electricity

Now almost every news release blaming the Bitcoin in the consumption of all electricity in the world. Any expert on conspiracy theories quickly confirm that all of these stories are born and fed banking cartel. Such is done in ord...

Xapo CEO: a Bitcoin is like the Internet in 1992

Xapo CEO: a Bitcoin is like the Internet in 1992

the Founder of a startup Xapo Wences Casares believes that until the full spread of cryptocurrencies in the world for a very long time. In his opinion, kryptonyte now much like the Internet in 1992. The world Network has not yet b...