Toke reward loss when calling deallocate
When the strategy deallocates funds, the rewarder sends accrued TOKE rewards to the strategy contract itself rather than to the MORPHO vault. Because the strategy has no way to forward or withdraw those tokens, the rewards become permanently locked.
- Disclosed after under an hour
58428 sc low toke reward loss when calling deallocate
Submitted on Nov 2nd 2025 at 09:21:02 UTC by @SOPROBRO for Audit Comp | Alchemix V3
- Report ID: #58428
- 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 royalties
Description
Brief/Intro
When you deallocate funds, TOKE rewards are sent to the strategy contract instead of the MORPHO vault (MYT). Since the strategy has no mechanism to withdraw or forward these tokens, the rewards become permanently locked.
Vulnerability Details
During deallocation in TokeAutoUSDStrategy and TokeAutoEth:
rewarder.withdraw(address(this), sharesNeeded, true);
This triggers the following in rewarder::_withdraw (1):
if (claim) {
_processRewards(account, account, true);
}
Since account is address(this) (the strategy), the rewarder sends rewards to the strategy contract itself (2):
_processRewards(address account, address recipient, bool claimExtras)
The strategy does not expose any method to recover these rewards, effectively locking all accrued TOKE tokens.
Impact Details
The impact of this is locked TOKE rewards, particularly in TokeAutoUSDStrategy, which lacks a _claimRewards implementation altogether — meaning the only reward path is through deallocate, which locks the rewards.
References
(1) https://etherscan.io/address/0x60882D6f70857606Cdd37729ccCe882015d1755E#code#F3#L84
(2) https://etherscan.io/address/0x60882D6f70857606Cdd37729ccCe882015d1755E#code#F3#L141
Proof of Concept
Add the following import to the top of TokeAutoETHStrategy
import "forge-std/Test.sol";
Then add the following test, and run in the console forge test --mt test_strat_loses_rewards -vv
function test_strat_loses_rewards() public {
uint256 amountToAllocate = 1e18;
uint256 amountToDeallocate = amountToAllocate / 2;
vm.startPrank(vault);
deal(testConfig.vaultAsset, strategy, amountToAllocate);
bytes memory prevAllocationAmount = abi.encode(0);
IMYTStrategy(strategy).allocate(prevAllocationAmount, amountToAllocate, "", address(vault));
uint256 initialRealAssets = IMYTStrategy(strategy).realAssets();
require(initialRealAssets > 0, "Initial real assets is 0");
bytes memory prevAllocationAmount2 = abi.encode(amountToAllocate);
vm.roll(block.number + 1);
// IMYTStrategy(strategy).claimRewards();
IMYTStrategy(strategy).deallocate(prevAllocationAmount2, amountToDeallocate, "", address(vault));
console.log("Balance of TOKE in MYT Vault %e", IERC20(0x2e9d63788249371f1DFC918a52f8d799F4a38C94).balanceOf(vault));
console.log("Balance of TOKE in Strategy %e", IERC20(0x2e9d63788249371f1DFC918a52f8d799F4a38C94).balanceOf(strategy));
}
From the logs, we can clearly see the TOKE is sent to the Strategy instead of the MYT Vault during deallocation, you can uncomment the // IMYTStrategy(strategy).claimRewards(); to see the claimRewards will send the TOKE to the MYT Vault.
Logs:
Balance of TOKE in MYT Vault 0e0
Balance of TOKE in Strategy 7.1596749037491e13
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
Likely the deallocate path calls the rewarder's withdraw with the strategy's own address as the account, so rewards are processed and paid to the strategy rather than the vault.
Impact
Accrued TOKE rewards are permanently locked in the strategy, and in TokeAutoUSDStrategy the deallocate path is the only reward route, so all rewards are lost.
What the attacker needed
Strategy holds an allocation; deallocate is called
How it was found
- Give the strategy an allocation from the vault.
- Advance the block so rewards accrue.
- Call deallocate for part of the allocation.
- Observe the TOKE balance sits in the strategy and not in the vault.
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 vault puts money into a strategy contract, which earns extra reward tokens over time. When money is taken back out, the reward tokens are paid to the strategy contract instead of the vault, and the strategy has no function to pass them on, so nobody can ever retrieve them.
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.