# SdtRewardReceiver#_withdrawRewards has incorrect slippage protection and withdraws can be sandwiched

SdtRewardReceiver sets Curve pool min_dy from get_dy at runtime, so the slippage check never reverts and SDT reward swaps can be sandwiched.

- Payout: Contest reward
- Severity: medium
- Program: Convergence
- Credited: 0x52
- Disclosed: 2023-11-06
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2023-11-convergence-judging/issues/180
- Library page: https://bugbountylibrary.com/r/sherlock%3A2023-11-convergence%3AM-5
- Tags: domain:web3 impact:funds-loss kind:contest platform:sherlock sev:medium tech:solidity technique:source-review vuln:oracle-manipulation

**Target:** SdtRewardReceiver._withdrawRewards Curve pool exchange
**Root cause:** _min_dy is set to poolCvgSDT.get_dy(0,1,rewardAmount), which simulates the swap at current pool state, so the exchange can never revert on slippage.
**Steps:**
1. Call withdrawRewards on SdtRewardReceiver with isMint=false
2. Observe `_poolCvgSDT.exchange(0, 1, rewardAmount, _poolCvgSDT.get_dy(0, 1, rewardAmount), receiver)`
3. Attacker front-runs by dumping cvgSDT into the pool, skewing the SDT->cvgSDT rate
4. get_dy now returns the already-degraded output, so exchange executes at the bad price without reverting
5. Attacker back-runs to restore the pool and captures the difference
**How found:** Code review of the withdraw path: noticed _min_dy is derived from get_dy, which returns the exact current swap output, making the slippage guard tautological.
**Exploitation:** Sandwich: front-run the withdraw by selling cvgSDT into the Curve pool to worsen the SDT->cvgSDT rate, let the victim's exchange execute at the manipulated get_dy price, then back-run to restore the pool and profit from the victim's loss.
**Insight:** When auditing slippage guards, check whether min-out is computed from the same pool state at execution time (get_dy/quote) rather than a user-supplied or stale value; a runtime quote makes the check a no-op.
