In the MultiSigWallet
contract, the executeTransaction()
function does not verify whether the contract has sufficient balance to execute the transaction. This can result in failed transactions, wasting gas fees.
When executing a transaction in executeTransaction()
, there is no check to confirm that the contract's balance is enough to cover the transaction value. As a result, if the contract does not have enough ETH, the transaction will fail, but the gas spent on the transaction will still be consumed.
Users may lose gas fees due to failed transactions.
Contract execution may fail unpredictably if there isn't enough balance, which can cause a poor user experience.
Increased risk of unintentional errors if there are multiple pending transactions.
Manual code review
Static analysis tools
Add a balance check to the executeTransaction()
function to ensure that the contract has enough ETH before attempting the transaction:
After adding the balance check, re-test the contract to verify that transactions are executed successfully only when the contract has enough funds to complete them.
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.