Closed code423n4 closed 2 years ago
throttle
Gas savings
Using pre-increment instead of post-increment can save gas in following places:
ConvexStakingWrapper.addRewards() ConvexStakingWrapper._calcCvxIntegral() ConvexStakingWrapper._calcRewardIntegral() ConvexStakingWrapper._checkpointAndClaim() ConvexStakingWrapper.earned() ConvexYieldWrapper.removeVault() ConvexYieldWrapper._getDepositedBalance()
Manual review
Change i++ to ++i
i++
++i
dup of #14
Handle
throttle
Vulnerability details
Impact
Gas savings
Proof of Concept
Using pre-increment instead of post-increment can save gas in following places:
Tools Used
Manual review
Recommended Mitigation Steps
Change
i++
to++i