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 · 5 comments · Fixed by #1109, skalenetwork/skale-manager-interfaces#46, #1112 or #1137
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.

@DmytroNazarenko DmytroNazarenko added the enhancement New feature or request label Apr 10, 2023
@PolinaKiporenko PolinaKiporenko moved this to Ready For Pickup in SKALE Engineering 🚀 Apr 23, 2024
@PolinaKiporenko PolinaKiporenko added this to the SKALE 2.5 milestone Apr 23, 2024
@DimaStebaev DimaStebaev moved this from Ready For Pickup to In Progress in SKALE Engineering 🚀 Aug 22, 2024
@DimaStebaev DimaStebaev linked a pull request Aug 22, 2024 that will close this issue
@DimaStebaev DimaStebaev moved this from In Progress to Blocked in SKALE Engineering 🚀 Aug 22, 2024
@DimaStebaev DimaStebaev moved this from Blocked to In Progress in SKALE Engineering 🚀 Aug 28, 2024
@PolinaKiporenko PolinaKiporenko moved this from In Progress to Code Review in SKALE Engineering 🚀 Aug 28, 2024
@github-project-automation github-project-automation bot moved this from Code Review to Ready For Release Candidate in SKALE Engineering 🚀 Aug 29, 2024
@PolinaKiporenko PolinaKiporenko moved this from Ready For Release Candidate to Merged To Release Candidate in SKALE Engineering 🚀 Sep 2, 2024
@EvgeniyZZ EvgeniyZZ moved this from Merged To Release Candidate to QA in SKALE Engineering 🚀 Sep 2, 2024
@yatsunastya
Copy link

Version: 1.12.0-beta.2

For validators earned fees calculation is still 12 months.
Code reference

@yatsunastya yatsunastya reopened this Sep 27, 2024
@github-project-automation github-project-automation bot moved this from QA to Ready For Pickup in SKALE Engineering 🚀 Sep 27, 2024
@yatsunastya
Copy link

Checked bounty calculation for a holder.
Version: 1.12.0-beta.2

withdrawBounty transaction on 1.11.0 version. There are bounties for ~ 2.5 years, but it was withdrawn for 12 months.
Image

withdrawBounty transaction on 1.12.0-beta.2 version. There are bounties for ~ 3.5 years and it was withdrawn for ~ 42 months.
Знімок екрана 2024-09-27 о 13 27 38

@DimaStebaev DimaStebaev linked a pull request Sep 30, 2024 that will close this issue
@yatsunastya
Copy link

Checked ✅
Version: 1.12.0-beta.4

withdrawFee transaction. There are fees for ~ 42 months.

@PolinaKiporenko PolinaKiporenko moved this from Ready For Release Candidate to QA in SKALE Engineering 🚀 Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment