# claimRedemption() perpetually charges redeemers due to stagnant badDebtRatio

AlchemistV3's claimRedemption never returns transmuter funds to the Alchemist, so badDebtRatio stays elevated and redeemers are perpetually penalized.

- Payout: Contest reward
- Severity: high
- Program: Alchemix
- Credited: falconhoof
- Disclosed: 2025-07-15
- Write-up quality: 7/10
- Original: https://cdn.cantina.xyz/reports/cantina_competition_alchemix_may2025.pdf#3.1.19
- Library page: https://bugbountylibrary.com/r/cantina%3Aalchemix_may2025%3A3.1.19
- Tags: domain:web3 impact:funds-loss kind:contest platform:cantina sev:high tech:solidity technique:source-review vuln:accounting-error vuln:business-logic

**Target:** AlchemistV3 / TransmuterLogic claimRedemption redemption flow
**Root cause:** badDebtRatio is computed only from assets held in AlchemistV3, but redeemed funds accumulated in the transmuter are never transferred back, so the ratio never recovers after bad debt.
**Steps:**
1. Set up a debtor CDP and mint max debt via `alchemist.mint`.
2. Alice calls `transmuterLogic.createRedemption(debt/2)` with alToken approval.
3. Admin sets transmutation fee to 0; roll forward ~5,256,000 blocks.
4. Simulate bad debt by transferring yield tokens out of the alchemist so `badDebtRatioAfter == 1.8e18`.
5. Alice calls `transmuterLogic.claimRedemption(aliceId)`; observe `claimAmount` and `feeAmount` scaled by `FIXED_POINT_SCALAR / badDebtRatio`.
6. Assert alchemist yield token balance decreases by full `redemption` with no repeg transfer back, confirming BDR stays stagnant.
**How found:** Code review of claimRedemption's BDR scaling logic; noticed the audit comment 'no transfer to AlchemixV3' and reasoned that BDR, computed only from AlchemistV3 assets, cannot recover without a repeg transfer from the transmuter.
**Exploitation:** Any redeemer claiming while badDebtRatio > 1e18 has claimAmount and feeAmount scaled down by the ratio; because the transmuter never sends funds back to AlchemistV3, the ratio never improves, so every subsequent redeemer keeps losing a proportional share of collateral indefinitely.
**Insight:** When a health/penalty ratio is computed from one contract's balances but recovery funds accumulate in a sibling contract, check whether any path actually moves those funds back; otherwise the penalty becomes permanent.
