Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Update rewards #44

Open
wants to merge 5 commits into
base: h-main
Choose a base branch
from
Open

Update rewards #44

wants to merge 5 commits into from

Conversation

Vitomir2
Copy link

@Vitomir2 Vitomir2 commented Apr 16, 2024

  • make getRawDelegatorReward public function and move it on the correct place;
  • create calculate total reward function that will get all other rewards of a delegated position;
  • separate penalty calculation from the rewards;
  • make a test case that tests if the same vesting position size, but with different periods shows different rewards and also if they are totally the same, opened at the same time and they've the same rewards.
  • add missing comments for clarity;

create new _calculatePositionRewards method that will be used for the rewards calculation when getting the rewards;
update _rewardParams to calculate elapsed time, not only the maturing end period;
make a test case that tests if the same vesting position size, but with different period shows different rewards and also if they are totally the same, opened in the same time and they've the same rewards.
@Vitomir2 Vitomir2 requested a review from R-Santev April 16, 2024 11:49
@Vitomir2 Vitomir2 changed the title updates Fix rewards Apr 17, 2024
@Vitomir2 Vitomir2 changed the title Fix rewards Update rewards Apr 17, 2024
contracts/RewardPool/IRewardPool.sol Show resolved Hide resolved
contracts/RewardPool/modules/APR.sol Show resolved Hide resolved
contracts/RewardPool/modules/APR.sol Show resolved Hide resolved
contracts/RewardPool/modules/APR.sol Show resolved Hide resolved
contracts/RewardPool/IRewardPool.sol Show resolved Hide resolved
contracts/RewardPool/modules/DelegationRewards.sol Outdated Show resolved Hide resolved
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants