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

Add ability to re-attempt auto-funding swap if insufficient mature outputs #440

Open
Lederstrumpf opened this issue May 20, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@Lederstrumpf
Copy link
Member

When operating multiple swaps, failure to autofund is quite frequent when operating (far) more swaps in parallel than UTXOs available and mostly ephemeral due to

  1. Monero RPC: not enough unlocked money (E needed_money + min_fee > unlocked_balance_subtotal. THROW EXCEPTION: error::not_enough_unlocked_money)
  2. Bitcoin: too many descendants from unconfirmed UTXO (too-long-mempool-chain, too many descendants for tx ... [limit: 25])

We should have the ability to re-attempt autofund whenever the block height gets incremented, but we also should not introduce the risk that the auto-fund does eventually succeed, but the user has already funded manually too (in which case, the swap should cancel in Alice's case, or in Bob's case only lock the amount negotiated).

So if the autofunding fails, user should either explicitly request another attempt, or it should reattempt until user requests auto-funding information, and then autofunding stops.

@Lederstrumpf Lederstrumpf added the enhancement New feature or request label May 20, 2022
@Lederstrumpf Lederstrumpf self-assigned this May 20, 2022
@TheCharlatan
Copy link
Member

TheCharlatan commented Aug 31, 2022

This is done in #686 . @Lederstrumpf how do you wan to proceed here?

@Lederstrumpf
Copy link
Member Author

#686 addressed failure if monero daemon didn't respond in time.
The cases described in this issue are related to too few mature outputs. I've renamed it to make explicit.

As I described in #686, I'm on the fence whether or not we want auto-funding in this case (slightly leaning towards not). So I'm fine with both keeping it open or closing it.

@Lederstrumpf Lederstrumpf changed the title Add ability to re-attempt auto-funding swap if it failed Add ability to re-attempt auto-funding swap if insufficient mature outputs Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants