TwentyOne

First Flight #29
Beginner FriendlyGameFiFoundrySolidity
100 EXP
View results
Submission Details
Severity: low
Invalid

Lack of Restriction on Game Fee

Summary

The startGame function accepts any msg.value greater than or equal to 1 ether, but it does not restrict or return excess funds.

Vulnerability Details

The function allows players to send more than the required 1 ether to start the game, but it does not handle or refund the excess amount. This could lead to players accidentally overpaying.

Impact

Excess funds could be locked in the contract, resulting in a poor user experience and potentially causing a loss of funds for the players.

Tools Used

Manual Code Review

Recommendations

Ensure that the msg.value is strictly 1 ether. If any excess is sent, it should be refunded to the player immediately.

Updates

Lead Judging Commences

inallhonesty Lead Judge 11 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

[INVALID] User mistake, too much ETH sent

Support

FAQs

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