Lack of slippage protection in transmuter claimredemption and alchemistv3 withdraw leads to user yield losses
The Transmuter.claimRedemption and AlchemistV3.withdraw functions lack a minimum output parameter, so users can receive less yield than expected when system state changes (e.g., bad debt ratio spikes or concurrent claims). An attacker could exploit this via MEV to cause users to lose yield.
Originally disclosed on Immunefi
- Disclosed after under an hour
58209 sc medium lack of slippage protection in transmuter claimredemption and alchemistv3 withdraw leads to user yield losses
Submitted on Oct 31st 2025 at 11:37:36 UTC by @Smartkelvin for Audit Comp | Alchemix V3
- Report ID: #58209
- Report Type: Smart Contract
- Report severity: Medium
- Target: https://github.com/alchemix-finance/v3-poc/blob/immunefi\\_audit/src/Transmuter.sol
- Impacts:
- Smart contract unable to operate due to lack of token funds
Description
Brief/Intro
The Transmuter.claimRedemption function and it contract associate (AlchemistV3.withdraw) lacks any minimum output protection , allowing dynamic system state changes—such as concurrent claims, bad debt ratio spikes, etc—to cause users to receive significantly less yield than expected after burning their position NFT
Vulnerability Details
The claimRedemption function in the Transmuter contract processes user redemptions by calculating time-pro-rata transmuted synthetics, applying bad debt scaling, conditionally redeeming from the Alchemist, and distributing yield tokens. However, it performs no verification that the final claimYield meets a user-specified minimum, exposing outputs to variance from external and concurrent state changes.
Impact Details
Direct User Loss
MEV Exploitation
Mitigation
Introduce a minYieldOut parameter to both functions and revert check immediately before transfers.
Proof of Concept
Proof of Concept
function testClaimRedemption_BadDebtSlippage_UserGetsLess() external {
uint256 user1Deposit = 2000e18;
uint256 user1Mint = 1000e18;
// ============================================
// User creates transmuter position
// ============================================
vm.startPrank(address(0xbeef));
SafeERC20.safeApprove(address(vault), address(alchemist), user1Deposit);
alchemist.deposit(user1Deposit, address(0xbeef), 0);
uint256 tokenId = AlchemistNFTHelper.getFirstTokenId(address(0xbeef), address(alchemistNFT));
// Mint synthetic tokens
alchemist.mint(tokenId, user1Mint, address(0xbeef));
// Create transmuter redemption
SafeERC20.safeApprove(address(alToken), address(transmuterLogic), user1Mint);
transmuterLogic.createRedemption(user1Mint);
vm.stopPrank();
uint256 redemptionId = 1;
vm.roll(block.number + transmuterLogic.timeToTransmute() + 1);
uint256 totalSyntheticsBefore = alchemist.totalSyntheticsIssued();
uint256 totalUnderlyingBefore = alchemist.getTotalUnderlyingValue();
uint256 transmuterBalance = IERC20(address(vault)).balanceOf(address(transmuterLogic));
uint256 transmuterUnderlyingValue = alchemist.convertYieldTokensToUnderlying(transmuterBalance);
uint256 denominator = totalUnderlyingBefore + transmuterUnderlyingValue > 0
? totalUnderlyingBefore + transmuterUnderlyingValue
: 1;
uint256 badDebtRatioBefore = totalSyntheticsBefore * 1e18 / denominator;
console.log("\n=== SYSTEM STATE BEFORE CLAIM ===");
console.log("Total Synthetics Issued:", totalSyntheticsBefore);
console.log("Total Underlying in Alchemist:", totalUnderlyingBefore);
console.log("Transmuter Balance:", transmuterBalance);
console.log("Total Backing (denominator):", denominator);
console.log("Bad Debt Ratio:", badDebtRatioBefore);
// Calculate what user EXPECTS to receive (1:1 conversion)
uint256 expectedYieldTokens = alchemist.convertDebtTokensToYield(user1Mint);
console.log("\nUser expects yield tokens:", expectedYieldTokens);
// ============================================
// User claims redemption
// ============================================
vm.startPrank(address(0xbeef));
uint256 yieldBalanceBefore = IERC20(address(vault)).balanceOf(address(0xbeef));
transmuterLogic.claimRedemption(redemptionId);
uint256 yieldBalanceAfter = IERC20(address(vault)).balanceOf(address(0xbeef));
uint256 actualYieldReceived = yieldBalanceAfter - yieldBalanceBefore;
vm.stopPrank();
console.log("\n=== CLAIM RESULTS ===");
console.log("Expected yield tokens:", expectedYieldTokens);
console.log("Actually received:", actualYieldReceived);
console.log("\n=== THE ISSUE ===");
console.log("User has NO slippage protection!");
console.log("If bad debt existed, they would receive less");
console.log("Transaction would still succeed - no revert");
console.log("No way to specify minYieldTokens parameter");
// Test passes, demonstrating lack of protection
assertTrue(actualYieldReceived > 0, "User received some yield");
}
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 claimRedemption and withdraw functions do not accept or enforce a user-specified minimum output amount, so the final yield is determined solely by current contract state.
Impact
Users could receive significantly less yield than expected due to state changes, and MEV bots could exploit the lack of slippage protection, though the report does not demonstrate an actual loss in the provided test.
What the attacker needed
User has a redemption position; system state changes (e.g., bad debt); no minimum output set
The fix
The functions should be fixed by adding a minYieldOut parameter and reverting if the output is below it.
How it was found
- User deposits collateral and mints synthetic tokens.
- User creates a redemption in the Transmuter.
- Time passes until redemption is claimable.
- User calls claimRedemption without any minimum output parameter.
- The function transfers whatever yield is calculated, with no revert if it is lower than expected.
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.
When you redeem a token, you expect a certain amount back. This report says the contract doesn't let you say 'I won't accept less than X', so if the system's debt situation changes, you might get less than you expected. Someone watching the blockchain could take advantage of that.
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.