PoolTogether TwabRewards contest - 0x421f's results

A protocol for no loss prize savings on Ethereum

General Information

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

PoolTogether

Findings Distribution

Researcher Performance

Rank: 21/25

Findings: 1

Award: $108.62

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: johnnycash

Also found by: 0x421f, cmichel, gpersoon, gzeon, harleythedog, kemmio, kenzo, sirhashalot

Labels

bug
duplicate
3 (High Risk)

Awards

108.6174 USDC - $108.62

External Links

Handle

0x421f

Vulnerability details

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

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter