The TwentyOne contract fails to implement special handling for natural Blackjack (an initial two-card hand totaling 21). In standard Blackjack, a natural 21 automatically wins against any non-Blackjack hand, even if the dealer also reaches 21 with more cards. The current implementation incorrectly treats a natural 21 the same as any other 21, allowing the dealer to tie or win with a non-natural 21.
Location: src/TwentyOne.sol
https://github.com/Cyfrin/2024-11-TwentyOne/blob/main/src/TwentyOne.sol#L89-L99
The startGame() function doesn't check for Blackjack after initial deal:
The call() function treats all 21s the same:
In standard Blackjack:
Natural Blackjack (21 with first two cards) automatically wins against any non-Blackjack hand
Only dealer Blackjack can tie player Blackjack
This is a fundamental rule affecting game fairness and strategy
Game Fairness
Violates standard Blackjack rules
Players can unfairly lose or tie when they should win
Natural 21 incorrectly treated same as multi-card 21
Economic Impact
Players lose guaranteed wins when dealer hits to 21
Affects every natural Blackjack hand dealt
Significantly reduces player expected value
Strategic Impact
Players cannot implement standard Blackjack strategy
Changes optimal betting patterns
Affects player decisions on insurance and splitting
Manual Code Review
Standard Blackjack Rule Comparison
Add Natural Blackjack Detection:
Update Win Conditions:
Add New Event:
Naturals. If a player's first two cards are an ace and a "ten-card" (a picture card or 10), giving a count of 21 in two cards, this is a natural or "blackjack." If any player has a natural and the dealer does not, the dealer immediately pays that player one and a half times the amount of their bet.
Naturals. If a player's first two cards are an ace and a "ten-card" (a picture card or 10), giving a count of 21 in two cards, this is a natural or "blackjack." If any player has a natural and the dealer does not, the dealer immediately pays that player one and a half times the amount of their bet.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.