Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: low
Invalid

sends eth to arbitrary address

Summary

in the src/inheritanceManager.sol contract and between #104 to #108, there is the use of "_to.call{...}" in the sendETH` function on line #105, it could be an issue because it doesn't send eth to the exact receiver, even if there is a check for reentrancy with the "nonReentrant" guard and a check to make sure only the owner can send eth with the "onlyOwner" check

Vulnerability Details

function sendETH(uint256 _amount, address _to) external nonReentrant onlyOwner {
*** (bool success,) = _to.call{value: _amount}("");
require(success, "Transfer Failed");
_setDeadline();
}

Impact

it is very unlikely for reentrancy to happen because of the guard but it is a good idea to make sure the eth gets sent to the right beneficiary of the eth

Tools Used

Manual review

Recommendations

function sendETH(uint256 _amount, address _to) external nonReentrant onlyOwner {
-- (bool success,) = _to.call{value: _amount}("");
++ (bool success,) = _to.Transfer{value: _amount}("");
require(success, "Transfer Failed");
_setDeadline();
}
Updates

Lead Judging Commences

0xtimefliez Lead Judge 6 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

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