DittoETH

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

BridgeReth missing 'correct' minimum amount check on its depositETH

Summary

BridgeReth missing 'correct' minimum amount check on its depositETH

Vulnerability Details

Rocket Pool implement a minimum required ETH to be deposited in their pool, rocketDAOProtocolSettingsDeposit.getMinimumDeposit() and this check is missing on BridgeReth contract.

Yes, in BridgeRouter there is a minimum deposit

if (msg.value < Constants.MIN_DEPOSIT) revert Errors.UnderMinimumDeposit();

but that value (as information from discord) is to prevent a dust amount, as we can see this following constant value.

File: Constants.sol
21: uint88 internal constant MIN_DEPOSIT = 0.0001 ether;

Meanwhile, from rocketpool docs, their minimum amount is 0.01 ETH

Thus, I believe this getMinimumDeposit() check should be applied, when someday the minimum is increased to for example 0.015 ETH, the DittoETH protocol can automatically adjust accordingly.

File: BridgeReth.sol
70: function depositEth() external payable onlyDiamond returns (uint256) {
71: IRocketDepositPool rocketDepositPool =
72: IRocketDepositPool(rocketStorage.getAddress(ROCKET_DEPOSIT_POOL_TYPEHASH));
73: IRocketTokenRETH rocketETHToken = _getRethContract();
74:
75: uint256 originalBalance = rocketETHToken.balanceOf(address(this));
76: rocketDepositPool.deposit{value: msg.value}();
77: uint256 netBalance = rocketETHToken.balanceOf(address(this)) - originalBalance;
78: if (netBalance == 0) revert NetBalanceZero();
79:
80: return rocketETHToken.getEthValue(netBalance);
81: }

Moreover, there is also a maximum deposit allowed, getMaximumDepositPoolSize() which can be helpful to add, but is not an issue compare to the minimum amount check.

Impact

User deposit will be reverted but may not knowing due to rETH min deposit is not checked

Tools Used

Manual analysis

Recommendations

consider add the rocketDAOProtocolSettingsDeposit.getMinimumDeposit() check on rETH depositETH

Updates

Lead Judging Commences

0xnevi Lead Judge
about 2 years ago
0xnevi Lead Judge about 2 years ago
Submission Judgement Published
Invalidated
Reason: Other
bitsurfer Submitter
about 2 years ago
0xnevi Lead Judge
about 2 years ago
bitsurfer Submitter
about 2 years ago
0xnevi Lead Judge about 2 years ago
Submission Judgement Published
Validated
Assigned finding tags:

finding-542

Support

FAQs

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

Give us feedback!