_directlyContributedReserve doesn't work as expected
Summary
DirectlyContributedReserve will always recycle into the next draw
Vulnerability Detail
Impact
Whenever prize is being claimed there is a chance that more prizes will be claimed than the amount of prize sizes. For this reason, to not leave users without a prize tokens are being taken from reserves.
For this reason _directlyContributedReserve exist, but the protocol team will need to call it every draw or create a bot that will do it every draw due to the fact that previously reserve is being recycled into the next draw here, so that code above will never is executed.
volodya
high
_directlyContributedReserve doesn't work as expected
Summary
DirectlyContributedReserve will always recycle into the next draw
Vulnerability Detail
Impact
Whenever prize is being claimed there is a chance that more prizes will be claimed than the amount of prize sizes. For this reason, to not leave users without a prize tokens are being taken from reserves.
TieredLiquidityDistributor.sol#L381
For this reason _directlyContributedReserve exist, but the protocol team will need to call it every draw or create a bot that will do it every draw due to the fact that previously reserve is being recycled into the next draw here, so that code above will never is executed.
src/DrawManager.sol#L354
Code Snippet
Tool used
Manual Review
Recommendation
I think it should look like this, so users will get their prizes if too many winners happen