-
Notifications
You must be signed in to change notification settings - Fork 498
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
[Proposal] Merge pre-mixed/change inputs without change #1651
Comments
That is how it worked for about 2-3 months ago, but then I thought I be smart and do some more sophisticated coin selection that protects your privacy better. However this is indeed creating a lot of change in the wallet and if the changes are consolidated then all the smartness is for nothing, so I give a concept ACK to your suggestion. Another alternative is that we could have 3 coin selection algorithm, where yours is the default.
As an exercise, let me walk you through our current mixing coin selection algorithm: Confirmation has largest priority. Wasabi will always want to register confirmed coins first than unconfirmed ones, because registering unconfirmed ones can ruin the user experience of others. This won't change. Then it says that you cannot register unconfirmed coins if it doesn't come from a coinjoin. This won't change. Next it says take the coins from the waiting list. So these are those coins those are queued and not already registered to a round. This won't change. This line says to take the coins those don't have a "don't select me" timeout set. This is needed, because the backend propagates the coinjoin and we don't know that a coinjoin is propagated or the round failed until it's propagated to us through nodes or a sufficient amount of time is passed. For some reason I didn't want to trust the coordinator here to tell us if a round failed or not, not sure why. This won't change. Next I have a Next I just collect From here on comes the interesting part. Precedence going from back to the forth. I'm doing ordering on these groups and then choose the first one. So the most important thing is to confirmation: If only one coin is to be registered:
For example if you received 0.1BTC and 4BTC, then prefer registering 4BTC: then you'll provide others more anonymity, since you'll provide after 0.1, 0.2, 0.4, 0.8, 1.6 and 3.2 mixing levels instead of just 0.1 with a small coin.) If more then one coin is to be registered, coin merging will happen:
Thoughts on what to change? |
@nopara73 I am not thinking of making automatic coin selection. |
Ah can I ask you what happen if I register one coin of X then the price of coinjoin raise above X because of the number of participants? |
Ah also what is the minimum change output that wasabi is using? (where, if any value below this, the money is given to the coordinator or miners) |
The smallest coin registration never pays any fee and those who don't have enough to pay the CJ fee will only pay as much as they have. |
Money minimumOutputAmount = Money.Coins(0.0001m); // If the change would be less than about $1 then add it to the coordinator.
Money somePercentOfDenomination = newDenomination.Percentage(0.7m); // If the change is less than about 0.7% of the newDenomination then add it to the coordinator fee.
Money minimumChangeAmount = Math.Max(minimumOutputAmount, somePercentOfDenomination); Where |
We cannot clutter the UI, rather we should make it simpler: #1369 |
to make it simpler is there a way to highlight change utxo in some color that will make a user pay attention and when you point your mouse over that utxo it will warn not to mix change with high annon utxo's. Lots of users do not understand and do exactly what I said. therefore it affects other users when we coinjoin. Correct me if I am wrong? |
Fixes? #1652 |
@Kortik7 Do you mean red change UTXO? There's nothing that helps the user make the decision except that it's red and other ones are green :/ |
@NicolasDorier Actually what you want is to find the closest subset sum to the denomination. Maybe this should be the first algorithm? And if the closest isn't close enough fall back to my algorithm. https://www.geeksforgeeks.org/subarray-whose-sum-is-closest-to-k/ |
@nopara73 then I have an idea I think. A selection algorithm that always select UTXOs to minimize the fees. |
Basically calling the two selection algorithm:
It would not select red coins if those make a change. |
Where should be the settings for that? In the settings windows? |
@NicolasDorier it possible to ingrate that by default without even needing a setting option, should be automatic without users knowing it. |
@Kortik7 well, the user wants probably to configure by themselves wether they want cheap coinjoin or maximum privacy one. |
Yeah, trying to find closest subset sum before my algo may be the smartest thing to do. It may result in unnecessary coin merging, but rather merge now in a cj than later in a noncj. |
The user will ruin his privacy by consolidating the change in a much worse way. |
Hmm, thinking about it, maybe Nicolas is right. If this algo would mix red with non-red coins that's instant deanonymization, so it's not a good idea, other than adding an option, so the fee algo try to find the cheapest combo. |
I have a better idea actually, very easy to explain in the UX: A parameter in settings called Then the user would just queue all his coins, and when wasabi detect a round where it can queue without producing change, it register it automatically. |
I like the idea, but what when the user selects an amount MUCH larger than the round? It seems that your idea is only useful for a very narrow range of denomination? |
@MaxHillebrand it would works as most of the time large amount can be remixed by multiple of 0.1 |
Or maybe "Avoid change for small denominations" |
A wild idea - how about some form of DBC for small change? I know - huge change to the protocol, and it would make zkSnacks somewhat of a custodian [depending how you view DBC servers...] so this is most likely out of the question for the short term, rather something to think about. |
2.0 change avoidance is a brilliant to solution to exactly this problem. really well done guys! |
I noticed that I spend a fair amount of time trying to select exactly the right amount of change coins to make 1 whole round without any change back.
Because the number of change keep growing, and you don't want any change back to protect your future privacy, I was thinking it is a good idea to have a feature which try to selection the coins to almost equal the coinjoin round price.
The text was updated successfully, but these errors were encountered: