code-423n4 / 2021-11-badgerzaps-findings

0 stars 0 forks source link

Gas optimization: Unnecessary ops #78

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Handle

gzeon

Vulnerability details

Proof of Concept

https://github.com/Badger-Finance/badger-ibbtc-utility-zaps/blob/6f700995129182fec81b772f97abab9977b46026/contracts/IbbtcVaultZap.sol#L158 depositAmounts[i] += _amounts[i]; can be depositAmounts[i] = _amounts[i]; instead

GalloDaSballo commented 2 years ago

Agree with the finding, we can just use =