Skip to content
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

Closed
payvint opened this issue Jan 23, 2023 · 2 comments · Fixed by #1109, skalenetwork/skale-manager-interfaces#46 or #1112
Closed
Assignees
Labels
enhancement New feature or request

Comments

@payvint
Copy link
Contributor

payvint commented Jan 23, 2023

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

@payvint
Copy link
Contributor Author

payvint commented Jan 23, 2023

I would say increase up to 30 year - would make more sense till if fits in the block gas limit

@DimaStebaev
Copy link
Contributor

The fix is a matter of changing a 1 constant in a 1 contract.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment