In proxy pattern, the upgraded storage layout should follow the previous one. If not, it will lead to storage collision and several sensitive data will be override.
In the ThunderLoanUpgraded.sol
contract, the storage layout is the following format:
which is not coherent to the storage layout of ThunderLoan.sol
If logic contract is updated, the storage slot that stores the s_flashLoanFee
will be overrided by s_currentlyFlashLoaning
.
The value of s_flashLoanFee
will be incorrect and lead to wrong calculation.
Manual Review
Coherent to the previous storage layout and avoid adding or deleting new state variables.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.