StaticATokenLM::_claimRewardsOnBehalf
: wrong update of _unclaimedRewards[onBehalfOf]
if reward > totBal
lead to user lose of pending rewards.
#36
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
duplicate-10
partial-50
Incomplete articulation of vulnerability; eligible for partial credit only (50%)
Lines of code
https://github.com/reserve-protocol/protocol/blob/9ee60f142f9f5c1fe8bc50eef915cf33124a534f/contracts/plugins/assets/aave/StaticATokenLM.sol#L461-L482
Vulnerability details
Description
If for some reason the current contract reward token balance is lower than the rewards meant to be paid to
onBehalf
address, then this rewards can never be claimed.Impact
Lost of expected rewards
POC
StaticATokenLM::claimRewardsToSelf
, which are supposed to be 100 aReward tokensREWARD_TOKEN.balanceOf(address(this));
returns 80 insideStaticATokenLM::_claimRewardsOnBehalf
Mitigation steps
Assessed type
Other
The text was updated successfully, but these errors were encountered: