origin-dollar
origin-dollar copied to clipboard
Morpho Aave strategy gas savings
- [ ] withdraw the underlying, eg WETH, directly to vault or user instead of withdrawing the underlying to the strategy contract and then transferring to the vault or user. This uses Morpho's withdraw function with
_receiveroverride. - [ ]
depositAllandwithdrawAllfor loop optimization to avoid SLOADs on each loop - [ ] storage variables like
vaultAddressthat can never be changed and read on most functions should be immutable