Description
Currently we have 2 situations where we are going to use the anchor output.
-
When the Commitment is not confirmed and either the sweeper uses the anchor to bump our commitment tx, or we use the
bumpclosefee
rpc which lets us bump the fee of a unconfirmed commitment transaction manually. This feature request does not touch these two scenarios -
When the Commitment Tx is confirmed our anchor_resolver will try to sweep our anchor with the relayfee (253 sats/kweight). This is what this feature requests targets. Sweeping the Anchor only is economical only up to ~1.8 sat/vbyte (when sweeping before 16blocks). I propose to make this sweeping of anchors configurable. Allowing noderunners to switch off the anchor sweep either by just disabling this behaviour or maybe implement a check which evaluates whether the fee-estimation for maybe 144 blocks would give us a higher feerate than maybe 1.5 sat/vbyte and then not sweeping the anchor programmatically.
Problem with this sweeping is, that it blocks useable outputs for the user. In bitcoin transactions can only be replaced so they would have to either replace this transaction (RBF) which makes it immediately not economical (size for p2tr output is around 194 byte), using CPFP to use the bigger output which was used to sweep this anchor makes it also not worth it, as soon as the effective feerate goes beyond 1,8 sat/vbyte. So allowing the user to switch off automatic sweeping makes totally sense in crowded mempool conditions.
I would like to tackle this issue if there is consensus that it is worth going in this direction :)