Description: The EmergencyMigration::migrate function is supposed to change the MoneyShelf contract to a MoneyVault contract, and erase the traces of the old Kernel, USDC and CrimeMoney addresses by setting them to address(0).
The MoneyVault contract does not allow anyone to deposit funds in it, and only the address of Godfather, kernel.executor() can be set as the receiver of the withdrawals. However, the old Module contracts are not compatible with the new Policy contract and the funds will be stuck in the MoneyVault contract forever. When taking into consideration that the new Kernel address is set to address(0) during migration, this will make it impossible to add the new contract in the old Kernel after migration.
Impact: No one can withdraw funds from the protocol anymore, not even Capo di tutti capi.
Proof of Concepts: Place the following test into the EmergencyMigration.t.sol file.
Test output
Recommended mitigation: For backward compatibility purposes, the new MoneyVault contract has to be granted permission to access the old Module contracts during migration. In doing so, the mob won't be able to clear their traces. The logic here needs to be rewritten.
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.