Historically, we've had functionality to collect rewards on a protocol-by-protocol level using the sweep function and a set of pre-configured sweepTargets. This increased the scope governance's responsibility and is incompatible with the recent changes made to the HyperdriveFactory.
Rather than having a sweep function, it would be better to simply use a custom ERC4626 vault that delegates all functionality to a target vault and has it's own sweep function that can sweep collected rewards to Hyperdrive's governance or fee collector. This architecture decreases Hyperdrive's attack surface and is a more flexible way of solving the problem.
Historically, we've had functionality to collect rewards on a protocol-by-protocol level using the
sweep
function and a set of pre-configuredsweepTargets
. This increased the scope governance's responsibility and is incompatible with the recent changes made to theHyperdriveFactory
.Rather than having a
sweep
function, it would be better to simply use a custom ERC4626 vault that delegates all functionality to a target vault and has it's ownsweep
function that can sweep collected rewards to Hyperdrive's governance or fee collector. This architecture decreases Hyperdrive's attack surface and is a more flexible way of solving the problem.