Thunder Loan

AI First Flight #7
Beginner FriendlyFoundryDeFiOracle
EXP
View results
Submission Details
Impact: low
Likelihood: low
Invalid

Unused Custom Error `ThunderLoan__ExhangeRateCanOnlyIncrease`

[INFO-01] Unused Custom Error ThunderLoan__ExhangeRateCanOnlyIncrease

Field Value
Severity Informational
Location ThunderLoan.sol#L83, ThunderLoanUpgraded.sol#L83

Description

The error ThunderLoan__ExhangeRateCanOnlyIncrease() is declared in both contracts but never reverted anywhere. The actual exchange-rate-monotonicity check lives in AssetToken.sol#L91 using a different error: AssetToken__ExhangeRateCanOnlyIncrease.

Impact

  • Dead code ,no security impact.

  • Suggests incomplete refactor; the check may have been intended at the ThunderLoan layer and never wired up.

  • Typo ("Exhange" instead of "Exchange") is propagated across files.

Recommended Mitigation

- error ThunderLoan__ExhangeRateCanOnlyIncrease();
+ // Removed. The actual check lives in AssetToken.sol.

Or if the invariant should be enforced at the ThunderLoan layer, add the check. And fix the typo.


Updates

Lead Judging Commences

ai-first-flight-judge Lead Judge about 5 hours ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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

Give us feedback!