The MyStrategy.RewardsCollected event lacks of indexed parameter that help offchain event filtering for better analysis. It is avisable to index a relevant parameter within that event to help with offchain services event filtering.
Calculating the _claim.length once before looping instead of performing the calculation once each loop is done & using ++i, helps saving gas while looping.
L: EVENT LACKS OF INDEXED PARAMETERS
https://github.com/Badger-Finance/vested-aura/blob/d504684e4f9b56660a9e6c6dfb839dcebac3c174/contracts/MyStrategy.sol#L51
The
MyStrategy.RewardsCollected
event lacks of indexed parameter that help offchain event filtering for better analysis. It is avisable to index a relevant parameter within that event to help with offchain services event filtering.GAS: SAVE GAS WHILE FOR LOOPING
https://github.com/Badger-Finance/vested-aura/blob/d504684e4f9b56660a9e6c6dfb839dcebac3c174/contracts/MyStrategy.sol#L299 https://github.com/Badger-Finance/vested-aura/blob/d504684e4f9b56660a9e6c6dfb839dcebac3c174/contracts/MyStrategy.sol#L317
Calculating the
_claim.length
once before looping instead of performing the calculation once each loop is done & using++i
, helps saving gas while looping.