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

inheritanceManager contract can not receive ETH

Summary

If the owner wants to send ETH to the inheritanceManager contract, this will result in a failed transaction as the contract is not accepting ETH payments, because it's missing a receive() or fallback() function

Vulnerability Details

Sending ETH directly to the inheritanceManager contract will always fail and revert

Impact

If the owner wants to have ETH sent to its beneficiaries when the deadline is met, via the inheritanceManager contract, they won't be able to receive anything, as the contracts balance will be 0, because the contract is not accepting ETH.

Tools Used

Manual review

Recommendations

Include a receive() or fallback() function in the inheritanceManager contract:

receive() external payable {}
fallback() external payable {}

Now using low level calls like the one in the example below will allow the user to send ETH to the contract:

(bool success, ) = address(inheritanceManager).call{value: amount}("");
require(success, "ETH deposit failed");
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!