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

Contracts storage layout can be corrupted on upgradeable contracts

Summary

Vulnerability Details

In the new ThunderLoanUpgraded, the storage layout can become corrupted. 's_feePrecision' has been removed and is now a constant. Constant variables do not occupy storage slots. Therefore, in the new layout, 's_flashLoanFee' will occupy the place of 's_feePrecision,' and 's_currentlyFlashLoaning' will take the place of 's_flashLoanFee.

Impact

Tools Used

Recommendations

Consider checking whether there were changes in the storage layout before upgrading a contract by saving the storage layout of the implementation contract’s previous version and comparing it with the storage layout of the new one.

Updates

Lead Judging Commences

0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

storage collision on upgrade

Support

FAQs

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