58398 sc high no slippage protection on large allocation deposits

Submitted on Nov 1st 2025 at 23:58:10 UTC by @PotEater for Audit Comp | Alchemix V3arrow-up-right

  • Report ID: #58398

  • 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

The function allocate deposits WETH into the autoEth vault using the router depositMax function. However, the function is missing a slippage protection as it sets minSharesOut parameter to zero.

This disables all slippage protection and allows the transaction to succeed even if the vault returns far fewer shares than expected.

Vulnerability Details

The function allocate sets the minSharesOut parameter to zero, not allowing the caller to specify minimum slippage.

Code snippet:

Given that allocations are performed with large amounts of user funds, this missing safeguard presents a significant risk.

Impact Details

The impact is loss of funds, because malicious actors may exploit this and front-run transactions, extracting value from allocations because nothing reverts the transaction when less shares is received. This results in permanent loss of funds due to receiving fewer vault shares than expected.

References

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

Proof of Concept

Proof of Concept

Paste this code in path src/test/strategies/PoC.t.sol.

Run with forge test --match-test test_noSlippageLoss

PoC:

Result:

Was this helpful?