Panic: arithmetic underflow flaws in Laundrette::withdrawMoney.
Function Call Sequence:
The withdrawMoney function calls withdrawUSDC.
withdrawUSDC calls withdraw, crimeMoney.burn, and usdc.transfer.
The withdraw function performs the arithmetic operation bank[account] -= amount.
Potential Underflow in withdraw Function:
The withdraw function directly subtracts the amount from bank[account].
If amount is greater than bank[account], an underflow occurs, causing the resulting balance to wrap around to a very large number (2^256 - (amount - bank[account])).
The impact in your specific case, given the protections provided by Solidity 0.8.0 and later, is minimal. The built-in checks effectively prevent the underflow from causing unauthorized actions or corrupting the contract state. While the concern for underflows is valid in general.
Manual review
Stateless fuzz testing
Even though the immediate risk is mitigated, it’s good practice to include explicit checks in your smart contracts to handle these conditions gracefully and provide clear error messages. This can enhance the robustness and user experience of your smart contracts:
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.