Lucene search

K
code423n4Code4renaCODE423N4:2023-09-DELEGATE-FINDINGS-ISSUES-361
HistorySep 11, 2023 - 12:00 a.m.

Return value of ETH

2023-09-1100:00:00
Code4rena
github.com
1
ether transfer check
hardcoded address
mitigation update

6.9 Medium

AI Score

Confidence

Low

Lines of code

Vulnerability details

Impact

It is recommended that the return values of ether transfers be checked, however if transfer to the hardcoded address fails, it does not revert.

Proof of Concept

        uint256 sc = uint256(uint160(0x0000000000000000000000000000000000000000));
        assembly ("memory-safe") {
            let result := call(gas(), sc, selfbalance(), 0, 0, 0, 0)
        }
    }

The return value is unchecked, even though it is cached in the function.

Tools Used

Manual Review

Recommended Mitigation Steps

Require that the result is true.
Update the function with :

   assembly ("memory-safe") {
            let result := call(gas(), sc, selfbalance(), 0, 0, 0, 0)
        }
        require(result, "Transfer FAILED");
    }

Assessed type

ETH-Transfer


The text was updated successfully, but these errors were encountered:

All reactions

6.9 Medium

AI Score

Confidence

Low