hats-finance / Smooth-0x64bc275b37e62eec81a00ecaecd2b9567058f990

Dappnode's MEV Smoothing Pool
0 stars 2 forks source link

Unchecked return value of low-level call() #39

Open hats-bug-reporter[bot] opened 1 year ago

hats-bug-reporter[bot] commented 1 year ago

Github username: @saidqayoumsadat Submission hash (on-chain): 0xd1fb4bc8c511cebae1c60963c1bf2ad21c027f5b9a0fdd1463c1b05fdf2ea4d2 Severity: medium

Description: Description

The function being called may revert, which will be indicated by the return value to call()/delegatecall(). If the return value is not checked, the code will continue on as if there was no error, rather than reverting with the error encountered.

file: /contracts/DappnodeSmoothingPool.sol

327        (bool success, ) = rewardAddress.call{value: claimableBalance}(
            new bytes(0)
329        );

https://github.com/hats-finance/Smooth-0x64bc275b37e62eec81a00ecaecd2b9567058f990/blob/3929e24ea288d697d38948b8690c8c2028e5042b/contracts/DappnodeSmoothingPool.sol#L327-L327

invocamanman commented 1 year ago

the success bool is checked in just the next line:

require(
            success,
            "DappnodeSmoothingPool::claimRewards: Eth transfer failed"
        );