You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rewardData[_rewardsToken].ve3Token,
rewardData[_rewardsToken].ve3TokenStaking,
rewardData[_rewardsToken].veAssetDeposits.
Since the calls are made inside a for loop, this saves around 3100-32*3=282 gas per iteration.
rewardData[_rewardsToken].ve3Token,
rewardData[_rewardsToken].ve3TokenStaking,
rewardData[_rewardsToken].veAssetDeposits.
Since the calls are made inside a for loop, this saves around 3100-32*3=282 gas per iteration.
rewardTokenInfo[_rewardToken].veAssetDeposits,
rewardTokenInfo[_rewardToken].ve3Token,
rewardTokenInfo[_rewardToken].ve3TokenRewards
They are all called inside a for loop, so this will save a lot of gas.
The if statement here, https://github.com/code-423n4/2022-05-vetoken/blob/2d7cd1f6780a9bcc8387dea8fecfbd758462c152/contracts/ExtraRewardStashV3.sol#L87 is redundant. You could simply assign tokenCount to i and save 100 gas.
There is some redundancy in the claimRewards function.
https://github.com/code-423n4/2022-05-vetoken/blob/2d7cd1f6780a9bcc8387dea8fecfbd758462c152/contracts/ExtraRewardStashV1.sol#L77 to line 81 could be rewritten as:
Thus replacing the two state variable reads to memory reads. It saves gas and increases code readability.
The text was updated successfully, but these errors were encountered: