Skip to content
Business logic Audit finding Intermediate

Partial Redemption Burns Full Position — Accounting Desynchronization and Potential Underpayment in Transmuter.claimRedemption()

When a redemption is claimed during a collateral shortage, the Transmuter pays out only the collateral that is available but still burns the position NFT and unlocks the full nominal amount. This leaves the protocol's locked-liability accounting out of step with what was actually paid and removes the user's right to claim the unpaid remainder.

blackdruiid Follow

Originally disclosed on Immunefi

Critical View original
  • Disclosed after under an hour

58724 sc critical partial redemption burns full position accounting desynchronization and potential underpayment in transmuter claimredemption

Submitted on Nov 4th 2025 at 09:37:23 UTC by @blackdruiid for Audit Comp | Alchemix V3

Description

Brief/Intro

When a user redeems a position during periods of liquidity shortage, the Transmuter contract finalizes the position as if it were fully settled, burning the associated NFT and unlocking the entire nominal lock amount, even though only a fraction of the owed collateral can actually be paid out at that time.

This behavior causes an accounting desynchronization between the protocol’s locked liabilities and available collateral and can lead to effective underpayment or loss of claim rights for users. In liquidity, starved scenarios, users receive only a partial payout while their position is marked as fully redeemed, forcing them to recreate a new redemption to recover the remainder once liquidity returns.

Vulnerability Details

The issue occurs in the Transmuter.claimRedemption() function, which unconditionally finalizes a redemption position as fully settled, regardless of whether the protocol has enough liquidity to complete the payout.

Specifically, the function:

  • Burns the NFT representing the redemption position.
  • Decreases totalLocked by the full nominal redemption amount (position.amount).
  • Marks the position as fully claimed.

When liquidity is limited, the redemption payout is only partial, yet these accounting operations are performed in full, effectively unlocking more than what has actually been paid out.

Root Cause: During liquidity starvation (when MYT collateral is insufficient to satisfy redemptions), claimRedemption() attempts to pay the redeemer what’s available. This behavior originates from AlchemistV3.sol::redeem(uint256 amount), where the logic caps the redeemable amount as follows:

if (amount > liveEarmarked) amount = liveEarmarked

As a result, the Transmuter only receives and distributes the available portion of collateral, but still executes complete settlement logic for the entire position.

However, even in this case, claimRedemption() still:

  • Burns the NFT representing the redemption position.
  • Unlocks the full totalLocked amount.
  • Marks the position as fully claimed.

Thus, even though only part of the requested amount is actually paid out, the contract treats the redemption as complete.

Impact Details

  1. Accounting Desynchronization: totalLocked and the protocol’s internal debt accounting become inconsistent with the actual asset and liability state, potentially misrepresenting solvency.
  2. Loss of Claim Rights: Since the NFT is burned, users permanently lose the right to redeem the unpaid portion once liquidity becomes available again.
  3. Potential Underpayment: Users may effectively receive less than their entitled value when claiming during liquidity stress, as the remaining amount is never recoverable.
  4. Operational and Monitoring Risk: On-chain metrics (e.g., totalLocked, total debt, synthetic supply) will indicate that the redemption was fully settled, complicating audits, solvency tracking, and automated recovery mechanisms.

References

  • Affected function: Transmuter.sol::claimRedemption(uint256 tokenId)
  • Related logic: AlchemistV3.sol::redeem(uint256 amount)

Proof of Concept

Proof of Concept

I put the test in src/test/AlchemistV3.t.sol because, with the existing setup, it’s the most complete and convenient place to exercise this function.

You can copy-paste the function into AlchemistV3.t.sol and then run:

forge test --fork-url mainnet --match-path src/test/AlchemistV3.t.sol -vvvv --evm-version cancun --mt test_PartialPayoutStillBurnsFullPosition

Here the test function:

  • Expected: claiming a partial redemption reduces totalLocked only by the amount paid and burns only the claimed portion.
  • Actual: a partial payout burns the entire position and unlocks the full totalLocked (over-unlock).
function test_PartialPayoutStillBurnsFullPosition() public {
    address buyer = address(0xBEEF);
    address user  = address(0xBAAF);
    Transmuter _transmuter = transmuterLogic;

    // --- Setup user collateral + mint synth ---
    deal(address(vault), user, 2_000e18);
    vm.startPrank(user);
    IERC20(address(vault)).approve(address(alchemist), type(uint256).max);
    alchemist.deposit(1_000e18, user, 0); // positionId = 1
    uint256 tokenId = 1;
    alchemist.mint(tokenId, 200e18, user);
    uint256 synthSupplyBefore = alchemist.totalSyntheticsIssued();
    alToken.approve(address(_transmuter), type(uint256).max);
    vm.stopPrank();

    // --- Buyer creates redemption for 100e18 ---
    deal(address(alToken), buyer, 100e18);
    vm.startPrank(buyer);
    uint256 buyerMytBefore = IERC20(address(vault)).balanceOf(buyer);
    alToken.approve(address(_transmuter), type(uint256).max);
    _transmuter.createRedemption(100e18);
    vm.stopPrank();

    // --- Starve transmuter so claim is underfunded ---
    vm.roll(block.number + 1_000_000);
    deal(address(vault), address(_transmuter), 0);
    deal(address(vault), address(alchemist), 40e18);

    // --- Snapshot before claim ---
    uint256 lockedBefore = _transmuter.totalLocked();
    uint256 buyerMytBeforeClaim = IERC20(address(vault)).balanceOf(buyer);
    uint256 synthSupplyBeforeClaim = alchemist.totalSyntheticsIssued();

    // --- Claim redemption (partial payout happens) ---
    vm.startPrank(buyer);
    _transmuter.claimRedemption(tokenId);
    vm.stopPrank();

    // --- Snapshot after claim ---
    uint256 lockedAfter     = _transmuter.totalLocked();
    uint256 buyerMytAfter   = IERC20(address(vault)).balanceOf(buyer);
    uint256 synthSupplyAfter= alchemist.totalSyntheticsIssued();

    // Second claim must fail (NFT burned)
    vm.startPrank(buyer);
    vm.expectRevert();
    _transmuter.claimRedemption(tokenId);
    vm.stopPrank();

    // --- Assertions ---
    assertGt(buyerMytAfter, buyerMytBeforeClaim, "no MYT payout");
    assertLt(synthSupplyAfter, synthSupplyBeforeClaim, "synth supply not reduced");
    assertLt(lockedAfter, lockedBefore, "totalLocked not updated");

    // Core bug: unlocked accounting (full position) > actually paid out (partial)
    uint256 paidOut            = buyerMytAfter - buyerMytBefore;
    uint256 unlockedAccounting = lockedBefore - lockedAfter;
    assertGt(unlockedAccounting, paidOut, "no over-unlock");

    // Logs
    console.log("synthSupplyBefore =", synthSupplyBefore);
    console.log("synthSupplyAfter  =", synthSupplyAfter);
    console.log("buyerMytBefore    =", buyerMytBefore);
    console.log("buyerMytAfter     =", buyerMytAfter);
    console.log("lockedBefore      =", lockedBefore);
    console.log("lockedAfter       =", lockedAfter);
    console.log("paidOut           =", paidOut);
    console.log("unlockedAccounting=", unlockedAccounting);
}

Quick numbers recap:

  • Deposit: 1,000e18 MYT → position #1
  • Mint debt: 200e18 alToken
  • Buyer redemption: 100e18 alToken
  • Claim transfers:

19.006849315068493151e18 MYT → buyer

0.019025875190258751e18 MYT → test contract

80.812176560121765602e18 alToken → refunded to buyer

19.025875190258751902e18 alToken → burned

Locks: 100e18 → 0

Supply: 200e18 → 180.974124809741248098e18

  • Over-unlock: unlocked 100e18 vs paid ~19.0068e18

The original report as published on Immunefi, by blackdruiid. 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

Likely the claim function finalises the position unconditionally, burning the NFT and reducing totalLocked by the full nominal amount even when the payout was capped to the available collateral.

Impact

Users could receive less than they are owed and permanently lose the right to the unpaid portion, while the protocol's solvency figures misstate its liabilities.

What the attacker needed

A redemption position exists; protocol collateral is insufficient; caller owns the position NFT

The fix

The claim should only burn the position and reduce totalLocked by the amount actually paid, leaving any remainder claimable.

How it was found

  1. Create a redemption for a buyer with a given amount of synthetic tokens.
  2. Drain the Transmuter's collateral and leave only a small amount with the Alchemist so the claim is underfunded.
  3. Call claimRedemption for the position and observe a partial payout.
  4. Observe that the NFT is burned, a second claim reverts, and totalLocked drops by the full position amount rather than the amount paid.

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 user locks tokens to redeem collateral later. If the protocol is short of collateral, it can only pay part of what is owed. The bug is that the contract still treats the whole redemption as finished, deletes the user's claim and reduces its recorded liabilities by the full amount, so the unpaid part is lost and the books no longer match reality.

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 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.