58702 sc high no slippage provided in auto strategy implementation will open room for mev attacks

Submitted on Nov 4th 2025 at 06:29:43 UTC by @aman for Audit Comp | Alchemix V3arrow-up-right

  • Report ID: #58702

  • Report Type: Smart Contract

  • Report severity: High

  • Target: https://github.com/alchemix-finance/v3-poc/blob/immunefi_audit/src/strategies/mainnet/TokeAutoEth.sol

  • Impacts:

    • Direct theft of any user funds, whether at-rest or in-motion, other than unclaimed yield

Description

Brief/Intro

While depositing into the Auto Pool, we use the router implementation from Auto Finance, which calls the depositMax function. This function accepts minSharesOut as a parameter; however, in our implementation, we pass 0 as the minSharesOut value.

This can lead to the vault receiving fewer shares than expected if the transaction gets delayed for a few blocks, as demonstrated in the PoC. Additionally, the rebalancing and updateDebtReporting calls can further affect the outcome depending on the current state of the pool.

Vulnerability Details

This issue can occur in TokeAutoEth and TokeAutoUSDStrategy. But I will focus on TokeAutoEth in this reports. The vault will calls _allocate function with the given amount. The router::depositMax will deposit the assets in auto pool and return the shares to strategy contract.

/v3-poc/src/strategies/mainnet/TokeAutoEth.sol:57
57:     function _allocate(uint256 amount) internal override returns (uint256) {
58:         require(TokenUtils.safeBalanceOf(address(weth), address(this)) >= amount, "Strategy balance is less than amount");
59:         TokenUtils.safeApprove(address(weth), address(router), amount);
60:         uint256 shares = router.depositMax(autoEth, address(this), 0); // @audit : no slippage protection here
61:         TokenUtils.safeApprove(address(autoEth), address(rewarder), shares);
62:         rewarder.stake(address(this), shares);
63:         return amount;
64:     }

The router::depositMaxfunction takes 3 paramater the pool address , the receier address and the minSharesOut.

AutopilotRouter::depositMaxarrow-up-right.

From AutoPool Docs : Depending on the conditions of the Autopool, the overall market, and the timing of the debt reporting process slippage may be encountered on both entering and exiting the Autopool. It is very important to always check the shares received on entering, and the assets received on exiting, are greater than an expected amount. 4626-compliance#slippagearrow-up-right.

Impact Details

Due to no slippage the vault will receive less shares than expected.

References

TokeAutoEtharrow-up-right TokeAutoUSDStrategyarrow-up-right

Proof of Concept

Proof of Concept

Add the following file to test/strategies dir with the name POC.t.sol

And Run With command : forge test --match-test test_strategy_auto_slippage -vvv .

Was this helpful?