58410 sc low tokemak strategy deallocation causes toke token lockup
Submitted on Nov 2nd 2025 at 02:11:44 UTC by @Another for Audit Comp | Alchemix V3
Report ID: #58410
Report Type: Smart Contract
Report severity: Low
Target: https://github.com/alchemix-finance/v3-poc/blob/immunefi_audit/src/strategies/mainnet/TokeAutoEth.sol
Impacts:
Permanent freezing of unclaimed yield
Permanent freezing of funds
Description
Brief/Intro
The deallocate functions in both TokeAutoEthStrategy and TokeAutoUSDStrategy automatically claim rewards when withdrawing from the Tokemak rewarder. However, the claimed TOKE tokens are either staked for the strategy contract or transferred directly to it, but the vault system has no functionality to handle these TOKE tokens either via withdrawals or staked token claiming. This results in rewards being permanently locked in the strategy contracts.
Vulnerability Details
While TokeAutoEthStrategy.sol has a claimRewards function which claims rewards to the MYT, the deallocate function also claims rewards but claims for the strategy contract instead. The deallocate function calls rewarder.withdraw(..., true) with the claim parameter set to true, which automatically claims any accumulated TOKE rewards.
According to Tokemak's AbstractRewarder contract, when rewards are claimed:
If the reward token is TOKE and
tokeLockDuration > 0, the TOKE is automatically staked in theaccTokecontract for the strategy addressIf staking is disabled (
tokeLockDuration == 0), the TOKE is transferred directly to the strategy contract.And from Etherscan, we can see tha the reward token is TOKE.
The strategy system has no functionality to:
Withdraw staked TOKE from
accToke(incase it is staked)Withraw or utilize TOKE tokens held by the strategy (incase it is not staked).
In TokeAutoEthStrategy.sol:
It's even worse in TokeAutoUSDStrategy.sol as it does not have a claimRewards function, so all rewards go to the strategy contract. In TokeAutoUSDStrategy.sol:
Impact Details
Impact is high as the claimed TOKE rewards become permanently inaccessible because:
The strategy contracts don't have functions to handle TOKE tokens
The vault cannot interact with the
accTokestaking contract
References
https://github.com/Tokemak/v2-core-pub/blob/de163d5a1edf99281d7d000783b4dc8ade03591e/src/rewarders/AbstractRewarder.sol#L329
https://github.com/Tokemak/v2-core-pub/blob/de163d5a1edf99281d7d000783b4dc8ade03591e/src/rewarders/AbstractRewarder.sol#L321
https://etherscan.io/address/0x60882d6f70857606cdd37729ccce882015d1755e#readContract#F23
https://github.com/alchemix-finance/v3-poc/blob/a192ab313c81ba3ab621d9ca1ee000110fbdd1e9/src/strategies/mainnet/TokeAutoUSDStrategy.sol#L62
https://github.com/alchemix-finance/v3-poc/blob/a192ab313c81ba3ab621d9ca1ee000110fbdd1e9/src/strategies/mainnet/TokeAutoEth.sol#L76
Proof of Concept
Proof of Concept
We create the test file below to simulate the scenario where TOKE rewards are claimed and sent to the strategy contract during deallocation locking them in the strategy permanently. In reality, the TOKE rewards would be staked in the accToke contract, and the strategy contract still does not have access to them.
Was this helpful?