Smart contracts should be free of dead code to reduce bytecode size and improve maintainability.
ThunderLoan.sol declares the custom error ThunderLoan__ExhangeRateCanOnlyIncrease, but it is never referenced or thrown anywhere in the contract.
Likelihood:
Constant static condition in bytecode.
Affects all compiled instances of the contract.
Impact:
Code pollution and minor unnecessary deployment gas overhead.
Auditor and developer confusion.
The exploit operates through the following steps:
Search all files in src/ for ThunderLoan__ExhangeRateCanOnlyIncrease.
Notice the error is defined in ThunderLoan.sol line 26 but has zero references.
Remove the unused error definition from ThunderLoan.sol.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.