MyCut

AI First Flight #8
Beginner FriendlyFoundry
EXP
View results
Submission Details
Impact: low
Likelihood: low
Invalid

L-5: createContest validates nothing

Description

totalRewards is never checked against sum(rewards): underfunding bricks later claims (first-come-first-served loss); overfunding strands excess. players.length != rewards.length unchecked: extra rewards silently ignored. An empty players array passes creation, then closePot reverts with division-by-zero forever → funded tokens locked. fundContest(index) has no bounds check (owner-only).

Impact

Underfunded contests lose claims; overfunded or empty-player contests lock tokens permanently.

Recommended Mitigation

require(players.length == rewards.length && players.length > 0) and require(totalRewards == sum(rewards)).

Updates

Lead Judging Commences

ai-first-flight-judge Lead Judge about 3 hours ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!