code-423n4 / 2022-01-yield-findings

1 stars 0 forks source link

can save gas using `immutable` #124

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

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 use immutable.

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

iamsahu commented 2 years ago

42 #48 #81 #84 #103 #120 #124 #130

alcueca commented 2 years ago

Duplicate of #42