Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: low
Invalid

Reentrancy in Dussehra::withdraw()

Summary

The withdraw function in the Dussehra contract contains an external call, which can be exploited by attackers to reenter the function and perform multiple withdrawals. This vulnerability arises from the absence of the checks-effects-interactions pattern, which is crucial for preventing reentrancy attacks. The

Vulnerability Details

Function Affected: withdraw
Issue: Potential for reentrancy due to external calls without the use of the checks-effects-interactions pattern.
Severity: Critical. Reentrancy attacks can lead to significant financial losses by allowing attackers to drain contract funds.

Impact

Financial Loss: Attackers can repeatedly call the withdraw function to drain the contract's funds.

Tools Used

Manual Review

Recommendations

Implement the checks-effects-interactions pattern in the withdraw function to prevent reentrancy attacks. This pattern ensures that state changes occur before making external calls, thereby mitigating the risk of reentrancy.

Updates

Lead Judging Commences

bube Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Invalid - reentrancy in withdraw

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.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.