Missing input validation in goOnStageOrBattle
function leads to DOS
User can input 0
in _credBet
parameter in goOnStageOrBattle
function and become defender. This will force the challenger to also bet 0 credTokens for the battle due to below line.
Battles with 0 credTokens as totalPrize is same as no battle as without bets, battle loses it's purpose.
Attacker can take advance of this to front-run every time a battle is completed to become defender with 0 credToken bet.
Attacker can front-run every time a battle is completed to become defender with 0 credToken bet. As battles are the main functionality of RapBattle
contract, attacker can DOS the contract to make battle meaningless.
Manual Review
Add the below code in goOnStageOrBattle
function -
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.