Do LN implementations make it a priority in their coin selection code, to open channels without change outputs? I guess not, but I was just thinking that channel opens are a unique opportunity for consolidation, because you usually don't care about exact amounts. While you can say, reasonably, "nah, we'd prefer to have the channel open pattern the same as the payment pattern for privacy/anon set", the economics of utxos is going to be vitally important long term, plus removing change from a payment breaks some heuristics. Even more interesting ofc is if you could negotation a 2x no-change coinjoined channel open.

#lightning

Reply to this note

Please Login to reply.

Discussion

Lnd's only coin selection algos is either selecting the largest utxos or random

THE YEAR IS 2025 AND WE STILL DO NOT HAVE MANUAL COIN SELECTION IN LND.

Would be nice! But even then wouldn't be enough, right, it's fiddly to handle the no-change case as a user unless the software does the nasty arithmetic for you (subtracting the fee). I mean you can do that calculation manually but the software has to be coded to expect it (getting change=0 after calc.ing fee-rate * tx weight, and ditching the second output), in which case, it should just automate it for you, i.e. a flag or button for "put all of my inputs minus fee into the channel"

WOULD BE GREAT IF A USER COULD SIMPLY PICK A UTXO AND SELECT “MAKE LARGEST CHANNEL POSSIBLE”

I think the api supports this now but idk if many apps expose it

I vaguely remember you can deselect any utxo you dont want to use for a while by 'leasing' it. Confusing, fiddly UX though

Yes, in CLN you can use the keyword "all" for one of the amounts.

Great to hear it's possible. Can they select individual utxos?

Yes, both `fundchannel` and `multifundchannel` have a `utxos` argument.