DittoETH

Ditto
DeFiFoundryOracle
55,000 USDC
View results
Submission Details
Severity: low
Invalid

Missing existence checks for low level calls

Summary

Low level call that does not check for existence leads to a success result that may no be a true success and lead to unexpected behaviour or loss of funds

Vulnerability Details

function unstake(address to, uint256 amount) external onlyDiamond {
IRocketTokenRETH rocketETHToken = _getRethContract();
uint256 rethValue = rocketETHToken.getRethValue(amount);
uint256 originalBalance = address(this).balance;
rocketETHToken.burn(rethValue);
uint256 netBalance = address(this).balance - originalBalance;
if (netBalance == 0) revert NetBalanceZero();
(bool sent,) = to.call{value: netBalance}("");
assert(sent);
}
}

when unstaking a low level call is made to the "address to" if this is an address that does not exist as entered incorrectly the low level call returns success

Impact

Unstaked amount is lost forever as rocketETHToken.burn(rethValue) has already accounted for that value, without the value going to existing or proper address

Tools Used

Manual Analysis

Recommendations

Recommended to make existence checks for all external addresses used for low level calls

Updates

Lead Judging Commences

0xnevi Lead Judge
over 1 year ago
0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: User input validation

Support

FAQs

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