Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Atomic swap execution #1083

Closed
wants to merge 13 commits into from

Conversation

ben-abraham
Copy link
Contributor

Adds basic execution of atomic swaps directly into wallet.
Buy/Sell orders have been the most heavily tested so far.

image

…ed UI actions to switch to atomic swaps page.
…ently.

Removed almost all of create asset dialog contents.
Broke swap details out into a struct.
Added swap signing logic, somewhat tested.
Moved wallet.h functions from private to public for usage from another class. Related child functions were already public, so the more general parent functions should have been public before.
Needs UX on complete/error, but they function completely. Trades are untested so far, and likely full of bugs :)
Also a hard-coded fee offset which I don't love.
Fixed display of buy/sell order pricing in confirmation dialog.
Fixed error message display.
@ben-abraham ben-abraham changed the title [Feature] Atomic swaps [Feature] Atomic swap execution Jun 26, 2021
@HyperPeek
Copy link
Contributor

Looks technically good to me. I see no alternative to make SelectCoins and SelectAssets public in wallet.h, as we definitely do not want to merge all the swap functionality into the wallet code.
Will do more testing first.

@ben-abraham
Copy link
Contributor Author

Looks technically good to me. I see no alternative to make SelectCoins and SelectAssets public in wallet.h, as we definitely do not want to merge all the swap functionality into the wallet code.
Will do more testing first.

The internal working functions inside of SelectCoins and SelectAssets are already public as-is, so its not too strange to make the primary SelectCoins/SelectAssets public themselves.

@hans-schmidt
Copy link
Contributor

-This is a very interesting technology and a nice bit of coding work.
-Unfortunately, after discussing in the RavenQt-SIG multiple times, there is agreement at this time that this functionality does not belong in raven-qt
-This code provides support for completing (executing) pre-existing 2-step on-chain SIGHASH_SINGLE|SIGHASH_ANYONECANPAY atomic swap half-transactions. But creating those half-transactions still requires a separate application (the python app raven-trader-pro at this time). Even if creation of such half-transactions was also to raven-qt, there is no messaging chat protocol support for the nodes to share the available offer information.
-All of this adds too much complexity to the node, which can easily be supported by an external application.
-Including this would also generate a lot of user confusion and support questions.
-The basic ideas are extremely powerful and useful, but needed to be standardized, completed, and supported by an external app.

-I am closing this PR at this time. It can be re-opened later if community consensus justifies doing so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants