Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: high
Valid

Lack of Proper ETH Handling in Wallet Contract

Summary:
The contract is intended to function as a wallet; however, it lacks the mechanisms to handle ETH, which may prevent the reception of funds needed for transaction fees.

Vulnerability Details:
Without implemented receive and fallback functions, any ETH sent to the contract will be rejected.

Test Example
function test__contract_can_not_handle_eth() public {
vm.deal(user1, STARTING_BALANCE);
vm.prank(user1);
(bool success,) = address(im).call{value: 10e18}("");
assert(success == false);
}

Impact:
High – Inability to handle ETH could compromise the operational capabilities of the wallet.

Tools Used:
slither, aderyn, foundry

Recommendations:
Implement both receive() and fallback() functions to enable proper ETH handling.

Code Recommendation
receive() external payable {
// handle incoming ETH
}
fallback() external payable {
// handle fallback calls
}
Updates

Lead Judging Commences

0xtimefliez Lead Judge 9 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Missing receive() or fallback() function

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!