code-423n4 / 2023-08-pooltogether-mitigation-findings

0 stars 0 forks source link

M-10 MitigationConfirmed #85

Open code423n4 opened 1 year ago

code423n4 commented 1 year ago

Lines of code

Vulnerability details

Original Issue

M-10 - PrizePool -> Winners wouldn't be able to claim prize correctly in claimPrize function

Details

In the previous implementation there was a risk of underflow when downcasting the returned value from the _computePrizeSize(), it returned a uint256 and in the _getTier() it was downcasted to uint96.

Mitigation

The fix for this issue was to refactor the dataype of the Tier.prizeSize variable, now, instead of being a uint96 it is a uint104, and all the places where this functions is used were also updated to work with the new datatype.

Conclusion

The implemented mitigation solves the original issue.

c4-judge commented 1 year ago

Picodes marked the issue as satisfactory

c4-judge commented 1 year ago

Picodes marked the issue as confirmed for report