If the patron saint of mobsters is feeling kind and by some miracle there is all the USDC in the MoneyVault, the GodFather faces yet more challenges. The withdrawal of funds from the Vault is predicated on the logic within the withdrawUSDC
function, and sadly, this is identical to the MoneyShelf contract which checks the bank mapping balance for the calling account as well as requiring the burning of CrimeTokens, neither of which happens to have favourable values for the GodFather.
The MoneyVault contract has the same logic as the MoneyShelf when it comes to withdrawals. It burns an equivalent amount of CrimeTokens to release the USDC, as well as reducing the balance stored. Given the balance isn't even brought over, this is set to zero for the GodFather in the MoneyVault. This means the amount of USDC released is rather limited. Every attempt to remove any USDC that miraculously works its way into MoneyVault will result in the inevitable panic: arithmetic underflow or overflow
errors.
Severe. The USDC is locked up without the correct balance in the bank mapping and the right amount of CrimeTokens.
forge test to demonstrate (along with some help as this situation requires massaging to get to the situation where there is actual USDC in MoneyVault.
Turn yourself in. Your developers are either corrupt, stupid or hate you.
However if the GodFather has some coding-fu, then they could deploy a new MoneyVault contract with a proper init which removes the withdraw function and CrimeMoney.burn function in withdrawUSDC.
To pay homage and have at least some consistency with the framework itself, a permissioned
modifier should be added. There is a check for the executor already, and in this situation, engineering niceness is probably not high on the list of priorities but it would show a degree of class hitherto not evident within this organisation.
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.