Open darosior opened 3 years ago
If we go for a pool, the coin selection algorithm should probably be biased toward spending small UTXOs first. This way if the average value needed for a fee bump is increasing, we don't have to re-create new utxos out of the "deprecated" ones: they would be used before they are completely deprecated.
Given:
f
and absolute fee F
that we need to feebump a tx
totx
)tx
of all fee bumping inputs (spending some of the 8 coins) it could havetx
inputs they make its feerate go above f
and its absolute fee above F
.FIXME: we could give this a bias. If the feerate is not crazy, do that, if it is, just take the most optimal ones, if it is mildly crazy do an in-between.
If we have a process to swipe the low-value coins during low-fee periods, we can afford to go for the most optimal strategy. [0]
tx
of all fee bumping inputs (spending some of the 8 coins) it could havetx
inputs they make its feerate go above f
and its absolute fee above F
.In the unlikely case that we need to feebump (because the timelock is about to expire) and the block space price is higher than our reserve, we could use the unregistered coins as an emergency measure. What is the preferable solution?
Just use up the unregistered coins if it can provide us with a high-enough feerate. This assumes that we won't have to immediately Cancel another vault for a higher value.
Allocate unregistered coins to highest-value vaults under watch if we detect that our reserve isn't enough anymore. This gives some more leeway to these vaults should they need to be canceled, and we can still apply the above policy afterward since any left unregistered coin is an excess that can be used up by any vault. Obviously stop accepting new vaults and urge for a refill.
[0] Note that even if we don't, one could argue that they can still be re-purposed. But the assumption is that the average feerate will increase over time and therefore the low-value coins would be harder -if at all possible- to re-assign and eventually need to be sweeped.
If no pool, how do we peel the big UTXO and create the change output?If a mix, how to do both?EDITed: we went with a pool.