# Missing important check if repay and redeem functions in compoundv2migrationbundler.sol are successful

CompoundV2MigrationBundler ignores return values of Compound V2 repayBorrowBehalf and redeem, so failed repay/redeem silently succeeds and leaves user position unmigrated.

- Payout: Contest reward
- Severity: medium
- Program: Morpho Metamorpho
- Credited: tsvetanovv
- Disclosed: 2024-02-23
- Write-up quality: 6/10
- Original: https://cdn.cantina.xyz/reports/cantina_competition_morpho_metamorpho_dec2023.pdf#3.1.1
- Library page: https://bugbountylibrary.com/r/cantina%3Amorpho_metamorpho_dec2023%3A3.1.1
- Tags: domain:web3 impact:integrity kind:contest platform:cantina sev:medium tech:evm tech:solidity technique:source-review vuln:business-logic

**Target:** CompoundV2MigrationBundler.sol bundler functions compoundV2Repay/compoundV2Redeem
**Root cause:** Compound V2's repayBorrowBehalf and redeem return an error code instead of reverting on failure; the bundler calls them without checking the returned value, so a failed operation does not revert the bundle.
**Steps:**
1. Call `compoundV2Repay(cToken, amount)` with a cToken/underlying where repayBorrowBehalf returns a nonzero error code (e.g. insufficient allowance/balance edge)
2. Observe the bundler does not check the return value and the transaction succeeds
3. Call `compoundV2Redeem(cToken, amount)` where redeem returns an error code; bundle still succeeds
4. Result: migration bundle completes while repay/redeem silently failed
**How found:** Code review of the bundler's Compound V2 integration; noticed the `//@audit - not check return value` on redeem and recalled Compound V2 cToken functions return error codes rather than reverting (except C_ETH repayBorrowBehalf).
**Insight:** When integrating legacy Compound V2 cTokens, remember repay/redeem/mint return uint error codes instead of reverting—only the native C_ETH repay path reverts. Grep bundler/adapter code for unchecked ICToken calls.
