ajna-finance / ajna-core

The Ajna protocol is a non-custodial, peer-to-peer, permissionless lending, borrowing and trading system that requires no governance or external price feeds to function.
https://www.ajna.finance/
Other
31 stars 11 forks source link

`updateRewardsClaimed()` and `rewardsClaimed()` become inaccurate once rewardsManager is out of ajna #888

Closed ith-harvey closed 1 year ago

ith-harvey commented 1 year ago

Description of change

High level

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.

Contract size

Pre Change

## Post Change # Gas usage ## Pre Change ## Post Change
grandizzy commented 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?

ith-harvey commented 1 year ago

This functionality is to be expected, closing PR