Submitted by pmerkleplant, also found by tabish
The function reinvest in the veCVXStrategy always returns 0 as the return variable reinvested is never updated.
The function is onlyGovernance and the return value probably does not matter if the caller is a multi-sig. However, if a protocol is set as onlyGovernance the faulty return value would have to be ignored by the caller to not transition into an incorrect state.
The variable reinvested is declared as return variable (line 400) but not updated to reflect the actual amount reinvested which is saved in variable toDeposit.
Therefore always the default value is returned (0).
Add reinvested = toDeposit; after line 412.
GalloDaSballo (BadgerDAO) confirmed:
