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

0 stars 0 forks source link

Set variables in `Zapper.sol` as immutable #5

Closed code423n4 closed 3 years ago

code423n4 commented 3 years ago

Handle

pmerkleplant

Vulnerability details

Impact

The variables admin, lendingPool, aaveRefCode and allowedSpenders are all set in the constructor and never changed again. Declaring them as immutable saves gas.

Ivshti commented 3 years ago

fixed in https://github.com/AmbireTech/adex-protocol-eth/commit/03b6cf72c4c167b320133bc8ab0bd2d0e3ec5f65

except allowedSpenders cannot be immutable cause it's a mapping

GalloDaSballo commented 3 years ago

Duplicate of #29