Closed code423n4 closed 2 years ago
throttle
Gas savings
Assigning default value costs unnecessary gas: ConvexStakingWrapper._calcCvxIntegral() ConvexStakingWrapper._calcRewardIntegral() ConvexStakingWrapper._checkpointAndClaim() ConvexStakingWrapper.earned() ConvexYieldWrapper.removeVault() ConvexYieldWrapper._getDepositedBalance()
Manual review
Consider rewriting
for (uint256 i = 0; i < k; i++) { ... }
to
for (uint256 i; i < k; i++) { ... }
dup of #15
Duplicate of #56, better
Handle
throttle
Vulnerability details
Impact
Gas savings
Proof of Concept
Assigning default value costs unnecessary gas: ConvexStakingWrapper._calcCvxIntegral() ConvexStakingWrapper._calcRewardIntegral() ConvexStakingWrapper._checkpointAndClaim() ConvexStakingWrapper.earned() ConvexYieldWrapper.removeVault() ConvexYieldWrapper._getDepositedBalance()
Tools Used
Manual review
Recommended Mitigation Steps
Consider rewriting
to