Reentrancy in the function Dussehra::withdraw
The function
Contains a reentrancy issue. totalAmountGivenToRam is updated after the call function. Therefore, an atacker could reenter the function and get all the funds of the contract before updating totalAmountGivenToRam to 0.
All the funds of the contract could be drained
Manual review
Change the order of the calls:
The `withdraw` function sends the given amount to Ram. If the attacker calls the `withdraw` function again before the state variable is changed, the function will revert because there are no more funds in the contract. This reentrancy has no impact for the protocol. It is recommended to follow the CEI pattern, but this is informational.
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.