Submitted by rvierdiiev, also found by MiniGlome
All prizes in the system should be claimed during the draw period. Anyone can call the claimPrizes function for any winner and prize. But the idea of protocol is to incentivize claim bots to do all claims instead of users. These should benefit from batching claims together in 1 call.
Also the Claimer contract is using vrgda which can increase/decrease fee for the claimer, depending of amount of already claimed prizes. That actually means, that in case not enough prizes are claimed in some point of time, then the fee will be increased to incentivize more bots.
So as bots will try to batch a lot of prize claims together, that means that they will spent a lot on gas. A malicious actor can see which prizes the bot is going to claim and front-run them with the last prize in the list. As a result, claiming will fail and the bot will face losses.
Another reason why a malicious actor can do that is to make vrgda to provide bigger fees. They can create a bot that will block claims of other bots with a big amount of claims in the batch, in order to wait and get better prices and claim those prize by themself and receive fees.
VsCode
In the case of if a price is already claimed, then you can return early from the PrizePool.claimPrize function and emit some event. In this case, bots will not receive fee for the already claimed prize and their tx will continue with other prizes in the batch.
Error
asselstine (PoolTogether) confirmed
Picodes (judge) commented:
PoolTogether mitigated:
Status: Mitigation confirmed. Full details in report from rvierdiiev, dirk_y and 0xStalin.
