code-423n4 / 2022-02-concur-findings

2 stars 0 forks source link

Mark ConvexStakingWrapper.addRewards as External #2

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Handle

Heartless

Vulnerability details

Impact

external visibility uses less gas than public visibility. addRewards is never called internally in this project so does not need public visibility. addRewards was public in the original source from convex because they called addRewards() internally in the initialize() function, which ConvexStakingWrapper does not have.

Proof of Concept

Line 93 in ConvexStakingWrapper.sol

Tools Used

Recommended Mitigation Steps

Change addRewards visibility to external.

GalloDaSballo commented 2 years ago

This will not save gas

0