decredcommunity / issues

Decred community issue tracker
5 stars 0 forks source link

UI for atomicswap #8

Open xaur opened 5 years ago

xaur commented 5 years ago

Improve the UX significantly so more people start swapping.

devwarrior777 commented 5 years ago

Am doing a simple PoC Qt UI now but with my own swap code - not decred's. Even simple is not simple for this sequencing between two remote players. Anyone wish to collaborate on that and later decred UI .. we can talk offline.

devwarrior777 commented 5 years ago

The start of a gui swap sequence between LTC & XZC on testnet.

https://streamable.com/tuabd

2019_02_07_short_mp4.zip

xaur commented 5 years ago

YouTube link would be useful for spreading, in case you are looking for that.

devwarrior777 commented 5 years ago

The above is a PoC and shows the kind of UI that could drive a sequencing application for Decred atomic swaps code .. taking it forward in terms of UX for a "normal technically aware user" as requested in the title.

As a PoC it works just fine and I have done several swaps .. mostly between LTC and XZC although the concept would work for any coin which has an electrum wallet and associated electrumX server(s) ... which decred has not

Re: Youtube .. The PoC above is currently a project which I am not sharing so the screen recording is just a way to communicate with you guys as to what is possible ;-)

devwarrior777 commented 5 years ago

A swap I did today:

Contract addresses: https://testexplorer.zcoin.io/address/2Ev5zBfM6Y41jGLRHMNsSwGxq14qhTjT7eU https://chain.so/address/LTCTEST/QTtJsTypw3W8bFu1LoHB1qAuRR7d8Wwctc

Cheers!

devwarrior777 commented 5 years ago

"... so more people start swapping."

I hope that you guys are fully aware that for just 1 (one) trading pair (say BTC<->DCR) each side needs to set up & run a full node for each coin. Bitcoin is 200 gigabytes . Decred significantly less but growing.

https://www.statista.com/statistics/647523/worldwide-bitcoin-blockchain-size/

So I would like you to expand on what the preliminary statement in this thread means for you.

xaur commented 5 years ago

The requirement to run full BTC and DCR nodes and 200 GB storage is there regardless of whether you have a nice UI or not.

I think having a nice UI will facilitate more swaps than through arcane CLI commands. iirc the path to install and run Bitcoin Core is not too hard, and same can be done for dcrd.

Next step would be to explore atomic swaps with client-side SPV modes, first for DCR and then also for BTC (there might be some BTC nodes serving filters already).

devwarrior777 commented 5 years ago

Thanks for your reply.

As long as the interest is there I can continue towards a GUI sequencer based on my clone of the deCRED atomicswap code .. the native repo code remains arcane for now ;-)

The only fully safe way is full nodes But I do have another project which works with electrum wallets. This is fairly well supported by a handful of older coins.

Unfortunately deCRED does have an electrumX SPV server but does not have electrum-dcr client support so cannot be a candidate for that design path at this time. (Currently I GUI swap BTC/LTC/XZC with the SPV method)

In addition the differences between deCRED and normal btc clones such as litecoin, dash, etc. makes electrum-dcr client significant effort. Headers, and transaction structures need to change +++

Native deCRED-style SPV is only done by deCRED at this time afaik so may be a future candidate for other designs but way out of scope for me.

For my current full-node GUI sequencer project I am developing with LTC and XZC swaps first and could later add DCR to this. LTC seems to have almost as much liquidity as BTC for this purpose.

xaur commented 5 years ago

My personal interest is always there, but can't speak for others. Currently decred-issues serves as a barebones place to collect ideas and coordinate work, but it does not provide a layer to gauge user/stakeholder interest or to provide funding. Typical workflow now is you make an issue and pitch it in relevant places (e.g. #dex room). Interested parties will gradually join the issue discussion or subscribe for updates.

If the DEX proposal passes and if you come up with a nice UI for the swap sequence, it would be reasonable to suggest that UI (or parts of it) to the DEX project so duplication of some work can be avoided. If successful, I would even request a bit of funding for the UI work. That's all future but sounds interesting, hence I'm throwing out ideas.

Native deCRED-style SPV is only done by deCRED at this time

It is based on compact client-side filters which were first suggested for Bitcoin in June 2017. iirc this is called BIP-157 and BIP-158. Looking at the dates, the software must exist for Bitcoin and I'm sure there are a few nodes serving those filters. BCH implemented them too in their fork of btcsuite and encourage operators to run more nodes that support these filters.

Regardless of other coins, I think it is possible to implement atomic swap software that uses any combination of client modes for each side of the trade, e.g. use Decred SPV for Decred side and Bitcoin full node for Bitcoin side. Or full node for DCR and Electrum for BTC. The only concern here (besides the obvious effort to implement) is I would recommend against swaps where sides have different security models, and in all cases against Electrum.

xaur commented 5 years ago

https://twitter.com/rnr_0/status/1101154316121968641

Just "finished" my Atomic Swap Tool (based on Decred)
(Normally if you want to swap BTC<>LTC both parties needed an ltc&btc full node)
Differences here is my version does not require a full node!
Also comes with a webinterface and API (so others can build a real wallet on top)

xaur commented 5 years ago

Not sure if there's anything to reuse from here, but just in case: https://github.com/romanornr/AtomicOTCswap