address public curveToken;
address public convexToken;
address public convexPool;
address public collateralVault;
uint256 public convexPoolId;
Considering that curveToken, convexToken, convexPool, and convexPoolId will never change, changing them to immutable variables instead of storages variable can save gas.
Handle
WatchPug
Vulnerability details
https://github.com/code-423n4/2022-01-yield/blob/e946f40239b33812e54fafc700eb2298df1a2579/contracts/ConvexStakingWrapper.sol#L41-L45
Considering that
curveToken
,convexToken
,convexPool
, andconvexPoolId
will never change, changing them to immutable variables instead of storages variable can save gas.Other examples include:
https://github.com/code-423n4/2022-01-yield/blob/e946f40239b33812e54fafc700eb2298df1a2579/contracts/Cvx3CrvOracle.sol#L24-L25
cvx3CrvId
andethId
inCvx3CrvOracle.sol
.