Open code423n4 opened 2 years ago
p4st13r4
In WJLP.sol, state variables JLP and JOE are initialized in the constructor and never reassigned again. Thus, they can be declared immutable rather than constant in order to save gas
WJLP.sol
JLP
JOE
immutable
constant
https://github.com/code-423n4/2021-12-yetifinance/blob/main/packages/contracts/contracts/AssetWrappers/WJLP/WJLP.sol#L41
Editor
@LilYeti: Again similar to #10 and #148 and #132 but different variables
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