The FeeCollector::claimRewards
function does not check whether the contract has a sufficient balance of raacToken
before attempting a transfer. If the contract's balance is lower than the pendingReward
, the transaction will fail, preventing users from claiming their rewards.
The function assumes that the contract always has enough tokens to fulfill reward claims. However, if the contract's balance is insufficient due to mismanagement, external withdrawals, or untracked transfers, the safeTransfer
call may fail. This could leave users unable to claim their rewards and potentially disrupt the reward distribution system.
Example Scenario:
A user calls claimRewards
to claim 1000 tokens.
The contract calculates pendingReward = 1000
but only has 500
tokens in its balance.
The safeTransfer
call fails, reverting the transaction and preventing the user from claiming their rewards.
Users may be unable to claim their rewards if the contract lacks sufficient funds.
The reward claim process will be disrupted for all users until the contract is funded with sufficient tokens.
Manual code review
To mitigate this vulnerability, add a check to ensure that the contract has sufficient balance of raacToken before attempting to transfer 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.