Declare state variables as immutable #162
Labels
bug
Something isn't working
G (Gas Optimization)
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
p4st13r4
Vulnerability details
Impact
In
WJLP.sol
, state variablesJLP
andJOE
are initialized in the constructor and never reassigned again. Thus, they can be declaredimmutable
rather thanconstant
in order to save gasProof of Concept
https://github.com/code-423n4/2021-12-yetifinance/blob/main/packages/contracts/contracts/AssetWrappers/WJLP/WJLP.sol#L41
Tools Used
Editor
The text was updated successfully, but these errors were encountered: