Adjust coordinator fee to anonymity set.
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinJoinTabView.xaml
WalletWasabi.Gui/Controls/WalletExplorer/CoinJoinTabView.xaml
<StackPanel Orientation="Horizontal" Gap="4">
<TextBlock Text="Coordinator Fee:"></TextBlock>
<TextBlock Text="{Binding CoordinatorFeePercent}"></TextBlock>
- <TextBlock Text="%"></TextBlock>
+ <TextBlock Text="% per anonymity set."></TextBlock>
</StackPanel>
<StackPanel Orientation="Horizontal" Gap="4">

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinJoinTabViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/CoinJoinTabViewModel.cs
@@ -62,7 +62,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
}
else
{
- CoordinatorFeePercent = "0.3";
+ CoordinatorFeePercent = "0.003";
RequiredBTC = Money.Zero;
}

MODIFY
WalletWasabi.Gui/Tabs/LegalIssuesViewModel.cs
WalletWasabi.Gui/Tabs/LegalIssuesViewModel.cs
@@ -43,7 +43,7 @@ COUNTRY OF RESIDENCE
In case if you are a Gibraltar residence person and willing to use Wasabi wallet please inform us in advance on the following e-mail address: legal@zksnacks.com.
";
- LegalIssues += new String('\n', 100);
+ LegalIssues += new string('\n', 100);
}
public string LegalIssues { get; }

MODIFY
WalletWasabi.Gui/Tabs/PrivacyPolicyViewModel.cs
WalletWasabi.Gui/Tabs/PrivacyPolicyViewModel.cs
@@ -59,7 +59,7 @@ Contact details regarding this declaration
In case you have any questions concerning zkSNACKs' Data Protection Declaration or if you would like to exercise your right of information, rectification or deletion, please send us a written request outlining your desire to: legal@zksnacks.com.
";
- PrivacyPolicy += new String('\n', 100);
+ PrivacyPolicy += new string('\n', 100);
}
public string PrivacyPolicy { get; }

MODIFY
WalletWasabi.Gui/Tabs/TermsAndConditionsViewModel.cs
WalletWasabi.Gui/Tabs/TermsAndConditionsViewModel.cs
@@ -56,7 +56,7 @@ It is your own responsibility to ensure that the use of Wasabi Wallet complies w
Subject to the other provisions of these Terms, including, but not limited to Section 4 on Prohibited Activities, you may freely download and use the Client Application without any charge or fee imposed on you by the Service Provider.
The Service Provider does not charge You transaction fees after normal Bitcoin transactions, however You are still subject to transaction fees, charged by the Bitcoin network and received by the Bitcoin miners.
-Both the Service Provider and the Bitcoin network charge you transaction fees after CoinJoin Bitcoin transactions. CoinJoin transactions are shared transactions with other users of the wallet. You initiate a CoinJoin transaction by providing unspent transaction outputs to the Service Engine and a CoinJoin round will be executed when a sufficient number of other users provided unspent transaction outputs. The transaction fee, charged by the Service Provider is 0.3% after each round of transaction you initiate, except if:
+Both the Service Provider and the Bitcoin network charge you transaction fees after CoinJoin Bitcoin transactions. CoinJoin transactions are shared transactions with other users of the wallet. You initiate a CoinJoin transaction by providing unspent transaction outputs to the Service Engine and a CoinJoin round will be executed when a sufficient number of other users provided unspent transaction outputs. The transaction fee, charged by the Service Provider is 0.003% multiplied by the number of users in each round of transaction you initiate, except if:
You are providing the unspent transaction outputs with the smallest accumulated value to the round. In this case You are not being charged with any fees by the Service Provider.
You provided unspent transaction outputs, in a way that in the final CoinJoin transaction would result in a change output back to you that is smaller than or equal to 1% of the denomination of the CoinJoin round. In this rare case, change output will not be generated, to gain an edge on privacy, rather the value of the change output will be added to the fees charged by the Service Provider after the round.
The transaction fees, both charged by the Bitcoin network and the Service Provider shall be automatically processed by our Engine by means of deducting the appropriate amount from the transaction you submit.
@@ -162,7 +162,7 @@ www.zksnacks.com(*)
(*) We recommend you to use Tor browser in order to protect your privacy.
";
- TermsAndConditions += new String('\n', 100);
+ TermsAndConditions += new string('\n', 100);
}
public string TermsAndConditions { get; }

MODIFY
WalletWasabi/Backend/Models/Responses/CcjRunningRoundState.cs
WalletWasabi/Backend/Models/Responses/CcjRunningRoundState.cs
@@ -54,7 +54,7 @@ namespace WalletWasabi.Backend.Models.Responses
public Money CalculateRequiredAmount(params Money[] queuedCoinAmounts)
{
var tried = new List<Money>();
- Money baseMinimum = Denomination + Denomination.Percentange(0.3m) + FeePerOutputs * 2;
+ Money baseMinimum = Denomination + Denomination.Percentange(CoordinatorFeePercent) * RequiredPeerCount + FeePerOutputs * 2;
foreach (Money amount in queuedCoinAmounts.OrderByDescending(x => x))
{
tried.Add(amount);
@@ -71,7 +71,7 @@ namespace WalletWasabi.Backend.Models.Responses
public bool HaveEnoughQueued(params Money[] queuedCoinAmounts)
{
var tried = new List<Money>();
- Money baseMinimum = Denomination + Denomination.Percentange(0.3m) + FeePerOutputs * 2;
+ Money baseMinimum = Denomination + Denomination.Percentange(CoordinatorFeePercent) * RequiredPeerCount + FeePerOutputs * 2;
foreach (Money amount in queuedCoinAmounts.OrderByDescending(x => x))
{
tried.Add(amount);

MODIFY
WalletWasabi/Models/ChaumianCoinJoin/CcjRound.cs
WalletWasabi/Models/ChaumianCoinJoin/CcjRound.cs
@@ -262,7 +262,7 @@ namespace WalletWasabi.Models.ChaumianCoinJoin
}
// 4. Start building Coordinator fee.
- Money coordinatorFeePerAlice = newDenomination.Percentange(CoordinatorFeePercent);
+ Money coordinatorFeePerAlice = newDenomination.Percentange(CoordinatorFeePercent) * Alices.Count;
Money coordinatorFee = Alices.Count * coordinatorFeePerAlice;
// 5. Add the inputs and the changes of Alices.

MODIFY
WalletWasabi/Models/ChaumianCoinJoin/CcjRoundConfig.cs
WalletWasabi/Models/ChaumianCoinJoin/CcjRoundConfig.cs
@@ -86,7 +86,7 @@ namespace WalletWasabi.Models.ChaumianCoinJoin
Denomination = Money.Coins(0.1m);
ConfirmationTarget = 144; // 1 day
- CoordinatorFeePercent = 0.1m;
+ CoordinatorFeePercent = 0.003m; // Coordinator fee percent is per anonymity set.
AnonymitySet = 100;
InputRegistrationTimeout = 604800; // One week
ConnectionConfirmationTimeout = 60;

MODIFY
WalletWasabi/Services/CcjClient.cs
WalletWasabi/Services/CcjClient.cs
@@ -285,7 +285,7 @@ namespace WalletWasabi.Services
Money minAmountBack = ongoingRound.CoinsRegistered.Sum(x => x.Amount); // Start with input sum.
minAmountBack -= ongoingRound.State.FeePerOutputs * 2 + ongoingRound.State.FeePerInputs * ongoingRound.CoinsRegistered.Count; // Minus miner fee.
Money actualDenomination = unsignedCoinJoin.GetIndistinguishableOutputs().OrderByDescending(x => x.count).First().value; // Denomination may grow.
- Money expectedCoordinatorFee = actualDenomination.Percentange(ongoingRound.State.CoordinatorFeePercent);
+ Money expectedCoordinatorFee = actualDenomination.Percentange(ongoingRound.State.CoordinatorFeePercent) * ongoingRound.State.RequiredPeerCount;
minAmountBack -= expectedCoordinatorFee; // Minus expected coordinator fee.
// If there's no change output then coordinator protection may happened:

Adjust coordinator fee to anonymity set.