Skip to content

Commit

Permalink
new default values
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBlueMatt committed Dec 18, 2024
1 parent 8cccc4f commit eef3563
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions lightning/src/routing/scoring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,11 @@ where L::Target: Logger {
pub struct ProbabilisticScoringFeeParameters {
/// A fixed penalty in msats to apply to each channel.
///
/// Default value: 500 msat
/// In testing, a value of roughly 1/3 of [`historical_liquidity_penalty_multiplier_msat`]
/// (implying scaling all estimated probabilities down by a factor of ~79%) resulted in the
/// most accurate total success probabilities.
///
/// Default value: 20,000 msat
pub base_penalty_msat: u64,

/// A multiplier used with the payment amount to calculate a fixed penalty applied to each
Expand All @@ -500,7 +504,12 @@ pub struct ProbabilisticScoringFeeParameters {
///
/// ie `base_penalty_amount_multiplier_msat * amount_msat / 2^30`
///
/// Default value: 8,192 msat
/// In testing, a value of roughly 1/3 of
/// [`historical_liquidity_penalty_amount_multiplier_msat`] (implying scaling all estimated
/// probabilities down by a factor of ~79%) resulted in the most accurate total success
/// probabilities.
///
/// Default value: 128 msat
///
/// [`base_penalty_msat`]: Self::base_penalty_msat
pub base_penalty_amount_multiplier_msat: u64,
Expand All @@ -518,7 +527,10 @@ pub struct ProbabilisticScoringFeeParameters {
///
/// `-log10(success_probability) * liquidity_penalty_multiplier_msat`
///
/// Default value: 30,000 msat
/// In testing, this scoring model performs that the historical scoring model configured with
/// the [`historical_liquidity_penalty_multiplier_msat`] and thus is disabled by default.
///
/// Default value: 0 msat
///
/// [`liquidity_offset_half_life`]: ProbabilisticScoringDecayParameters::liquidity_offset_half_life
pub liquidity_penalty_multiplier_msat: u64,
Expand All @@ -540,7 +552,11 @@ pub struct ProbabilisticScoringFeeParameters {
/// probabilities, the multiplier will have a decreasing effect as the negative `log10` will
/// fall below `1`.
///
/// Default value: 192 msat
/// In testing, this scoring model performs that the historical scoring model configured with
/// the [`historical_liquidity_penalty_amount_multiplier_msat`] and thus is disabled by
/// default.
///
/// Default value: 0 msat
pub liquidity_penalty_amount_multiplier_msat: u64,

/// A multiplier used in conjunction with the negative `log10` of the channel's success
Expand All @@ -554,7 +570,7 @@ pub struct ProbabilisticScoringFeeParameters {
/// track which of several buckets those bounds fall into, exponentially decaying the
/// probability of each bucket as new samples are added.
///
/// Default value: 10,000 msat
/// Default value: 60,000 msat
///
/// [`liquidity_penalty_multiplier_msat`]: Self::liquidity_penalty_multiplier_msat
pub historical_liquidity_penalty_multiplier_msat: u64,
Expand All @@ -575,7 +591,7 @@ pub struct ProbabilisticScoringFeeParameters {
/// channel, we track which of several buckets those bounds fall into, exponentially decaying
/// the probability of each bucket as new samples are added.
///
/// Default value: 64 msat
/// Default value: 384 msat
///
/// [`liquidity_penalty_amount_multiplier_msat`]: Self::liquidity_penalty_amount_multiplier_msat
pub historical_liquidity_penalty_amount_multiplier_msat: u64,
Expand Down

0 comments on commit eef3563

Please sign in to comment.