The claimRewards function in the provided Solidity contract does not implement proper checks to prevent users from making multiple claims, potentially allowing malicious actors to exploit the contract's functionality by repeatedly calling the function.
The claimRewards function allows users to claim their rewards for each accepted token without enforcing restrictions on the number of claims. This lack of validation opens the possibility for a malicious actor to repeatedly call the function, potentially draining resources or manipulating the contract's behavior.
The lack of proper checks in the claimRewards function allows malicious users to exploit the contract by making multiple claims, potentially draining resources intended for other legitimate users. This could lead to an imbalance in the distribution of rewards and affect the fairness of the contract.
Manual
Implement a check to ensure one-time claiming for each user. Maintain a mapping that tracks whether a user has already claimed rewards, and include a condition in the claimRewards function to prevent multiple claims from the same address.
This mitigation ensures that each user can only claim rewards once, preventing the possibility of malicious actors making multiple claims and maintaining fairness in the contract's reward distribution.
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.