The MoneyShelf::withdrawUSDC
function which is called by Laundrette::withdrawMoney
function burns the CrimeMoney
of the account arg passed using crimeMoney.burn()
and sends the usdc amount from that account to the msg.sender
but if the account owner already transfers his CrimeMoney
to any alt account then the burn call will always revert.
External users
and GangMembers
who donate money to the protocol can effectively shield themselves from withdrawl by godFather
PoC to show that godFather
cannot withdraw the usdc of accounts whose CrimeMoney
is already transferred to alt accounts before and after Emergency Migration.
prerequisites: For the following test to work add a new address address caponeBege = makeAddr("Capone Bege");
in the Base.t.sol
Having the crimeMoney.burn
in the withdraw function will always cause this issue.
It can be mitigated by overriding the transfer
function in CrimeMoney.sol
and adding relevant checks to it i.e transfers to non GangMembers
require a permisssion from GangMembers
or godFather
Another way it can be mitigated is to have the burn
in a seperate function,this way the godFather
can get the USDC first and can crimemoney.burn
later and if it reverts he can be sure that the user has shielded himself and can be dealt accordingly.
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.