Closed code423n4 closed 2 years ago
Tomio
the probability of address public curveToken; address public convexToken; address public convexPool; changing is small, so i think it's better to use immutable.
address public curveToken;
address public convexToken;
address public convexPool;
immutable
https://github.com/code-423n4/2022-01-yield/blob/main/contracts/ConvexStakingWrapper.sol#L41 https://github.com/code-423n4/2022-01-yield/blob/main/contracts/ConvexStakingWrapper.sol#L42 https://github.com/code-423n4/2022-01-yield/blob/main/contracts/ConvexStakingWrapper.sol#L42
add immutable
Duplicate of #42
Handle
Tomio
Vulnerability details
Impact
the probability of
address public curveToken;
address public convexToken;
address public convexPool;
changing is small, so i think it's better to useimmutable
.Proof of Concept
https://github.com/code-423n4/2022-01-yield/blob/main/contracts/ConvexStakingWrapper.sol#L41 https://github.com/code-423n4/2022-01-yield/blob/main/contracts/ConvexStakingWrapper.sol#L42 https://github.com/code-423n4/2022-01-yield/blob/main/contracts/ConvexStakingWrapper.sol#L42
Tools Used
Recommended Mitigation Steps
add
immutable