Issue: The _deployFunds
function lacks validation to ensure that the _amount
passed is greater than zero before attempting a deposit.
Effect: This leads to wasted gas as the deposit will not change the contract's state if the amount is zero.
Affected line:
https://github.com/Cyfrin/2024-12-alchemix/blob/main/src/StrategyOp.sol#L66-L70
Severity: Low
Description: This issue does not pose any security risk but could lead to inefficient gas usage when the function is called with zero amounts.
Manual code review and analysis
Add a require
statement to ensure that the _amount
is greater than zero:
This will prevent zero deposits and save gas by avoiding unnecessary function calls.
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.