TwentyOne

First Flight #29
Beginner FriendlyGameFiFoundrySolidity
100 EXP
View results
Submission Details
Severity: medium
Valid

There is no initial deposit or funding mechanism

Summary

The contract is designed to pay out 2 ETH for winning games but only accepts 1 ETH deposits through startGame(). Without additional ETH funding mechanisms (like receive() or payable constructor), the contract will eventually become insolvent and unable to pay winners.

Impact

  • Contract will fail to pay winners once balance drops below 2 ETH

  • Players could lose their 1 ETH deposits without possibility of winning

Recommendations

  • Add funding mechanism like payable constructor or receive function

+ constructor() payable {}
+ receive() external payable {}
Updates

Lead Judging Commences

inallhonesty Lead Judge 11 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Contract Lacks Mechanism to Initialize or Deposit Ether

Support

FAQs

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