code-423n4 / 2021-09-defiprotocol-findings

1 stars 0 forks source link

Cache the results of external calls #209

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

pauliax

Vulnerability details

Impact

You should cache the results of external calls when done in the same function multiple times and the result is not supposed to change between these calls, e.g. function handleFees calls factory.ownerSplit() twice. It would be more gas efficient to store the results in a local variable and re-use where necessary.

GalloDaSballo commented 2 years ago

Agree with the finding but am not happy with the submission making an example without link Would like either a link, the submission being for only one finding, or the submission being a list of all instances

GalloDaSballo commented 2 years ago

Duplicate of #43