code-423n4 / 2021-09-bvecvx-findings

0 stars 0 forks source link

Immutable variables #26

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Handle

pauliax

Vulnerability details

Impact

Variables that do not change can be marked as immutable. This greatly reduces gas cots. Examples of such variables are: ICvxLocker public LOCKER; uint256 MAX_BPS = 10_000; address public lpComponent; address public reward;

GalloDaSballo commented 3 years ago

I like that you showed me the variables, ty

GalloDaSballo commented 3 years ago

CORRECTION: The lpComponent and reward are set on initialize, because we use upgradeable contracts. Those variables CANNOT be set as immutable.

Agree on setting LOCKER and MAX_BPS as constants