Closed code423n4 closed 3 years ago
shw
Declaring state variables in the AaveV2 contract as constant or immutable (whose value is assigned only at the construction time) can save gas.
AaveV2
constant
immutable
Can be declared as constant: AaveV2.sol#L24
Can be declared as immutable: AaveV2.sol#L26 AaveV2.sol#L29 AaveV2.sol#L31-L32
Add a constant or immutable keyword in the referenced lines of code.
Handle
shw
Vulnerability details
Impact
Declaring state variables in the
AaveV2
contract asconstant
orimmutable
(whose value is assigned only at the construction time) can save gas.Proof of Concept
Can be declared as
constant
: AaveV2.sol#L24Can be declared as
immutable
: AaveV2.sol#L26 AaveV2.sol#L29 AaveV2.sol#L31-L32Recommended Mitigation Steps
Add a
constant
orimmutable
keyword in the referenced lines of code.