when lets say the defender
wins the RapBattle
a transaction will occur credToken.transfer(_defender, defenderBet);
which the challenger will see "FrontRun". And can transfer The cred tokens to another address, before credToken.tranferFrom(msg.sender, _defender, _credBet)
happens. and vice versa
The protocol is susceptible to MEV attacks. where the defender can withdraw the cred token, before challenger is paid or vice versa.
Users can not receive their prize even when they win.
Refactor the code add a function of collecting the credTokens in a vault and locking BEFORE winner is chosen, transferring the coins then oppening the vault again.
You can use a private mempool such as FlashbotProtection
.
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.