code-423n4 / 2023-05-xeth-findings

0 stars 0 forks source link

Upgraded Q -> 2 from #11 [1685422294441] #41

Closed c4-judge closed 1 year ago

c4-judge commented 1 year ago

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) );

c4-judge commented 1 year ago

kirk-baird marked the issue as duplicate of #30

c4-judge commented 1 year ago

kirk-baird marked the issue as satisfactory