Platform: Code4rena
Start Date: 09/12/2021
Pot Size: $25,000 USDC
Total HM: 12
Participants: 25
Period: 4 days
Judge: LSDan
Total Solo HM: 4
Id: 64
League: ETH
Rank: 21/25
Findings: 1
Award: $108.62
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: johnnycash
Also found by: 0x421f, cmichel, gpersoon, gzeon, harleythedog, kemmio, kenzo, sirhashalot
0x421f
So we are using uint256 to store 1/0 if that epoch is being claimed or not uint256(1) is our base, so 255 is max limit we have
now if someone creates a promotion with >255 epochs in epochs > 255 , it will revert with "TypeError : Invalid Rational Number" (Copied from remix. I suppose its due to overflow)
Hence there is no chance of cycle, or someone claiming funds beforehand or on repeat. No funds are at risk, but its bad UX for both user and creator now only option creator would have is cancelPromotion and create new
Hence imo We should restrict it on top only at time of creation and extension ie. noOfEpochs <= 255
Thanks
#0 - PierrickGT
2021-12-13T22:30:18Z
Will be fixed with this issue: https://github.com/code-423n4/2021-12-pooltogether-findings/issues/3