58425 sc high missing slippage protection when depositing to tokeauto strategies

Submitted on Nov 2nd 2025 at 09:04:40 UTC by @Cyborg for Audit Comp | Alchemix V3arrow-up-right

  • Report ID: #58425

  • Report Type: Smart Contract

  • Report severity: High

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

  • Impacts:

    • Theft of unclaimed yield

    • Permanent freezing of funds

Description

Brief/Intro

Missing slippage protection when depositing to TokeAuto strategies leading to funds loss of the allocacted funds.

Vulnerability Details

The TokeAutoEth.sol and TokeAutoUSDStrategy.sol strategies are allocating funds to the AutopilotRouter and at this step the router returns amount of shares to be staked to the Rewarder contract, but the problem is that the deposit action to the AutopilotRouter has hardcoded 0 slippage value. The router deposit method is function depositMax(IERC4626 vault, address to, uint256 minSharesOut) and the minSharesOut is passed as 0 value:

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

  • https://github.com/alchemix-finance/v3-poc/blob/immunefi_audit/src/strategies/mainnet/TokeAutoUSDStrategy.sol#L45

This is a huge risk for the strategy to receive lesser amount of shares than the actual expected. Reasons could be many - manipulations of the totalSupply or a price oracle, sandwich attacks, protocol insolvency, etc. The strategy should protect the allocated funds at any cost and it should revert in the case of the router returning lesser shares than expected.

Impact Details

Allocated funds are at manipulation risk, because both strategies TokeAutoEth.sol and TokeAutoUSDStrategy.sol are not safe due to missing slippage protection. Impacted strategies:

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

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

Recommendation

Consider adding slippage protection for the both impacted strategies. The slippage should be defined off-chain and then passed to the smart contracts, because on-chain generated slippage is not fully secure.

Proof of Concept

Proof of Concept

Create test file src/test/strategies/TokeAutoETHStrategy.MissingSlippageProtection.t.sol and run the following command forge test src/test/strategies/TokeAutoETHStrategy.MissingSlippageProtection.t.sol -vv:

The PoC proves that after successful manipulation the strategy allocated funds are being stolen.

Was this helpful?