-
Notifications
You must be signed in to change notification settings - Fork 13
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
Fix dynamic difficulty-driven fee #24
Comments
To work, this system requires stable and unchanging mining algo and/or stable and unchanging mining conditions, thus the development of ASICs rendered it completely useless. Although, the all-time avg. diff and reward as a reference look neat and is trailing, it may completely miss the shot. It builds up and incorporates avg. difficulty change caused by ASICs but I think it does not correspond to the price we want for the reference. |
Anyways, even if it is left intact, upon algo change the historical avg. diff and reward should be calculated starting from the new algo height. |
So, currently, minimal network fee is calculated according to this formula The fixed/static reference difficulty may not be correct because growing adoption may cause difficulty to grow, therefore maybe trailing avg difficulty (currently active and described above) is indeed a correct solution. Moreover, this way maybe it can adjust itself automatically without the need for intervention by devs, and perhaps even in such major changes in hashrate and difficulty as the advent of ASICs. And, perhaps, in the case of algo change, average difficulty should be reset. It is because it is driven high by ASICs and will stay very high for a long time, and will not allow the fee to drop. It can be done by deducing cumulative difficulty up to the point of hardfork, in other words start caclulating cumulative difficulty from the height of hardfork:
where After the hardfork it should be calculated according to formula |
The dynamically adjusting fee based on difficulty needs to be fixed and need to take into account possible POW change #21.
Now it uses an all-time avg. difficulty as a reference difficulty whereas it should use some selected difficulty at the point of time with the desired price to calculate the corresponding fee.
If new POW algo is introduced, this all-time difficulty will not be relevant.
Moreover, this all-time average difficulty is not from the initial equation
F = S * A / D
from whitepaper where, F — minimum transaction fee in native currency, KRB; S — starting fee in fiat equivalent, USD; A — Average difficulty constant, corresponding to the chosen level of fiat price; D — Current difficulty.The text was updated successfully, but these errors were encountered: