58325 sc low operator can shift vault funds to risky strategies without oversight leading to potential loss of user funds
Submitted on Nov 1st 2025 at 09:34:55 UTC by @Ratt13snak3 for Audit Comp | Alchemix V3
Report ID: #58325
Report Type: Smart Contract
Report severity: Low
Target: https://github.com/alchemix-finance/v3-poc/blob/immunefi_audit/src/AlchemistAllocator.sol
Impacts:
Direct theft of any user funds, whether at-rest or in-motion, other than unclaimed yield
Protocol insolvency
Description
Description:
The AlchemistAllocator contract allows both the admin(the DAO) and any assigned operator to allocate and deallocate vault funds across investment strategies. However, the current implementation does not enforce any effective limits on the operator’s control over DAO funds.
Root Cause:
The effective enforcement of DAO targets and risk-based limits is bypassed by the line:
uint256 daoTarget = type(uint256).max;which renders adjusted unrestricted. This design flaw exists in both the allocate() and deallocate() functions, allowing full operator control. Both functions use the same privilege model and similar logic for computing the adjusted allocation amount. However, due to the following issues, an operator can effectively move all DAO funds to any arbitrary strategy, including high-risk or malicious ones:
Lack of per-operator or per-strategy limits: There is no restriction on how much an operator can allocate or deallocate at a time, as long as it's within the vaults absolute cap.
No DAO oversight or approval mechanism: The DAO does not need to confirm or approve allocation changes initiated by operators.
Ineffective cap enforcement: The code compares
absoluteCapandrelativeCapto determine theadjustedlimit, but then overrides this limit withdaoTarget = type(uint256).max, effectively nullifying any restriction:Symmetry with
allocatevulnerability: Bothallocate()anddeallocate()functions use this same logic, meaning the operator can fully drain one strategy(even one selected by the DAO) and reallocate all vault funds to another of their choosing.
As a result, operators have DAO-level privileges/Control over strategy allocation. This could lead to unauthorized fund movement, resulting in excessive risk exposure, or loss of assets if the chosen strategy loses funds.
Impact:
Fund Reallocation Risk: Operators can bypass DAO-set targets and rebalance the entire vault arbitrarily.
Centralization of Control: An operator can undermine DAO governance by reallocating DAO-managed assets.
Loss of Funds: If a malicious operator or compromised operator address reallocates funds to an unsafe strategy, user funds could be lost.
Vulnerable Code Snippet:
Because daoTarget is set to type(uint256).max, the conditional logic never constrains the operator, leaving adjusted effectively unlimited.
Proof of Concept
Proof of Concept
The following test demonstrates how an operator can deallocate and reallocate all vault funds from one strategy into another.
add the test contract below into the test suite AlchemistAllocator.t.sol
run the test:
Expected result: Test passes, showing that the operator successfully reallocated all DAO-managed funds without restriction.
Was this helpful?