Some providers distribute rewards for users supplying or borrowing from them. But Fuji vaults doesn't have any function to recover these reward tokens. So the rewards claimed to the vaults will be wasted.
CompoundV2 protocol distribute COMP tokens to users for each block they are supplying to or borrowing from the protocol. Users can call the Comptroller’s claimComp method at any time to transfer COMP accrued to their address. But even vaults of Fuji protocol can claim COMP rewards, these rewards will be stuck forever.
Similarly, CompoundV3 distribute their rewards (can be any ERC20 token) for users via contract CometRewards. But there is no way to claim them out of vault contracts.
This feature will be implemented at a later stage. The team is aware of harvesting rewards, and a pending issue was opened in September 2022. Refer to #66
Title
Rewards token of vaults from providers are wasted
Affected smart contract
https://github.com/Fujicracy/fuji-v2/blob/1b939ec84af137db430fc2aa1b4c6f15e5254003/packages/protocol/src/providers/mainnet/CompoundV2.sol https://github.com/Fujicracy/fuji-v2/blob/1b939ec84af137db430fc2aa1b4c6f15e5254003/packages/protocol/src/providers/mainnet/CompoundV3.sol https://github.com/Fujicracy/fuji-v2/blob/1b939ec84af137db430fc2aa1b4c6f15e5254003/packages/protocol/src/providers/mainnet/AaveV2.sol https://github.com/Fujicracy/fuji-v2/blob/1b939ec84af137db430fc2aa1b4c6f15e5254003/packages/protocol/src/providers/arbitrum/AaveV3Arbitrum.sol
Description
Some providers distribute rewards for users supplying or borrowing from them. But Fuji vaults doesn't have any function to recover these reward tokens. So the rewards claimed to the vaults will be wasted.
Proof of concept
PR: https://github.com/Fujicracy/fuji-v2/pull/335
Recommendation
Add a function like
sweepToken
into vault contracts, or create a mechanism to claim rewards from providers.