Skip to content
Business logic Audit finding Intermediate

RemoveStrategy() is Non-Functional

The removeStrategy function in AlchemistCurator calls vault.removeAdapter directly, but that function requires the operation to be submitted to a timelock first, so every call reverts. This prevents the protocol from removing strategies, even compromised or malicious ones.

teoslaf1 Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

58040 sc low removestrategy is non functional

Submitted on Oct 30th 2025 at 07:49:46 UTC by @teoslaf1 for Audit Comp | Alchemix V3

Description

Summary

The removeStrategy() function in AlchemistCurator is completely non-functional and will always revert. This prevents the protocol from removing strategies from vaults, even in emergency situations where a strategy becomes compromised or malicious.


Vulnerability Details

Root Cause

The removeStrategy() function calls vault.removeAdapter() directly without first submitting the operation to the timelock queue. However, removeAdapter() in VaultV2 has a timelocked() modifier that requires the operation to be submitted via vault.submit() first.

Vulnerable Code

Solidity
// AlchemistCurator.sol
function removeStrategy(address adapter, address myt) external onlyOperator {
    require(adapter != address(0), "INVALID_ADDRESS");
    require(myt != address(0), "INVALID_ADDRESS");
    _setStrategy(adapter, myt, true); //  Calls removeAdapter directly
}

function _setStrategy(address adapter, address myt, bool remove) internal {
    adapterToMYT[adapter] = myt;
    IVaultV2 vault = _vault(adapter);
    if (remove) {
        vault.removeAdapter(adapter); //  This will always revert!
    } else {
        vault.addAdapter(adapter);
    }
    emit StrategySet(adapter, myt);
}

VaultV2 Implementation

Solidity
// VaultV2.sol
function removeAdapter(address account) external {
    timelocked(); //  Requires timelock submission
    if (isAdapter[account]) {
        // ... removal logic
    }
    emit EventsLib.RemoveAdapter(account);
}

function timelocked() internal {
    bytes4 selector = bytes4(msg.data);
    require(executableAt[msg.data] != 0, ErrorsLib.DataNotTimelocked()); //  Always fails
    require(block.timestamp >= executableAt[msg.data], ErrorsLib.TimelockNotExpired());
    require(!abdicated[selector], ErrorsLib.Abdicated());
}

Impact

  1. Cannot remove strategies: All attempts to remove strategies will revert with DataNotTimelocked()
  2. Compromised strategies cannot be removed: If a strategy is hacked or becomes malicious, it cannot be removed
  3. No emergency response: Protocol cannot respond to security incidents involving strategies
  4. Permanent lock-in: Strategies are permanently locked in vaults once added
  5. Deprecated protocols: Cannot remove strategies from deprecated or sunset protocols
  6. Risk accumulation: Bad strategies accumulate over time with no removal mechanism

Proof of Concept

Proof of Concept

Add this to AlchemistCurator.t.sol

Solidity
	function testRemoveStrategyAlwaysReverts() public {
		_submitAndSetStrategy(address(mytStrategy), address(vault));
		
		vm.prank(operator);
		vm.expectRevert(abi.encodeWithSignature("DataNotTimelocked()"));
		mytCuratorProxy.removeStrategy(address(mytStrategy), address(vault));
	}

The original report as published on Immunefi, by teoslaf1. Images and videos are our own copies; raw HTML is shown as text. View it on Immunefi.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The removeStrategy function calls vault.removeAdapter without first submitting the operation to the timelock queue, so the timelocked modifier always reverts.

Impact

Strategies cannot be removed, so compromised or malicious strategies remain locked in vaults, potentially leading to protocol insolvency.

What the attacker needed

Operator role; strategy already added

How it was found

  1. Submit and set a strategy using the test helper.
  2. Call removeStrategy as the operator.
  3. Observe the transaction reverts with DataNotTimelocked().

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A smart contract has a function meant to remove a strategy (a piece of code that manages funds). But that function always fails because it skips a required waiting period called a timelock. As a result, once a strategy is added, it can never be removed, even if it turns malicious.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by teoslaf1

View all

7 more disclosed reports, best first.

More from Alchemix V3

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.