CrimeMoney and USDC tokens have different decimal precision which in not taken into account in the protocol.
Consequently, CrimeMoney is not pegged 1:1 to USDC.
Functions MoneyShelf::depositUSDC, MoneyShelf::withdrawUSDC and MoneyVault::withdrawUSDC mint and burn CrimeMoney like it had the same decimal precision as USDC, see e.g.
Here, the same amount (amount) is used in the deposit function and in the call to crimeMoney.mint.
However, in reality USDC has 6 decimal places, whereas CrimeMoney has 18.
The following test demonstrates that CrimeMoney is minted as it had the same decimal precision as the USDC token. Insert this test into Laundrette.t.sol and import the indicated dependencies:
In the scope of the protocol, there is no real issue: gangmembers will be able to withdraw the same amount of USDC as they depositied.
However, protocols and businesses that integrate with the protocol expecting a stable 1:1 peg might find their integrations unreliable. For instance, a payment gateway that accepts CrimeMoney expecting it to be equivalent to USDC token might face significant issues in transaction processing and value reconciliation.
Manual review, Foundry.
Consider reserving the same amount of decimals for MoneyShelf as USDC does, i.e.:
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.