57096 sc medium the implementation of tokeautoeth allocate is incorrect

Submitted on Oct 23rd 2025 at 13:04:20 UTC by @ox9527 for Audit Comp | Alchemix V3arrow-up-right

  • Report ID: #57096

  • Report Type: Smart Contract

  • Report severity: Medium

  • 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 in the TokeAutoEth contract approves WETH/USDC to the router based on the input amount.

However, the router’s depositMax function deposits the entire token balance held by the TokeAutoEth contract.

As a result, anyone can donate a small ("dust") amount of assets to the contract, causing the actual deposited amount to exceed the approved amount. This mismatch can cause the _allocate function to fail completely.

Vulnerability Details

TokeAutoEth.sol::_allocate()

router::depositMax() https://vscode.blockscan.com/ethereum/0x39ff6d21204B919441d17bef61D19181870835A2arrow-up-right

Impact Details

Provide a detailed breakdown of possible losses from an exploit, especially if there are funds at risk. This illustrates the severity of the vulnerability, but it also provides the best possible case for you to be paid the correct amount. Make sure the selected impact is within the program’s list of in-scope impacts and matches the impact you selected.

References

Add any relevant links to documentation or code

Proof of Concept

Proof of Concept

Out:

Was this helpful?