Remove weight bias, because it ruins the algorithm
MODIFY
WalletWasabi/WabiSabi/Client/AmountDecomposer.cs
WalletWasabi/WabiSabi/Client/AmountDecomposer.cs
@@ -85,11 +85,9 @@ namespace WalletWasabi.WabiSabi.Client
{
foreach (var denom in BreakDown(input, demonsForBreakDown))
{
- var weight = Weight(denom.Satoshi);
-
- if (!denomProbabilities.TryAdd(denom, weight))
+ if (!denomProbabilities.TryAdd(denom, 1))
{
- denomProbabilities[denom] += weight;
+ denomProbabilities[denom] += 1;
}
}
}
@@ -97,12 +95,6 @@ namespace WalletWasabi.WabiSabi.Client
return denomProbabilities;
}
- private long Weight(long val)
- {
- // Bias denom selection as the square of the value.
- return val * val;
- }
-
private IEnumerable<Money> BreakDown(Coin coin, IEnumerable<Money> denominations)
{
var remaining = coin.EffectiveValue(FeeRate);

Remove weight bias, because it ruins the algorithm