-
Notifications
You must be signed in to change notification settings - Fork 492
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
[FireProofing] Don't allow to burn more than 30% of coins effective value in CJs #10739
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cACK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The condition is the inverse of what it should be.
Co-authored-by: Turbolay <turbolay@zksnacks.com>
I had a call about this with @turbolay and I understand the idea of trying to improve the situation for both input and output side at the same time, but I believe they should be considered separately, because different considerations apply. The implementation in this PR considers the script type for calculating the minimum, which would mean that Segwit v0 and Taproot inputs of X denomination would be allowed in at different fee rates. This brings unnecessary complications compared to using the most conservative (Segwit v0 input) basis of the 30% calculation for the minimum output amount. I believe @turbolay said he would create a PR for just the output side fix now, as its more urgent. |
It seems that I misunderstood, that this PR would be applying the same 30% logic to both input and output side. CalculationsIf you use only Taproot Input cost as the basis for the 30%: If you use only SegWit v0 Input cost as the basis for the 30%: If the numbers suggested in #10675 would get accepted for the output side, and this PR would be merged to mitigate the input side, it should quarantee that outputs coming from round 1 would be allowed to remix in round 2, assuming fee rate stays the same or go down. But there's a problem if fees rise, as the first rounds output would not be able to participate in the round 2. |
To limit minimum input amount to be registered because of network congestion is misguided: if the input can pay the network fees for itself, then the input is good. The key metric to consider here is the total registrable amount. You're falling into a mental trap by fixating on a single input, let's say However, if your total registrable amount was |
It still doesn't seem rational for me. And I don't see the relation between total amount and cost of registering one. |
In the coinjoin you gained
Since coinjoins tend to have lower time preference than everyday transactions: |
A change like this in private static bool IsEconomicallyFeasible<TCoin>(TCoin coin, UtxoSelectionParameters parameters)
where TCoin : ISmartCoin
=> coin.EffectiveValue(parameters.MiningFeeRate).Satoshi > (parameters.AllowedOutputAmounts.Min.Satoshi + Math.Max(ScriptType.P2WPKH.EstimateOutputVsize(), ScriptType.Taproot.EstimateOutputVsize()) * parameters.MiningFeeRate);
|
First action item we could think of for fixing #10675
Idea:
Client should not register small coins that are loosing more than 30% of their effective values.
This check is only useful in high fee enviroment.
0.3
was from the top of my head. Feel free to suggest other values.