You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To mitigate this scenario, a `max_dust_htlc_exposure_msat` must be apply at
818
+
HTLC sending, forwarding and receiving.
819
+
820
+
A node:
821
+
- upon an incoming HTLC:
822
+
- if a HTLC's `amount_msat` is inferior to the counterparty's `dust_limit_satoshis` plus the HTLC-timeout fee at the `dust_buffer_feerate`:
823
+
- if the `amount_msat` plus the `dust_balance_on_counterparty_tx` is superior to `max_dust_htlc_exposure_msat`:
824
+
- SHOULD fail this HTLC once it's committed
825
+
- SHOULD NOT reveal a preimage for this HTLC
826
+
- if a HTLC's `amount_msat` is inferior to the holder's `dust_limit_satoshis` plus the HTLC-success fee at the `dust_buffer_feerate`:
827
+
- if the `amount_msat` plus the `dust_balance_on_holder_tx` is superior to `max_dust_htlc_exposure_msat`:
828
+
- SHOULD fail this HTLC once it's committed
829
+
- SHOULD NOT reveal a preimage for this HTLC
830
+
- upon an outgoing HTLC:
831
+
- if a HTLC's `amount_msat` is inferior the counterparty's `dust_limit_satoshis` plus the HTLC-success fee at the `dust_buffer_feerate`:
832
+
- if the `amount_msat` plus the `dust_balance_on_counterparty_tx` is superior to `max_dust_htlc_exposure_msat`:
833
+
- SHOULD NOT send this HTLC
834
+
- SHOULD fail this HTLC if it's forwarded
835
+
- if a HTLC's `amount_msat` is inferior to the holder's `dust_limit_satoshis` plus the HTLC-timeout fee at the `dust_buffer_feerate`:
836
+
- if the `amount_msat` plus the `dust_balance_on_holder_tx` is superior to `max_dust_htlc_exposure_msat`:
837
+
- SHOULD NOT send this HTLC
838
+
- SHOULD fail this HTLC if it's forwarded
839
+
840
+
`dust_buffer_feerate` is defined as the maximum of either 2530 sats per kWU or
841
+
125% of the current `feerate_per_kw`. This ensure that the node isn't suddenly
842
+
exposed to significantly more trimmed balance if the feerate increases when we have
843
+
several HTLCs pending which are near the dust limit.
844
+
845
+
`dust_balance_on_holder_tx` as the sum:
846
+
- incoming HTLCs inferior to the holder's `dust_limit_satoshis` plus the HTLC-timeout fee at the `dust_buffer_feerate`
847
+
- outgoing HTLCs inferior to the holder's `dust_limit_satoshis` plus the HTLC-success fee at the `dust_buffer_feerate`
848
+
- waiting-a-counterparty-RAA-to-be-removed outgoing HTLCs inferior to the holder's `dust_limit_satoshis` plus the HTLC-timeout fee at the `dust_buffer_feerate`
849
+
850
+
`dust_balance_on_counterparty_tx` as the sum:
851
+
- incoming HTLCs inferior to the counterparty's `dust_limit_satoshis` plus the HTLC-success fee at the `dust_buffer_feerate`
852
+
- outgoing HTLCs inferior to the counterparty's `dust_limit_satoshis` plus the HTLC-timeout fee at the `dust_buffer_feerate`
853
+
- waiting-a-counterparty-RAA-to-be-removed outgoing HTLCs inferior to the counterparty's `dust_limit_satoshis` plus the HTLC-timoeut fee at the `dust_buffer_feerate`
854
+
800
855
### Adding an HTLC: `update_add_htlc`
801
856
802
857
Either node can send `update_add_htlc` to offer an HTLC to the other,
0 commit comments