Closed ith-harvey closed 1 year ago
I am not sure I fully understand the problem, when it says greater than the amount claimed by caller
in
rewardsClaimed() - was greater than the amount claimed by caller
updateRewardsClaimed() - was greater than the amount claimed by caller
ClaimedRewards event - was emitting a greater value then was actually claimed
you mean greater than the amount received by claimer
?
This functionality is to be expected, closing PR
Description of change
High level
_transferAjnaRewards()
enforceRewards()
method at a lower level in the logic flow. By applying the restriction at this depthupdateRewardsClaimed()
andrewardsClaimed()
are altered properly across all calls against the contract._calculateAndClaimAllRewards()
in the eventunstake()
is called and the caller should receive rewards for updating exchange rates and staking rewardsmaxAmount_
argument to_calculateAndClaimStakingRewards()
in order to ensure the amounts reduced from therewardsClaimed()
accumulator were accurate.calculateRewards()
now provides an accurate rewards calculation restricted by the ajna balance of the contract at the time the call is made.Description of bug or vulnerability and solution
There is a discrepancy in the
rewardsManger.sol
contract's reward accumulators and events when we apply the ajna balance restriction to the amount of rewards transferred to the updaters and staking claimers.rewardsClaimed()
- was greater than the amount claimed by callerupdateRewardsClaimed()
- was greater than the amount claimed by callerClaimedRewards
event - was emitting a greater value then was actually claimedContract size
Pre Change