57152 sc high assets permanently locked due to killswitch flag

Submitted on Oct 23rd 2025 at 22:43:19 UTC by @nem0thefinder for Audit Comp | Alchemix V3arrow-up-right

  • Report ID: #57152

  • Report Type: Smart Contract

  • Report severity: High

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

  • Impacts:

    • Permanent freezing of funds

Description

Summary

Funds are permanently locked when allocating to a strategy with an active killSwitch. The vault transfers assets to the strategy, but the strategy returns early without allocating them to the underlying protocol. The vault's allocation tracking remains at zero, making the funds unrecoverable through normal deallocation flow. No emergency rescue mechanism exists.

Description

The bug occurs in the interaction between AlchemixAllocator, VaultV2, and MYTStrategy:

  1. AlchemixAllocator.allocate() does not check the strategy's killSwitch status

AlchemixAllocator.sol:

  1. VaultV2.allocateInternal() transfers funds to the strategy

VaultV2.sol:

  1. MYTStrategy.allocate() returns (ids(), 0) when killSwitch is true MYTStrategy.sol:

  1. Funds remain in the strategy contract as underlying tokens

  2. vault.allocation(id) stays at 0 because the returned change is 0

  3. Deallocation is impossible because it requires allocation > 0

Execution Flow

Impact

  1. Permanent fund lock: Allocated funds remain in the strategy contract indefinitely

  2. Broken accounting: Vault tracking shows zero allocation despite funds being transferred

  3. No recovery mechanism:

    • Deallocation requires allocation > 0 but it remains 0

    • No emergency withdrawal function exists in MYTStrategy

    • Funds cannot be transferred back to vault

Mitigation

  • Add killSwitch validation in AlchemixAllocator.allocate() before initiating the allocation:

Proof of Concept

Proof of Concept

1.import the following in AlchemistAllocator.t.sol

2.paste the following test in AlchemistAllocator.t.sol

3.Run it via `forge test --mc AlchemistAllocatorTest --mt test_Funds_Stuck_DueTo_KillSwitch --rpc-url https://arbitrum.gateway.tenderly.co -vvv

`

Logs

Was this helpful?