# Incorrect asset matching for ETH/WETH leads to potential DoS of exitPosition in CurveConvexStrategy

CurveConvexStrategy compares token address to asset address, so ETH vs WETH mismatch triggers an invalid swap that reverts exitPosition, blocking redemptions.

- Payout: Audit contest
- Severity: medium
- Program: Notional
- Found by: 0xDeoGratias
- Disclosed: 2025-06-27
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2025-06-notional-exponent-judging/issues/581
- Library page: https://bugbountylibrary.com/r/sherlock%3A2025-06-notional-exponent%3AM-10
- Tags: area:web3 domain:web3 impact:dos kind:contest platform:sherlock sev:medium tech:evm tech:solidity technique:source-review vuln:accounting-error vuln:dos

**Target:** CurveConvex2Token strategy / AbstractSingleSidedLP redemption path
**Root cause:** _executeRedemptionTrades skips the primary token via strict address equality (tokens[i] == asset); when asset is WETH but the pool token is native ETH (already wrapped during unstakeAndExitPool), the check fails and an invalid swap is attempted.
**Steps:**
1. Configure strategy with ASSET=WETH and a Curve pool whose underlying token is ETH_ADDRESS.
2. Call exitPosition/initiateWithdraw with isSingleSided=false.
3. unstakeAndExitPool wraps ETH into WETH (line 205).
4. _executeRedemptionTrades iterates tokens; ETH_ADDRESS != WETH address, so it builds a Trade selling ETH with redemptionTrades[i] params.
5. _executeTrade reverts on invalid params, reverting the whole redemption.
**How found:** Code review of the redemption path: noticed ETH is wrapped to WETH in unstakeAndExitPool but the skip-check in _executeRedemptionTrades compares raw token addresses, so the wrapped ETH is not recognized as the primary asset.
**Exploitation:** Any user redemption in a WETH-asset strategy with an ETH pool token reverts, locking shares; no attacker capital needed, triggered by normal exit flow.
**Insight:** When a contract normalizes one token into another (ETH->WETH) earlier in the flow, downstream identity checks against the original token address silently break; audit every equality check on token addresses across wrap/unwrap boundaries.

## Proof of concept (copied exactly from the original report)

**Redemption trade loop with strict asset equality check**

```
function _executeRedemptionTrades(
    ERC20[] memory tokens,
    uint256[] memory exitBalances,
    TradeParams[] memory redemptionTrades
) internal returns (uint256 finalPrimaryBalance) {
    for (uint256 i; i < exitBalances.length; i++) {
229     if (address(tokens[i]) == address(asset)) {
            finalPrimaryBalance += exitBalances[i];
            continue;
        }

        TradeParams memory t = redemptionTrades[i];
        // Always sell the entire exit balance to the primary token
        if (exitBalances[i] > 0) {
            Trade memory trade = Trade({
                tradeType: t.tradeType,
                sellToken: address(tokens[i]),
                buyToken: address(asset),
                amount: exitBalances[i],
                limit: t.minPurchaseAmount,
                deadline: block.timestamp,
                exchangeData: t.exchangeData
            });
            (/* */, uint256 amountBought) = _executeTrade(trade, t.dexId);

            finalPrimaryBalance += amountBought;
        }
    }
}
```

**ETH to WETH wrap in unstakeAndExitPool**

```
function unstakeAndExitPool(
    uint256 poolClaim, uint256[] memory _minAmounts, bool isSingleSided
) external returns (uint256[] memory exitBalances) {
    _unstakeLpTokens(poolClaim);

    exitBalances = _exitPool(poolClaim, _minAmounts, isSingleSided);

205  if (ASSET == address(WETH)) {
        if (TOKEN_1 == ETH_ADDRESS) {
            WETH.deposit{value: exitBalances[0]}();
        } else if (TOKEN_2 == ETH_ADDRESS) {
            WETH.deposit{value: exitBalances[1]}();
        }
    }
}
```

