Pages:
Author

Topic: Atomic swap? Objection: I don't think it means decentralized coin exchange. (Read 2095 times)

full member
Activity: 173
Merit: 105
We are hearing a lot about atomic swap (= cross chain transaction processing), specially in the past few weeks.

From a theoretical point of view, I can confirm it is a good start for solving the most important problem in the crypto world nowadays: the need for a decentralized exchange, but I doubt it can be considered a solution or we are close enough.

My biggest concern is scalability, obviously, but there is other challenges as well. I was just wondering if anybody has been studying the subject before and can share her/his ideas with me?

Actually I have been through a very bad experience with a centralized exchange (Bittrex) lately and it has escalated my old anti-centralization sensitivities and allergies about exchanges  Wink.

So, I'm here now, determined to participate more actively (by means of coding, investing, whatever) in shutting the doors of these scammy businesses (bittrex, poloniex, ..., f*ex ) forever and I have a couple of lines of codes,  some coins and a few ideas to share.  Smiley





After some years of work on this topic, a commercial solution has been developed and is available: https://sibex.io

newbie
Activity: 7
Merit: 3
A lot of the issues discussed in topic are simply not relevant. Needing a full node on each blockchain to do a swap is just not necessary.

There is already a team working on cross-chain atomic swaps and has a working MVP on testnet.

You can swap using Ledger and MetaMask

https://blog.liquality.io/10-years-later-enter-liquality/
legendary
Activity: 1456
Merit: 1175
Always remember the cause!
Just saw this:
http://www.fujitsu.com/global/about/resources/news/press-releases/2017/1115-01.html

Seems everybody is interested in swapping cryptos and corporates are no exception, but they are trying to do their traditional take over game.

I don't believe them to understand what the story is about decentralization, they just wanna 'take it over' no matter what Grin
 
legendary
Activity: 1456
Merit: 1175
Always remember the cause!
I understand why you emphasis on 'important cryptos', it is to eliminate scalability problem, but I don't get why you suggest this kind of 'pruning' for pegged currencies only and you don't go general.

I think here you misunderstood me - I mentioned pegged currencies only because of their possible function as a "gateway" to cryptocurrencies in general.

Quote
I mean it can be considered a kind of a solution to have crypto blockchains being somewhat clustered and for an arbitrary pair of cryptos to be exchanged both parties should find the shortest path between them and navigate by means of multiple swaps.

Here I see a problem: you would have to run several clients/wallets on your device (or one wallet-client supporting multiple chains) and if you are not using a "multiple full node" (that would consume lots of resources) then with every chain you "touch" while swapping the risk of attacks increases, and also you would have to pay transaction fees for every intermediate transaction. Via Lightning such a "swap path" may be possible off-chain, but here I really don't know the details and possible vulnerabilities.

Anyway, I think this "cluster" approach is what Blocknet and Supernet are trying to achieve, but their approach is still in alpha.

Unfortunately, I'm not familiar with Blocknet or supernet (will check soon, thanks for mentioning bytheway Smiley ) but it is good news IMO, someone has considered clustering as a solution.

On the other hand, the 'touching risks and costs' you point out, are real but encompass less critical challenges compared to scalability. Once you encounter a performance bottleneck caused by the system or protocol architecture, you have nothing to do other than throwing away the whole project but with transaction costs and security risks you have improvement chances.
legendary
Activity: 3906
Merit: 6249
Decentralization Maximalist
I understand why you emphasis on 'important cryptos', it is to eliminate scalability problem, but I don't get why you suggest this kind of 'pruning' for pegged currencies only and you don't go general.

I think here you misunderstood me - I mentioned pegged currencies only because of their possible function as a "gateway" to cryptocurrencies in general.

Quote
I mean it can be considered a kind of a solution to have crypto blockchains being somewhat clustered and for an arbitrary pair of cryptos to be exchanged both parties should find the shortest path between them and navigate by means of multiple swaps.

Here I see a problem: you would have to run several clients/wallets on your device (or one wallet-client supporting multiple chains) and if you are not using a "multiple full node" (that would consume lots of resources) then with every chain you "touch" while swapping the risk of attacks increases, and also you would have to pay transaction fees for every intermediate transaction. Via Lightning such a "swap path" may be possible off-chain, but here I really don't know the details and possible vulnerabilities.

Anyway, I think this "cluster" approach is what Blocknet and Supernet are trying to achieve, but their approach is still in alpha.
legendary
Activity: 1456
Merit: 1175
Always remember the cause!
Anyway, done is done and most of the coins do not support AT inherently (actually a majority of coins even do not support CLTV, bitcoin before 0.11 for instance) but does it make cryptocurrency exchange world better if they would?
I think yes, because the cryptocurrency movement is "all about decentralization". Exchanges are the most annoying single point of failure.
There are obviously trading methods and strategies (high frequency trading, stop orders etc.) that could never be sa replicated in a decentralized manner in a satisfying way, but for the day-to-day exchanges a normal user does, it would be very useful.

If fiat-pegged coins like BitUSD become more common and allow atomic swaps to Bitcoin and other important cryptos, even "entering the cryptocurrency ecosystem" could be easier, because the whole work of "finding a price" would not be necessary anymore in the moment you buy your first cryptocurrency.

Atomic swaps between cryptos and pegged currencies is a very good idea but the hypothetical wallet capable of supporting the protocol will be suffered from the same scalability problems discussed earlier and wont help with the trust issues with the pegged currency, at least as a direct consequence.

I understand why you emphasis on 'important cryptos', it is to eliminate scalability problem, but I don't get why you suggest this kind of 'pruning' for pegged currencies only and you don't go general. I mean it can be considered a kind of a solution to have crypto blockchains being somewhat clustered and for an arbitrary pair of cryptos to be exchanged both parties should find the shortest path between them and navigate by means of multiple swaps.

I am seriously falling in love with this idea: crypto coin blockchains being clustered!

- Every coin to be present in swap operations have to support at least one cluster.
- A cluster consists of 2 or more coins that their full nodes are capable of verifying transactions on all the member chains and participate in Atomic Swap
   transactions.
- A cluster is matured when it has at least one member coin (blockchain) that is a member of another matured cluster.

Obviously this topology resembles a connected multigraph and can be studied in details mathematically but more importantly, here we have overcome scalability challenge by eliminating the need for every node in every coin to be capable of verifying every arbitrary other blockchain (eventually as a full node).

Now the new challenge comes around:
For Bob and Alice to exchange their coins after finding a path between the respected chains, in the current state of the art, both parties should have wallets and (possibly) deposits on all the intermediate coins in addition to their owned ones. It is not what they want at all.

I have proposals for this but for the moment I prefer to check with you guys whether I'm in a good direction right now. Huh
member
Activity: 70
Merit: 10
We are hearing a lot about atomic swap (= cross chain transaction processing), specially in the past few weeks.

From a theoretical point of view, I can confirm it is a good start for solving the most important problem in the crypto world nowadays: the need for a decentralized exchange, but I doubt it can be considered a solution or we are close enough.

My biggest concern is scalability, obviously, but there is other challenges as well. I was just wondering if anybody has been studying the subject before and can share her/his ideas with me?

Actually I have been through a very bad experience with a centralized exchange (Bittrex) lately and it has escalated my old anti-centralization sensitivities and allergies about exchanges  Wink.

So, I'm here now, determined to participate more actively (by means of coding, investing, whatever) in shutting the doors of these scammy businesses (bittrex, poloniex, ..., f*ex ) forever and I have a couple of lines of codes,  some coins and a few ideas to share.  Smiley





I saw an interview holding by jimmy song, he discussed with Ltd creator who also think we are at early stage of using this tech on decentralized exchange, probably we need a centralized engine to matching traction pairs first.

Btw you can check 0x also.
legendary
Activity: 1456
Merit: 1175
Always remember the cause!
Anyway, done is done and most of the coins do not support AT inherently (actually a majority of coins even do not support CLTV, bitcoin before 0.11 for instance) but does it make cryptocurrency exchange world better if they would?
I think yes, because the cryptocurrency movement is "all about decentralization". Exchanges are the most annoying single point of failure.
There are obviously trading methods and strategies (high frequency trading, stop orders etc.) that could never be sa replicated in a decentralized manner in a satisfying way, but for the day-to-day exchanges a normal user does, it would be very useful.

If fiat-pegged coins like BitUSD become more common and allow atomic swaps to Bitcoin and other important cryptos, even "entering the cryptocurrency ecosystem" could be easier, because the whole work of "finding a price" would not be necessary anymore in the moment you buy your first cryptocurrency.

Atomic swaps between cryptos and pegged currencies is a very good idea but the hypothetical wallet capable of supporting the protocol will be suffered from the same scalability problems discussed earlier and wont help with the trust issues with the pegged currency, at least as a direct consequence.

I understand why you emphasis on 'important cryptos', it is to eliminate scalability problem, but I don't get why you suggest this kind of 'pruning' for pegged currencies only and you don't go general. I mean it can be considered a kind of a solution to have crypto blockchains being somewhat clustered and for an arbitrary pair of cryptos to be exchanged both parties should find the shortest path between them and navigate by means of multiple swaps.
newbie
Activity: 28
Merit: 0
We are hearing a lot about atomic swap (= cross chain transaction processing), specially in the past few weeks.

From a theoretical point of view, I can confirm it is a good start for solving the most important problem in the crypto world nowadays: the need for a decentralized exchange, but I doubt it can be considered a solution or we are close enough.

My biggest concern is scalability, obviously, but there is other challenges as well. I was just wondering if anybody has been studying the subject before and can share her/his ideas with me?

Actually I have been through a very bad experience with a centralized exchange (Bittrex) lately and it has escalated my old anti-centralization sensitivities and allergies about exchanges  Wink.

So, I'm here now, determined to participate more actively (by means of coding, investing, whatever) in shutting the doors of these scammy businesses (bittrex, poloniex, ..., f*ex ) forever and I have a couple of lines of codes,  some coins and a few ideas to share.  Smiley




not bad for a fresh start in a forum, but on the contrary you are complicating a trivial concept to the point of over-complication IMO.
You are just suggesting it (a payment channel in LN terminology) is not a 'buffer' because it has an expiration date, right? But I think buffers can have a auto-flush feature triggered by a clock (block height in a chain, for instance) and they are still nothing more than a buffer.
jr. member
Activity: 37
Merit: 1
thats just the way they marketing their coin have a new technology. Not for updating, because nearly no one use coin for it's real purpose.  Shocked
legendary
Activity: 3906
Merit: 6249
Decentralization Maximalist
Anyway, done is done and most of the coins do not support AT inherently (actually a majority of coins even do not support CLTV, bitcoin before 0.11 for instance) but does it make cryptocurrency exchange world better if they would?
I think yes, because the cryptocurrency movement is "all about decentralization". Exchanges are the most annoying single point of failure.

There are obviously trading methods and strategies (high frequency trading, stop orders etc.) that could never be sa replicated in a decentralized manner in a satisfying way, but for the day-to-day exchanges a normal user does, it would be very useful.

If fiat-pegged coins like BitUSD become more common and allow atomic swaps to Bitcoin and other important cryptos, even "entering the cryptocurrency ecosystem" could be easier, because the whole work of "finding a price" would not be necessary anymore in the moment you buy your first cryptocurrency.
legendary
Activity: 1456
Merit: 1175
Always remember the cause!
What a shame. All the credit should go where its due. But why did the Burst and Qora developers not try to develop it for NXT which was the most popular Java based platform at the time it was invented? I believe NEM is also written in Java.
As far as I remember, the AT mechanism (the base for the Burst/Qora atomic swap technique) was indeed discussed to be added to NXT, but the NXT team decided to not include it because of possible dangers of turing-complete smart contracts. I think they could have added atomic swaps in a "hard-coded" way, but - for whatever reason - they didn't. That's one of the problems with those "centrally-developed coins" - if the "official" development team doesn't like an improvement, it won't happen.
....

This is what makes me nervous about the whole 'core developer' idea ... actually I prefer to go through capitalism slavery rather than intellectual dictatorship  Grin

Anyway, done is done and most of the coins do not support AT inherently (actually a majority of coins even do not support CLTV, bitcoin before 0.11 for instance) but does it make cryptocurrency exchange world better if they would?

I appreciate guys discussing here and I found most of the posts very useful, Although I think we can go forward and ask whether implementing a full protocol in bitcoin and top altcoins to support atomic swap is a breakthrough in decentralized exchange development field?

It may look a trivial question with a big YES answer but I don't think so.



legendary
Activity: 3906
Merit: 6249
Decentralization Maximalist
What a shame. All the credit should go where its due. But why did the Burst and Qora developers not try to develop it for NXT which was the most popular Java based platform at the time it was invented? I believe NEM is also written in Java.
As far as I remember, the AT mechanism (the base for the Burst/Qora atomic swap technique) was indeed discussed to be added to NXT, but the NXT team decided to not include it because of possible dangers of turing-complete smart contracts. I think they could have added atomic swaps in a "hard-coded" way, but - for whatever reason - they didn't. That's one of the problems with those "centrally-developed coins" - if the "official" development team doesn't like an improvement, it won't happen.

@687_2, DooMAD: I think the danger of an adversarial fork is mostly present when you trade small cryptocurrencies. In this case, a hostile attack is more likely because the adversary could control tools like blockchain explorers (e.g. bribing them) to support the "attack version" of the blockchain. This, however, even then would need a lot of preparation, and I don't think it would be profitable for <100USD trades. So I tend to agree with DooMAD here.

A problem could arise if people ignore the risk completely and rely on SPV/heavily pruned blockchains for big or multiple trades, because one adversary could for example offer an attractive price trying to lure many traders into his "trap". The risk could be similar to the acceptance of low-confirmation payments.
legendary
Activity: 2898
Merit: 1823

I did not know that atomic transfers were already invented two years ago. Thanks for sharing.

Which coins were used to do the transfers and why is the technology not widely used today? This is a breakthrough and no one is giving it any attention or giving the developer any recognition.
The coins that already can be used for atomic swaps are Burst and Qora. At least the Qora client has even a GUI option for that (see this article).

The reason I think it is not widely used is that both coins share a relatively similar codebase (they are Java coins inspired by NXT and use a smart contract platform called "Automated Transactions" for the atomic swap implementation) that is pretty different from the standard "Bitcoin clones" and Bitcoin/Script coins need an alternative implementation. Burst and Qora never were among the "top altcoins".

I think also the creator CIYAM deserves more credits for his breakthrough implementation. His solution is based on a concept invented by Sergio Demian Lerner and improved by Tier Nolan but it's the only implementation I know that is usable by non-technical users.

What a shame. All the credit should go where its due. But why did the Burst and Qora developers not try to develop it for NXT which was the most popular Java based platform at the time it was invented? I believe NEM is also written in Java.

They could have developed a symbiotic system in between each platform that could have aided all of them gain adoption.
newbie
Activity: 6
Merit: 0
Atomic swaps have happened for quite a while actually. I am part of the testing team at Komodo Platform, where we have been actively swapping around 80 coins for a couple of months now. They have built a decentralized exchange, including decentralized orderbooks, decentralized order matching, etc. An easy to use GUI is in BETA now.

Some articles that probably explain it better than me:
https://blog.komodoplatform.com/everything-you-need-to-know-about-atomic-swaps-and-how-komodo-is-advancing-the-technology-cadaec50da7c
The topic where the current swap protocol is explained and 'invented': https://bitcointalksearch.org/topic/acct-using-cltv-more-effective-than-a-sleeping-pill-1340621
And the whitepaper covering all the details about the decentralized exchange BarterDEX: https://github.com/SuperNETorg/komodo/wiki/barterDEX-Whitepaper-v2

Thanks for pointing me to that software, will try to test it. A question arises: Would it be possible to use SPV wallets like Electrum for atomic swaps? If yes, then the storage problem would be solved ... Another idea for mass adoption could be if "hybrid semi-centralized" wallets like blockchain.info included an atomic swap feature, as they could manage "chain handling" for end users.

Quote
Merchants that want to accept multiple cryptocurrencies and convert them into Bitcoin for e.g. paying taxes in Bitcoin will probably have fairly significant disk storage requirements.
If SPV wallets are not possible, Bitcoin 0.11+ style pruning could be the solution for that - a merchant then could easily accept up to about 100 currencies with ~1GB storage use for every chain.

Swaps between two Electrum nodes have been successfully done for a couple of weeks now, too.
legendary
Activity: 3948
Merit: 3191
Leave no FUD unchallenged
You'd probably only be able to trade with other people who have the same pruning settings on their chains, but this is just a wild guess.
Interesting, but I "don't get it" for now.  Could you clarify why you think the pruning settings should be similar or give me a hint where I could research?

If you prune to 550 and your trading partner prunes to 950, then she has a 400 block informational advantage over you. If she is able to introduce a serious network disruption (perhaps a hardfork attempt involving a lot of hashpower!?) during the trade she might be able to take your coins while giving nothing in return.

I would personally want to make sure that I'm not risking anything if some kind of serious instability arises, especially when trading larger amounts. So in many cases that means no pruning at all.

If you and your trading partner were the only two participants on the chain you were transacting upon, then it might be an issue, but if every other participant on that network has a copy of the blockchain, the person attempting to introduce the disruption or fork would only succeed in forking themselves off the network, so that attack vector wouldn't work.  It would take a significant proportion of network participants to be colluding in the act (basically what tends to be referred to as a 51% attack) to mess with your transaction in such a manner.  Otherwise no one could rely on SPV, where you don't keep a copy of the blockchain at all.
full member
Activity: 173
Merit: 105
I think not, because you are dealing with a complete stranger- perhaps an adversary. So you must validate for yourself that you have e.g. 1 confirmation and you really can't trust any external party for that information. There is also the question of adversarial forks, so this would be the only way to guarantee you are running on the chain you think you are, and that your trading partner is not trying to use a slightly different chain. But I'm sure these services will be made available anyway, and people will use them without thinking about it  Grin

So I interpret that it would be "possible" but potentially insecure. Well, for small amounts of less than (let's say) ~$100 (I think those make up the majority of altcoin trades) it would be a relatively "doable" solution if a swap-capable client checks various block explorers of different origin if the confirmations have happened.

Yes I think just like some merchants accept zero confirmations for coffee purchases, people can create XCAT systems that allow the user to take greater risks. But in XCAT systems your trading partner is likely an adversary..the relationship is the opposite of doing business with Bitcoiners in person, where we are excited to meet and do business with each other.

You'd probably only be able to trade with other people who have the same pruning settings on their chains, but this is just a wild guess.
Interesting, but I "don't get it" for now.  Could you clarify why you think the pruning settings should be similar or give me a hint where I could research?

If you prune to 550 and your trading partner prunes to 950, then she has a 400 block informational advantage over you. If she is able to introduce a serious network disruption (perhaps a hardfork attempt involving a lot of hashpower!?) during the trade she might be able to take your coins while giving nothing in return.

I would personally want to make sure that I'm not risking anything if some kind of serious instability arises, especially when trading larger amounts. So in many cases that means no pruning at all.
legendary
Activity: 3906
Merit: 6249
Decentralization Maximalist
I think not, because you are dealing with a complete stranger- perhaps an adversary. So you must validate for yourself that you have e.g. 1 confirmation and you really can't trust any external party for that information. There is also the question of adversarial forks, so this would be the only way to guarantee you are running on the chain you think you are, and that your trading partner is not trying to use a slightly different chain. But I'm sure these services will be made available anyway, and people will use them without thinking about it  Grin

So I interpret that it would be "possible" but potentially insecure. Well, for small amounts of less than (let's say) ~$100 (I think those make up the majority of altcoin trades) it would be a relatively "doable" solution if a swap-capable client checks various block explorers of different origin if the confirmations have happened.

You'd probably only be able to trade with other people who have the same pruning settings on their chains, but this is just a wild guess.
Interesting, but I "don't get it" for now.  Could you clarify why you think the pruning settings should be similar or give me a hint where I could research?

I did not know that atomic transfers were already invented two years ago. Thanks for sharing.

Which coins were used to do the transfers and why is the technology not widely used today? This is a breakthrough and no one is giving it any attention or giving the developer any recognition.
The coins that already can be used for atomic swaps are Burst and Qora. At least the Qora client has even a GUI option for that (see this article).

The reason I think it is not widely used is that both coins share a relatively similar codebase (they are Java coins inspired by NXT and use a smart contract platform called "Automated Transactions" for the atomic swap implementation) that is pretty different from the standard "Bitcoin clones" and Bitcoin/Script coins need an alternative implementation. Burst and Qora never were among the "top altcoins".

I think also the creator CIYAM deserves more credits for his breakthrough implementation. His solution is based on a concept invented by Sergio Demian Lerner and improved by Tier Nolan but it's the only implementation I know that is usable by non-technical users.
legendary
Activity: 2898
Merit: 1823
I am also very interested in the topic and eager to get informations about actual "real" tests that are going on. According to this Spanish article there were tests with Bitcoin, Zcash, Litecoin, Decred, ARK and Vertcoin, some weeks ago.

The traditional atomic swap model supposes one multisig transaction per chain. That obviously isn't enough for high frequency trading but would enable the typical use case of a trader that wants to "ride" bullish and bearish cycles of distinct coins. For higher frequencies, one could use LN, or maybe even a specialized pegged sidechain in the future (RSK?). For LN, however, I think it would be used mainly for small exchanges of less than 50-100 USD because of the slightly increased risk.

By the way: There is a atomic swap system that works for two years now used only by two small altcoins but supposedly could be adapted to Bitcoin-based coins. I have recently downloaded both blockchains to test it soon, if I am successful I'll report results here.


I did not know that atomic transfers were already invented two years ago. Thanks for sharing.

Which coins were used to do the transfers and why is the technology not widely used today? This is a breakthrough and no one is giving it any attention or giving the developer any recognition.
legendary
Activity: 1456
Merit: 1175
Always remember the cause!
I agree with you that centralized exchanges have to go. Even though I never have had any problems with them, I still feel that they're undermining the essence of decentralization. How can a coin be truly decentralized when it can only be traded (at a large scale) one an exchange that is owned by a corporation.
Lucky you, not having problems with centralized exchanges, personally, I have been scammed by Bittrex a couple of weeks ago and just like thousands of other people, in the excuse of KYC or something (never been officially declared).

Quote
I was very pleased when I read up in the concept of atomic swaps but seemingly you don't. What are the downsides of atomic swaps that we won't be able to fix in the future?

Sure, atomic swap technology is gradually succeeding and we have news in this field almost on a daily basis. It is great, we need it, and there is no downside here to have a protocol to do some fascinating distributed ledger transaction processing, but, unlike some proponents of this technology, I'm not sure it can solve the decentralized exchange problem by its own even once it is available, full fledged and open source.

The main challenge (as I have mentioned before) is scalability, and it is a snow ball situation:

Atomic swap, if going to be used directly as an infrastructure to facilitate peer-to-peer coin exchange in the very first steps imposes large storage and hardware requirements to both peers. As @d5000 and @687-2 have discussed about in previous posts here. Now it is just for beginning. Suppose in some point we have overcome this challenge and got to run our nodes, supporting AS. Then what? It will escalate transactions and we will have more scalability problem to overcome and so on. So, obviously we have a limit here, solving the problem raises the scale of the problem and no one will be satisfied ever.

Another major concern is that Atomic swap is just an infrastructure, it can not be projected directly to the problem domain. Trade is a complicated socioeconomic behavior, one can not address it with a device. In the exchange case you need a marketplace, an order book, a matching rule, ...


Pages:
Jump to: