MockFlashLoanReceiver.sol and AssetToken.sol have a modifier onlyThunderLoan which restricts the calling of certain functions to only the ThunderLoan contract, including executeOperation in the former and mint and burn in the latter. onlyThunderLoan was set to the address for ThunderLoan.sol when MockFlashLoanReceiver.sol and AssetToken.sol were initially deployed, and there is no way to upgrade this address when ThunderLoanUpgraded.sol is deployed. executeOperation is critical for executing flash loans and mint and burn are critical for deposits and redemptions. As a result of this, you have bricked your entire protocol.
Here in AssetToken.sol is the modifier onlyThunderLoan as well as the constructor where ThunderLoan's address is set permanently. It is the same in MockFlashLoanReceiver.sol. In this example, the address is labeled immutable - you don't want this to be immutable if you plan to upgrade your contract.
The core functions of your protocol are bricked. Whenever someone tries to call deposit, redeem, or flashloan, it will revert.
Manual review
Make address thunderLoan a state variable and allow onlyOwner to set ThunderLoan's address in a function like the following. The owner should stay the same from the initial contract to the next.
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.