For the complete documentation index, see llms.txt. This page is also available as Markdown.

57439 sc low incorrect baddebtratio rounding in transmuter claimredemption may cause funds to become permanently stuck

Submitted on Oct 26th 2025 at 08:54:47 UTC by @joicygiore for Audit Comp | Alchemix V3

  • Report ID: #57439

  • Report Type: Smart Contract

  • Report severity: Low

  • Target: https://github.com/alchemix-finance/v3-poc/blob/immunefi_audit/src/Transmuter.sol

  • Impacts:

    • Permanent freezing of funds

Description

Brief/Intro

The Transmuter::claimRedemption() function contains a rounding error in the calculation of badDebtRatio. When this value is incorrectly rounded down, it can cause scaledTransmuted to exceed the actual redeemable amount. As a result, the subsequent redemption call may revert due to insufficient funds. Furthermore, the AlchemistV3::redeem() function does not include protocol fees in the amountToRedeem calculation, which can also trigger unexpected reverts and lock user funds within the contract.

Vulnerability Details

As marked by the @> tags in the following code snippets:

  • @>1 The badDebtRatio is calculated using integer division that rounds down, making it smaller than the correct ratio.

  • @>2 When 1badDebtRatio > 1e181, the computed scaledTransmuted becomes larger than the actual redeemable amount, leading to an overestimation of available funds.

  • @>3 Consequently, amountToRedeem also exceeds the available collateral, causing claimRedemption() -> redeem() to revert during redemption. This results in funds being stuck within the contract. Even when the claimer is not the last participant in a redemption pool, rounding errors can still cause an overclaim, indirectly harming other redemption creators.

Additionally, in the AlchemistV3::redeem() function, the protocolFee is not included in the collRedeemed amount. When protocolFee > 0, the safeTransfer of feeCollateral may revert, also resulting in stuck funds.

Impact Details

  • The incorrect rounding of badDebtRatio can cause scaledTransmuted to exceed the actual redeemable balance.

  • As a result, the claimRedemption() call may revert due to insufficient funds, permanently locking user funds in the contract.

  • Furthermore, when protocolFee > 0, the missing fee inclusion in amountToRedeem can also cause redemption transactions to fail.

  • This issue may impact both individual users and the protocol’s liquidity pool, resulting in frozen redemptions and unclaimable assets.

References

https://github.com/alchemix-finance/v3-poc/blob/a192ab313c81ba3ab621d9ca1ee000110fbdd1e9/src/Transmuter.sol#L220-L232

https://github.com/alchemix-finance/v3-poc/blob/a192ab313c81ba3ab621d9ca1ee000110fbdd1e9/src/AlchemistV3.sol#L627-L638

Proof of Concept

Proof of Concept

Add the following test to src/test/AlchemistV3.t.sol and run it:

Was this helpful?