The MultiSigWallet contract lacks a balance check in the `executeTransaction` function before attempting to transfer ETH. This means the contract will attempt the transfer even when it has insufficient balance, leading to:
Unnecessary gas consumption as the transaction will fail at the low-level call stage;
Poor user experience as failures happen at the execution stage rather than being caught early
(https://github.com/CodeHawks-Contests/2025-02-datingdapp/blob/878bd34ef6607afe01f280cd5aedf3184fc4ca7b/src/MultiSig.sol#L68)
Users waste gas on transactions that are guaranteed to fail;
Add a balance check before attempting the transfer:
This change ensures that transactions will fail early with a clear error message if there's insufficient balance and saving gas.
Manual Review + Foundry Testing Framework
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelihood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.
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.