-
Notifications
You must be signed in to change notification settings - Fork 23
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
Increase likelihood that payments below dust go through #1751
Conversation
9d7703a
to
de6dc3a
Compare
With transaction fees going up, certain payments that would normally succeed can fail because they end up below the dust limit. By increasing the `max_dust_htlc_exposure_msat` dynamic fee rate multiplier from `5_000` to `100_000`, we increase the likelihood that payments below dust go through. For example, in a high transaction fee environment where the high priority fee rate is 200 sat/vByte (50_000 sat/KW), before this patch we would allow up to `50_000 * 5 = 250_000` sats in dust HTLCs, whereas now we would allow `50_000 * 100 = 5_000_000` sats. This does come at the risk of losing more funds to transaction fees if dust HTLCs are part of the channel when it is force-closed.
de6dc3a
to
bc426d8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's give this a go!
@luckysori In case the negotiated fees on that channel are very high it would mean we can send the max amount of 10k sats right? |
@luckysori Is there anything left on this PR or can we get it merged? |
I'm not sure I get you. The example I left in the docs might be helpful: /// Fee rate multiplier used to dynamically calculate how many msats we allow to have in incoming,
/// dust HTLCs for a channel.
///
/// The larger this value the less likely we are to reject a payment that would produce a dust HTLC.
///
/// ### Example
///
/// - High priority fee: 200 sat/vByte (50_000 sat/KW).
///
/// - Fee rate multiplier: 100_000.
///
/// Total dust HTLC sats: (50_000 * 100_000) / 1_000 = 5_000_000.
const MAX_DUST_HTLC_EXPOSURE_FEE_RATE_MULTIPLIER: MaxDustHTLCExposure =
MaxDustHTLCExposure::FeeRateMultiplier(100_000); We set the Also I don't think the fee rate is negotiated. It simply depends on the fee rate source for each party. It allows either party to reject inbound dust HTLCs based on their view of the blockchain transaction fees. |
I don't think there's anything left, but I wasn't sure if we were all happy with the tradeoff. What do you think, @bonomat? |
If I understand it correctly than we will simply keep dust HTLCs in the holding cells until they are resolved. If we were to force close in the mean time, then this amount will go to the miners. |
Not needed anymore. |
With transaction fees going up, certain payments that would normally succeed can fail because they end up below the dust limit.
By increasing the
max_dust_htlc_exposure_msat
from a dynamic value of5 * high_priority_feerate_per_kw
sats to a fixed value of 10_000_000 sats, we increase the likelihood that payments below dust go through.For example, in a high transaction fee environment where the high priority fee rate is 200 sat/vByte (50_000 sat/KW), before this patch we would allow up to
50_000 * 5 = 250_000
sats in dust HTLCs, whereas now we would allow up to 10_000_000 sats.This does come at the risk of losing more funds to transaction fees if dust HTLCs are part of the channel when it is force-closed.