he withdraw function in various shelf contracts does not verify the balance before performing subtraction operations. This can lead to arithmetic underflow errors when attempting to withdraw more funds than are available. This affects all withdraw operations MoneyShelf
, MoneyVault
,WeaponShelf
and by extension the withdraw function in laundrette
(laundrette::takeGuns
and laundrette::withdrawMoney
)
The function withdraw in the shelf
contracts does not verify the balance before performing subtraction operations. This can result in arithmetic underflow errors when attempting to withdraw more funds than are available.
Failing to check balances before subtraction can cause arithmetic underflow errors. This may allow users to withdraw more funds than they actually have, compromising the integrity and security of the contract. The vulnerability could lead to loss of funds or contract malfunction, affecting all users interacting with the withdrawal function## Tools Used
Manual review
To mitigate this issue, it is essential to check the balance before performing subtraction operations. This can be achieved by adding a require statement to ensure that the balance is sufficient for the withdrawal.
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.