TwentyOne

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

In startGame function Player can send more ethers than 1 ethers.

Summary

The startGame function is designed to initiate a new game for the player.

To start the game, the player is required to send 1 Ether. However, the current check in place permits sending more than 1 Ether.

Vulnerability Details

In function startGameis require statement to check value sended by Player. Is possoble to send more ethers than 1.

require(msg.value >= 1 ether, "not enough ether sent");

Lack of a withdrawal function may result in funds exceeding 1 Ether being locked in the smart contract.

Impact

A player can send more than 1 Ether, but there is no way to withdraw the excess amount.

Tools Used

manual review

Recommendations

Please consider change to equal

require(msg.value == 1 ether, "not enough ether sent");
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.