No verification of values entered
In the VaultDepositController::_depositToVaults function, there is no validation for the _toDeposit, _minDeposits, and _maxDeposits values. It’s important to ensure these inputs are within reasonable ranges to prevent potentially dangerous behaviour. For example, it makes no sense if _minDeposits is greater than _maxDeposits. It would also be wise to check that _toDeposit and _maxDeposits are not zero to avoid uncontrolled reverts and certain unexpected behaviour:
several possible impacts:
- Inefficient Execution: If _maxDeposits is 0, the function may enter loops and perform calculations that do not lead to any meaningful outcome, consuming unnecessary gas and increasing transaction costs.
- Dos: Users might experience longer transaction times or failure without clear feedback on why the transaction did not succeed.
- Increased Gas Costs: The additional computation required for operations that ultimately do not execute deposits will result in higher gas fees, which could be avoided with a simple initial.
- Unexpected Behavior leading to potential errors or state inconsistencies.
Manual review.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.