code-423n4 / 2021-05-nftx-findings

1 stars 0 forks source link

immutable variables #37

Closed code423n4 closed 3 years ago

code423n4 commented 3 years ago

Handle

paulius.eth

Vulnerability details

Impact

Marking variables that do not change as 'immutable' greatly reduces gas costs. Some examples where variables can be marked as immutable: contract NFTXLPStaking variable rewardDistTokenImpl. contract NFTXVaultFactoryUpgradeable variable prevContract. contract NFTXVaultUpgradeable variable vaultId.

Recommended Mitigation Steps

Mark such variables as 'immutable'.

0xKiwi commented 3 years ago

We cannot use immutable since we dont use constructors.

cemozerr commented 3 years ago

Marking this as an invalid issue.