TwentyOne

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

A player can call the `TwentyOne::drawCard` function without any check if its player's turn

Summary

The typical rule of black jack states that at the player's turn he/she can only draw one card at a time but here the function drawCard can be called multiple times without waiting for dealer's turn to choose their strategy

Vulnerability Details

A malicious user can call the TwentyOne::drawCarduser multiple times.

Impact

=>Breakage of basic rule of Black Jack and also can increase gas cost becuase of increase in Interations from the `playersHand` value

Tools Used

Recommendations

Adding checks to the function, weather if its dealer's turn or player's turn, Preventing multiple calls to the game.

Updates

Lead Judging Commences

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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