58794 sc high hardcoded 0 amount as the minsharesout to depositmax function call does not provide slippage protection
Submitted on Nov 4th 2025 at 13:54:29 UTC by @kaysoft for Audit Comp | Alchemix V3
Report ID: #58794
Report Type: Smart Contract
Report severity: High
Target: https://github.com/alchemix-finance/v3-poc/blob/immunefi_audit/src/strategies/mainnet/TokeAutoEth.sol
Impacts:
Contract fails to deliver promised returns, but doesn't lose value
Description
Brief/Intro
The _allocate(...) function of TokeAutoETh.sol hardcodes zero as the minSharesOut leaves the deposit without slippage protection and ready to take 0 as the output shares for deposit.
Vulnerability Details
The _allocate functon calls router.depositMax but hardcodes zero as the minSharesOut.
File: TokeAutoEth.sol
// @dev Implementation can alternatively make use of a multicall
// Deposit weth into the autoEth vault, stake the shares in the rewarder
function _allocate(uint256 amount) internal override returns (uint256) {
require(TokenUtils.safeBalanceOf(address(weth), address(this)) >= amount, "Strategy balance is less than amount");
TokenUtils.safeApprove(address(weth), address(router), amount);
uint256 shares = router.depositMax(autoEth, address(this), 0);//@audit zero slippage.minShares.
TokenUtils.safeApprove(address(autoEth), address(rewarder), shares);
rewarder.stake(address(this), shares);
return amount;
}Impact Details
No slippage protection as minSharesOut is hardcoded to zero allowing deposit take any exchange rate.
Recommendation
Consider passsing a `minSharesOUt instead of hardcoding zero.
Proof of Concept
Proof of Concept
Create a file named POC.t.sol in the directory
src/test/strategies/POC.t.solRun
forge test --match-test test_Zeroslippage -vvv
Was this helpful?