There are places where the same storage variable is accessed multiple times in the same function. It would be more gas efficient to cache these variables and re-use them where necessary. E.g. function addStrategy accesses _vaultDetails[_vault] 5 times. Similarly with function withdrawAll and other functions.
Handle
pauliax
Vulnerability details
Impact
There are places where the same storage variable is accessed multiple times in the same function. It would be more gas efficient to cache these variables and re-use them where necessary. E.g. function addStrategy accesses _vaultDetails[_vault] 5 times. Similarly with function withdrawAll and other functions.
Recommended Mitigation Steps
Cache storage access and reuse variables.