code-423n4 / 2021-10-ambire-findings

0 stars 0 forks source link

Immutable variables #61

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

pauliax

Vulnerability details

Impact

'immutable' greatly reduces gas costs. There are variables that do not change so they can be marked as immutable to greatly improve the gas costs. Examples of such variables are admin, aaveRefCode in contract WalletZapper, or creator in IdentityFactory.

Recommended Mitigation Steps

Apply the immutable keyword to these state variables.

Ivshti commented 2 years ago

dupe: #5

GalloDaSballo commented 2 years ago

Duplicate of #29