In the current implementation of the CommunityVCS contract, the claimRewards function allows the contract to collect staking rewards from community vaults. However, there is no functionality to withdraw or transfer these collected tokens, causing the tokens to be locked within the contract without a mechanism for external retrieval.
Function Affected: claimRewards
Description: The claimRewards function successfully claims staking rewards from the specified vaults, transferring the rewards to the CommunityVCS contract. However, the contract does not have a function that allows the owner or any authorized party to withdraw or transfer these rewards once collected. This creates a situation where the claimed tokens remain locked within the contract indefinitely.
Severity: Medium
Effect: The rewards claimed by the claimRewards function are locked within the CommunityVCS contract. Users or stakeholders of the contract are unable to access or utilize the claimed tokens, rendering them unusable until this functionality is added. This could lead to a loss of liquidity and a decrease in the contract's utility for stakeholders.
Potential Loss: The full amount of rewards claimed across all vaults will be inaccessible if this issue remains unresolved.
To resolve this issue, consider implementing the following:
Withdraw Functionality: Add a withdraw function that allows the contract owner or an authorized role to transfer the claimed rewards to an external address. This function could look like:
Authorization Checks: Ensure that only the contract owner or another authorized party can call the withdrawRewards function to prevent unauthorized access to the claimed rewards.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.