57291 sc insight hardcoded slippage in myt strategy

Submitted on Oct 25th 2025 at 01:59:36 UTC by @nem0thefinder for Audit Comp | Alchemix V3arrow-up-right

  • Report ID: #57291

  • Report Type: Smart Contract

  • Report severity: Insight

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

  • Impacts:

    • Temporary freezing of funds for at least 24 hour

    • Contract fails to deliver promised returns, but doesn't lose value

Description

Summary

The slippageBPS parameter is set once in the constructor with no mechanism to update it afterward. While stored as a mutable state variable, the absence of a setter function makes it effectively hardcoded, preventing the strategy from adapting to changing market conditions.

Description

The MYTStrategy contract sets slippageBPS during deployment:

constructor(address _myt, StrategyParams memory _params, address _permit2Address, address _receiptToken) {
    // ...
    slippageBPS = _params.slippageBPS;
    // No setter function exists to update this value
}

The variable is declared as a regular state variable (not immutable or constant):

This design suggests the intent was to make it updateable, but no setter function was implemented. The contract includes setters for other critical parameters (setKillSwitch, setAdditionalIncentives, setPermit2Address), making this omission inconsistent with the overall design pattern.

During market volatility, if actual slippage exceeds the hardcoded slippageBPS tolerance, deallocations will revert

Note!!!

AlchemixV3 deal with approx 20 strategy on multiple network so adaptive slippage is essential.

Impact

When market conditions changes than conditions anticipated at deployment the following will happen:

  1. Withdrawal failures: Deallocations revert when actual market slippage exceeds the unchangeable slippageBPS threshold

  2. Fund freezing: Users cannot withdraw their assets despite having valid balances

  3. Extended duration: Funds remain inaccessible until market volatility decreases to acceptable levels, which can take hours or days

  4. No recovery mechanism: Even the contract owner cannot adjust slippage to restore functionality without full contract redeployment

Note!!!

In markets this is not temporary situation as markets evolve over time.

Mitigation

Add an owner-controlled setter function with reasonable bounds to allow slippage adjustment:

This allows the strategy to adapt to market conditions while maintaining reasonable upper bounds to protect users from excessive or tight slippage tolerance

Proof of Concept

Proof of Concept

1. paste the following test in MYTStrategy.t.sol

2.Run it via forge test --mc MYTStrategyTest --mt test_HardCoded_slippageBPS --fork-url https://mainnet.gateway.tenderly.co -vvv

Logs

Was this helpful?