wise-foundation / lending-audit

5 stars 4 forks source link

[WSY-02S] Redundant Variable Assignments #98

Open vm06007 opened 1 year ago

vm06007 commented 1 year ago

WSY-02S: Redundant Variable Assignments

Type Severity Location
Gas Optimization WiseSecurity.sol:L510, L563, L618, L688, L735

Description:

The linked variables are assigned to redundantly to the default value of each relevant data type (i.e. uint256 assigned to 0, address assigned to address(0) etc.).

Example:

for (i = 0; i < len; ++i) {

Recommendation:

We advise the assignments to be safely omitted optimizing the codebase.

vm06007 commented 1 year ago

this should have been resolved in: https://github.com/wise-foundation/lending-audit/pull/51