MEDIUM severity: The vulnerability lies in the way the `Curve2TokenConvexHelper._executeSettlement` function calculat. The vulnerability lies in the way the `Curve2TokenConvexHelper._executeSettlement` function calculates the minimum amount of tokens to be received during a single-sided redemption. The function uses the `TwoTokenPoolUtils._getMinExitAmounts` function to automatically compute the minimum amount, whic...

Vulnerable code:
```\nFile: Curve2TokenConvexHelper.sol\n\nfunction _executeSettlement(\n    StrategyContext calldata strategyContext,\n    Curve2TokenPoolContext calldata poolContext,\n    uint256 maturity,\n    uint256 poolClaimToSettle,\n    uint256 redeemStrategyTokenAmount,\n    RedeemParams memory params\n) private {\n    (uint256 spotPrice, uint256 oraclePrice) = poolContext._getSpotPriceAndOraclePrice(strategyContext);\n\n    (params.minPrimary, params.minSecondary) = poolContext.basePool._getMinExitAmounts({\n        strategyContext: strategyContext,\n        oraclePrice: oraclePrice,\n        spotPrice: spotPrice,\n        poolClaim: poolClaimToSettle\n    });\n```\n```\nminPrimary = (poolContext.primaryBalance * poolClaim * strategyContext.vaultSettings.poolSlippageLimitPercent) / \n    (totalPoolSupply * uint256(VaultConstants.VAULT_PERCENT_BASIS))\n\nminPrimary = (50 * poolClaim * strategyContext.vaultSettings.poolSlippageLimitPercent) / \n    (totalPoolSupply * uint256(VaultConstants.VAULT_PERCENT_BASIS))\n\nminPrimary = (50 DAI * (50 LP_TOKEN / 100 LP_TOKEN) * (99.75% / 100%)) = 24.9375 DAI\n\nminSecondary = (poolContext.secondaryBalance * poolClaim * strategyContext.vaultSettings.poolSlippageLimitPercent) / \n    (totalPoolSupply * uint256(VaultConstants.VAULT_PERCENT_BASIS))\n\nminSecondary = (50 * poolClaim * strategyContext.vaultSettings.poolSlippageLimitPercent) / \n    (totalPoolSupply * uint256(VaultConstants.VAULT_PERCENT_BASIS))\n\nminSecondary = (50 USDC * (50 LP_TOKEN / 100 LP_TOKEN) * (99.75% / 100%)) = 74.8125 USDC\n```\n```\nFile: TwoTokenPoolUtils.sol\n\n@notice calculates the expected primary and secondary amounts based on\nthe given spot price and oracle price\nfunction _getMinExitAmounts(\n    TwoTokenPoolContext calldata poolContext,\n    StrategyContext calldata strategyContext,\n    uint256 spotPrice,\n    uint256 oraclePrice,\n    uint256 poolClaim\n) internal view returns (uint256 minPrimary, uint256 minSecondary) {\n    strategyContext._checkPriceLimit(oraclePrice, spotPrice);\n\n    minPrimary = (poolContext.primaryBalance * poolClaim * \n        strategyContext.vaultSettings.poolSlippageLimitPercent) / \n        (poolContext.poolToken.totalSupply() * uint256(VaultConstants.VAULT_PERCENT_BASIS));\n    minSecondary = (poolContext.secondaryBalance * poolClaim * \n        strategyContext.vaultSettings.poolSlippageLimitPercent) / \n        (poolContext.poolToken.totalSupply() * uint256(VaultConstants.VAULT_PERCENT_BASIS));\n}\n```\n```\nFile: Curve2TokenPoolUtils.sol\n\nfunction _unstakeAndExitPool(\n    Curve2TokenPoolContext memory poolContext,\n    ConvexStakingContext memory stakingContext,\n    uint256 poolClaim,\n    RedeemParams memory params\n) internal returns (uint256 primaryBalance, uint256 secondaryBalance) {\n    // Withdraw pool tokens back to the vault for redemption\n    bool success = stakingContext.rewardPool.withdrawAndUnwrap(poolClaim, false); \n    if (!success) revert Errors.UnstakeFailed();\n\n    if (params.secondaryTradeParams.length == 0) {\n        // Redeem single-sided\n        primaryBalance = \n            ICurve2TokenPool(address(poolContext.curvePool)).remove_liquidity_one_coin(\n                poolClaim, \n                int8(poolContext.basePool.primaryIndex), \n                params.minPrimary\n            );\n    } else {\n        // Redeem proportionally\n        uint256[2] memory minAmounts;\n        minAmounts[poolContext.basePool.primaryIndex] = params.minPrimary;\n        minAmounts[poolContext.basePool.secondaryIndex] = params.minSecondary;\n        uint256[2] memory exitBalances = \n            ICurve2TokenPool(address(poolContext.curvePool)).remove_liquidity(\n                poolClaim, \n                minAmounts\n            );\n\n        (primaryBalance, secondaryBalance) = \n            (exitBalances[poolContext.basePool.primaryIndex], \n             exitBalances[poolContext.basePool.secondaryIndex]);\n    }\n}\n```\n```\n@notice Withdraw a single coin from the pool\n@param _token_amount Amount of LP tokens to burn in the withdrawal\n@param i Index value of the coin to withdraw\n@param _min_amount Minimum amount of coin to receive\n@return Amount of coin received\ndef remove_liquidity_one_coin(\n    _token_amount: uint256,\n    i: int128,\n    _min_amount: uint256\n) -> uint256:\n```\n```\nremove_liquidity_one_coin(poolClaim, int8(poolContext.basePool.primaryIndex), params.minPrimary);\nremove_liquidity_one_coin(50 * LP_TOKEN, int8(0), 24.9375 * DAI);\n```