The TwentyOne contract directly transfers ETH to winners in the call() function. If this transfer fails, the entire transaction reverts, forcing players to call again with different random values that might result in a loss. The contract should separate game resolution from payment distribution.
Unsafe Direct Transfer:
Game result and ETH transfer are coupled in the same transaction
Transfer failure reverts the entire game result
Players must replay hands with new randomness if transfer fails
Players can lose legitimate winnings if transfer fails
Forced replay of winning hands can turn into losses
Contract does not maintain record of owed payouts
Players might lose trust if winnings aren't received
Manual Code Review
Implement a withdrawal pattern:
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.