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

Adding "fund max" flag in flow of spending a selected on-chain UTXO to on-chain address. #2106

Closed
expatri0tic opened this issue Apr 3, 2024 · 1 comment

Comments

@expatri0tic
Copy link

expatri0tic commented Apr 3, 2024

Adding "fund max" flag in flow of spending a selected on-chain UTXO to on-chain address.

Not sure if this is an enhancement or feature.
Basically, sometimes I close channels and want to sweep those new UTXOs out of Zeus to an onchain wallet.
When I do this I've noticed a key feature is missing.
A "fund max" option.

There is a sweep option, but this has the negative side-effect of combining all the UTXOs in your wallet. One may want to leave one UTXO behind to help with any on-chain miner fees needed in the closing and opening of channels. Plus, there's always a privacy implication with wanton UTXO combining.

My suggestion is that the work flow be as follows:

  1. Hit send
  2. Input bitcoin on-chain address
  3. Select desired UTXO(s)
  4. Select desired miner fee (sat/vB)
  5. [New] Hit fundmax flag
  6. Send entire UTXO to address minus fees

This would prevent the failing of the tx when the chosen send amount doesn't adequately account for miner fees. But sans a visible estimated miner fee (based on api call and tx size) for user to do their own calculation, they're left to trial and error. And unless they go down in increments of one sat, they're bound to end up with a dust UTXO in Zeus after the UTXO is spent and the miner is paid.

I'm aware that Zeus isn't meant to be an onchain wallet primarily. However, it is the case that onchain txs are sometimes needed to be made, and if it's going to be possible to select individual UTXOs (which could have been hidden from us), then we might as well have the ability to easily spend the entire UTXO without creating dust.

Thank you.

Willing to pay anyone 25k sats if they get this merged into Zeus.

Relevant conversations about this:

  1. Simplify coin selection logic for app devs lightningnetwork/lnd#6949
  2. LND: ability to use full UTXO during channel open or on-chain payment #790
@kaloudis
Copy link
Contributor

Added in v0.9.1

@kaloudis kaloudis added this to the v0.9.1 milestone Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants