Beginner FriendlyFoundryDeFiOracle
100 EXP
View results
Submission Details
Severity: high
Invalid

Potential vulnerable to readonly-reentrancy function

Summary

Potential vulnerable to readonly-reentrancy function

Vulnerability Details

ThunderLoan.isCurrentlyFlashLoaning(IERC20) (src/protocol/ThunderLoan.sol#268-270):
State variables read that were written after the external call(s):

  • ThunderLoan.s_currentlyFlashLoaning (src/protocol/ThunderLoan.sol#99) was read at s_currentlyFlashLoaning[token] (src/protocol/ThunderLoan.sol#269)

This variable was written at (after external call):

  • s_currentlyFlashLoaning[token] = true

  • s_currentlyFlashLoaning[token] = false (src/protocol/ThunderLoan.sol#216)

Impact

The Token might be minted wrongly as a rewards due to the reentrancy attack.

Tools Used

Slither, Manual Review

Recommendations

Recommend adding the nonReentrant modifer

Updates

Lead Judging Commences

0xnevi Lead Judge
over 1 year ago
0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Vague generalities

Support

FAQs

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