code-423n4 / 2022-01-insure-findings

2 stars 0 forks source link

Immutable variables #328

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

defsec

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 gast costs.

Proof of Concept

  1. For instance : https://github.com/code-423n4/2022-01-insure/blob/19d1a7819fe7ce795e6d4814e7ddf8b8e1323df3/contracts/Vault.sol#L27

Tools Used

Code Review

Recommended Mitigation Steps

Mark variables as immutable.

oishun1112 commented 2 years ago

https://github.com/code-423n4/2022-01-insure-findings/issues/30

0xean commented 2 years ago

dupe of #72