Upgraded Q -> 2 from #11 [1685422294441] #41
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
duplicate-30
satisfactory
satisfies C4 submission criteria; eligible for awards
Judge has assessed an item in Issue #11 as 2 risk. The relevant finding follows:
L-03:getReward() It is recommended to add balance>0 before executing transfer
getReward() will do a transfer on rewaredsToken Since the rewards are from convex, we can't be sure what kind of token it is. we can't be sure what kind of token it is, currently, some tokens will fail if the transfer amount=0 This will result in other tokens not being transferred out as well
Suggest adding non-zero judgment
function getReward(bool claimExtras) external {
IBaseRewardPool(cvxPoolInfo.rewards).getReward(
address(this),
claimExtras
);
if (rewardsRecipient != address(0)) {
for (uint i = 0; i < rewardTokens.length; i++) {
uint256 balance = IERC20(rewardTokens[i]).balanceOf(
address(this)
);
The text was updated successfully, but these errors were encountered: