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

[1 XMR] Allow for cooperative release of funds #693

Closed
thomaseizinger opened this issue Aug 26, 2021 · 10 comments · Fixed by #1676
Closed

[1 XMR] Allow for cooperative release of funds #693

thomaseizinger opened this issue Aug 26, 2021 · 10 comments · Fixed by #1676
Assignees
Labels
Bounty 💰 The first person to fix this issue will be awarded a reward enhancement New feature or request has-mentoring This issue is has a detailed description on how to get started in contributing. Priority 1 This issue is top-priority at the moment

Comments

@thomaseizinger
Copy link
Contributor

The protocol allows for Alice to punish Bob by taking the BTC in case Bob never refunds. This can happen unintentionally as well. See #688 for example.

In that case, the two parties would have agreed to a cooperative release of funds. This should be possible to implement if we add:

  • A command to the asb to print the Monero secret share
  • A command to the cli to claim the Monero using the secret share
@thomaseizinger thomaseizinger added the enhancement New feature or request label Aug 26, 2021
@rishflab rishflab added the loss-of-funds Critical bug which can result in loss of funds label Aug 27, 2021
@rishflab rishflab added has-mentoring This issue is has a detailed description on how to get started in contributing. and removed loss-of-funds Critical bug which can result in loss of funds labels Sep 7, 2021
@binarybaron
Copy link
Collaborator

binarybaron commented Oct 14, 2023

I'd propose that we add a libp2p protocol over which Bob can connect to Alice after Bob has been punished to request Alice to reveal the Monero secret share. Bob can then use that secret to redeem the XMR. This behaviour would be invoked by a custom attempt-cooperative-redeem command of the CLI.

There should be no reason for Alice not to release it if we assume she's good-willed. This will essentially resolve the entire issue of users getting punished in practice (most sellers are not malicious. There's no incentive for them to be).

@binarybaron binarybaron changed the title Allow for cooperative release of funds [1 XMR] Allow for cooperative release of funds Oct 14, 2023
@binarybaron
Copy link
Collaborator

Some more discussion can found here: #713

@binarybaron
Copy link
Collaborator

We use bounties to incentivize development and reward contributors. All issues available for a bounty have the Bounty 💰 label.

To receive the bounty of this issue, you agree to these conditions:

  • Your changes must follow the styling guidelines.
  • Bounties will be set and awarded at discretion of @binarybaron .
    The issues eligible for a bounty are labelled 'Bounty 💰' and have the amount of the bounty specified in the title in this form: [1 XMR].
  • An issue is considered resolved when the patch(es) proposed by the contributor is/are merged in the appropriate repository according to terms of the issue.
  • The first person who resolves an issue in its entirety will receive the entire amount of the bounty.
  • If the issue is resolved collaboratively by more than one person, the reward will be distributed among the contributors
  • Let the Maintainers know if you intend to work on a bounty, so that the issue can be assigned to you. Being assigned to an issue doesn't make that issue resolvable only by the assignee. It's meant to avoid duplication of efforts and not to discourage collective works.
  • After the issue is resolved, contact @binarybaron and claim your bounty (remember to provide them with a Monero address).

@binarybaron binarybaron added the Bounty 💰 The first person to fix this issue will be awarded a reward label Oct 14, 2023
@delta1
Copy link
Collaborator

delta1 commented Oct 18, 2023

I'd propose that we add a libp2p protocol over which Bob can connect to Alice after Bob has been punished to request Alice to reveal the Monero secret share. Bob can then use that secret to redeem the XMR. This behaviour would be invoked by a custom attempt-cooperative-redeem command of the CLI.

There should be no reason for Alice not to release it if we assume she's good-willed. This will essentially resolve the entire issue of users getting punished in practice.

@delta1 What do you think?

Sounds good, I like it. Will try start on this next week.

@binarybaron
Copy link
Collaborator

I'd propose that we add a libp2p protocol over which Bob can connect to Alice after Bob has been punished to request Alice to reveal the Monero secret share. Bob can then use that secret to redeem the XMR. This behaviour would be invoked by a custom attempt-cooperative-redeem command of the CLI.

There should be no reason for Alice not to release it if we assume she's good-willed. This will essentially resolve the entire issue of users getting punished in practice.

@delta1 What do you think?

Sounds good, I like it. Will try start on this next week.

Awesome

@binarybaron
Copy link
Collaborator

I'd propose that we add a libp2p protocol over which Bob can connect to Alice after Bob has been punished to request Alice to reveal the Monero secret share. Bob can then use that secret to redeem the XMR. This behaviour would be invoked by a custom attempt-cooperative-redeem command of the CLI.

There should be no reason for Alice not to release it if we assume she's good-willed. This will essentially resolve the entire issue of users getting punished in practice.

@delta1 What do you think?

Sounds good, I like it. Will try start on this next week.

Any update? :(

@delta1
Copy link
Collaborator

delta1 commented Nov 30, 2023

sorry! no progress yet. will let you know as soon as I have an update.

@delta1 delta1 self-assigned this Nov 30, 2023
@binarybaron
Copy link
Collaborator

@binarybaron binarybaron pinned this issue May 24, 2024
@binarybaron binarybaron added the Priority 1 This issue is top-priority at the moment label May 25, 2024
@binarybaron binarybaron unpinned this issue Jun 1, 2024
@binarybaron
Copy link
Collaborator

I've begun work on https://github.com/comit-network/xmr-btc-swap/tree/cooperative-xmr-redeem Feel free to jump in

TODO:

  • Alice needs to respond with the secret key
  • Bob needs to receive the secret key
  • The CLI needs a command ´attempt-cooperative-release` that takes the swap id and attempts to retrieve the secret key from Alice. It then needs to redeem the Monero.
  • Optional: The CLI should Invoke the same logic describes above in the state machine, if we're in the BtcPunished state

@patrini32
Copy link
Contributor

patrini32 commented Jun 7, 2024

I've begun work on https://github.com/comit-network/xmr-btc-swap/tree/cooperative-xmr-redeem Feel free to jump in

I made a working PoC, going to create a PR tomorrow after reviewing the code. But it will most likely introduce breaking database changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bounty 💰 The first person to fix this issue will be awarded a reward enhancement New feature or request has-mentoring This issue is has a detailed description on how to get started in contributing. Priority 1 This issue is top-priority at the moment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants