-
Notifications
You must be signed in to change notification settings - Fork 32
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
Calculate rewards up to 10 years by 1 "withdrawBounty" #925
Calculate rewards up to 10 years by 1 "withdrawBounty" #925
Comments
I would say increase up to 30 year - would make more sense till if fits in the block gas limit |
The fix is a matter of changing a 1 constant in a 1 contract. |
Version: For validators earned fees calculation is still 12 months. |
Checked bounty calculation for a holder.
|
Checked ✅
|
Current problem
There is a limit in Distributor contract that you can claim bounty for 12 months max. And if you delegated 25 months ago, and want to claim rewards - you need to call withdrawBounty 3 times(12 + 12 + 1). This limit was introduce by high gas consumption of function "withdrawBounty" - by 12 months to would cost 810K of gas. And right now on all platforms (Activate, Delegation Portal, Skale Analytics) claimable reward shows only by 12 months which make clients confused of small amount. Results provided by call "getAndUpdateEarnedBountyAmountOf".
Solution
It would be good to increase a limit by 10 years(120 months) or higher, gas consumption would be 8M of gas(which still fit in block gas limit 30M). It would show correct amount of claimable rewards for the 10 year period.
10 year - 8M gas
30 year - 24M gas
The text was updated successfully, but these errors were encountered: