An attacker can execute a Denial of Service (DoS) attack on all `PerformUpkeep` calls by sending a dust amount of tokens (To ensure that new reward is less than the reward threshold) to a splitter. This causes `Newreward` to be greater than 0 but less than the threshold, resulting in a DoS for subsequent `PerformUpkeep` calls
`checkUpkeep` calculates whether `PerformUpkeep` should be triggered. Here is the relevant part of the code:
If `Newreward` is less than 0 or greater than or equal to the reward threshold, the upkeep is triggered.
However, an attacker can exploit this by donating a small dust amount of `lst` tokens to just one splitter. This ensures that `newRewards` is greater than 0 but less than the threshold after we have checked the checkupkeep.
In the following code, `performUpkeep` loops through each splitter, but if any splitter has insufficient rewards (less than the threshold), it reverts the entire process:
In this case, the attacker can cause the `PerformUpkeep` to revert by ensuring that the rewards in one of the splitters are less than the threshold, causing the entire `PerformUpkeep` call to fail. This can be done by sending a small amount of tokens to just one splitter.
This vulnerability allows an attacker to DoS all `PerformUpkeep` calls by sending a dust amount of tokens. By exploiting this, the attacker can prevent all maintenance and reward splitting, severely impacting the functionality of the system.
Manual Code Review
1. **Error Handling in `PerformUpkeep`**: Implement `try/catch` blocks to handle failed splitter calls without reverting the entire `PerformUpkeep` process. This will ensure that even if one splitter fails due to insufficient rewards, the other splitters can still proceed with reward splitting.
2. **Manual Split Rewards Handling**: If a call to a splitter fails, emit an event logging the failure and attempt to call `splitRewards` manually later as this was created to handle cases where the limits should be bypassed. This would prevent a single splitter with insufficient rewards from causing the whole process to revert.
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.