curveToken , convexToken , convexpool , collateralVault , convexPoolId comment was used immutable, but actual code not using immutable. immutable can saving more gas
Recommended Mitigation Steps
address public curveToken;
address public convexToken;
address public convexPool;
address public collateralVault;
uint256 public convexPoolId;
changed to
address public immutable curveToken;
address public immutable convexToken;
address public immutable convexPool;
address public immutable collateralVault;
uint256 public immutable convexPoolId;
Handle
Funen
Vulnerability details
https://github.com/code-423n4/2022-01-yield/blob/main/contracts/ConvexStakingWrapper.sol#L41-L45
curveToken
,convexToken
,convexpool
,collateralVault
,convexPoolId
comment was usedimmutable
, but actual code not using immutable. immutable can saving more gasRecommended Mitigation Steps
changed to