Sparkn

CodeFox Inc.
DeFiFoundryProxy
15,000 USDC
View results
Submission Details
Severity: medium

There should be a limitation of owners length and totalAmount of ERC20 token

Summary

if the total amount of ERC20 tokens is little and participants is many, nobody may get rewards.

Vulnerability Details

here is a scenario,

  • winners length is 5,

  • percentages is [1,1,1,1,1],

  • totalAmount = 5,
    so that everyone only can be paid 1$, the erc20.safeTransfer may failed according to the transfer gas fee.

Impact

a malicious orginazer may set a contest that with little award

Tools Used

Recommendations

set limitation to minimize award and maximum winners

Support

FAQs

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