UTXO consolidation #10295
Replies: 3 comments 1 reply
-
|
Hi @pranav-punjabi, I added a draft PR that adds the feature you are requesting, see #10296. |
Beta Was this translation helpful? Give feedback.
-
Afaik As suggested on Slack you could either create your own script that consolidates periodically according to your needs. If you get your users to send funds to a static loop address you could from time-to-time swap all the received on-chain outputs |
Beta Was this translation helpful? Give feedback.
-
|
@pranav-punjabi please mark the discussion as resolved if you think it is. Thank you. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a question regarding coin selection and fee estimation in LND.
suppose a merchant, receive payments in sats, which results in many small UTXOs spread across multiple addresses for example, several $100 UTXOs or similar-sized ones.
Here’s the issue I’m facing:
When I call EstimateFee with CoinSelectionStrategy = RANDOM, the node picks one random combination of UTXOs to estimate the fee.
A few seconds later, when I call SendCoins (also with CoinSelectionStrategy = RANDOM), it picks a different random set of UTXOs.
Because of this, the actual transaction size — and therefore the actual fee — can differ a lot from the estimated value.
So the fee estimation becomes unpredictable.
My question:
Would it be possible for the EstimateFee API response to include which UTXOs were used for the estimation (their outpoints), so that we can pass those exact UTXOs in the SendCoins request?
That way, we could eliminate this randomness and achieve predictable behavior between estimation and execution.
Additionally :
Do you have any suggestions or recommended practices for UTXO management in this scenario?
For example, does LND provide a built-in mechanism to consolidate UTXOs automatically when network fees are low or when the number of small UTXOs crosses a threshold?
Or How should we handle consolidation manually (e.g., using SendCoins to self-addresses during low-fee periods) or any other aproch which is best for us?
Beta Was this translation helpful? Give feedback.
All reactions