MultiSigWallet::executeTransaction does not check contract balance before executing, leading to wasted gas and poor UXThe MultiSigWallet::executeTransaction function does not verify that the contract has sufficient balance before attempting to execute a transaction. While the transaction will ultimately revert if the balance is insufficient, users will have already spent gas on submitting and approving a transaction that can never succeed. Additionally, the generic "Transaction failed" error message does not indicate why the execution failed.
Likelihood:
Users can submit and approve transactions for amounts greater than the contract balance
This occurs when matched users try to withdraw more than their pooled rewards
Impact:
Gas wasted on approvals for transactions that can never execute
Poor user experience with unclear error message when execution fails
No way to check upfront if a transaction is executable
Two users match and receive a multisig with 1.8 ETH (2 ETH minus 10% fee)
Owner1 submits a transaction to withdraw 2 ETH (more than available)
Owner2 approves the transaction (gas wasted)
Owner1 tries to execute - transaction reverts with generic "Transaction failed"
Add the following test:
Add a balance check before executing the transaction:
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.