# Lack of slippage control on `_redeemPT` function

PendlePrincipalToken._redeemPT passes minTokenOut=0 to SY.redeem, disabling slippage protection so redemptions can be sandwiched or hit natural slippage, causing asset loss.

- Payout: Contest reward
- Severity: high
- Program: Leveraged Vaults
- Credited: BiasedMerc
- Disclosed: 2024-06-18
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2024-06-leveraged-vaults-judging/issues/70
- Library page: https://bugbountylibrary.com/r/sherlock%3A2024-06-leveraged-vaults%3AH-11
- Tags: domain:web3 impact:funds-loss kind:contest platform:sherlock sev:high tech:evm tech:solidity technique:source-review vuln:business-logic vuln:oracle-manipulation

**Target:** PendlePrincipalToken.sol _redeemPT / SY.redeem
**Root cause:** _redeemPT calls SY.redeem with minTokenOut hardcoded to 0, so any output amount is accepted; some SY contracts redeem via external staking/withdrawals or swaps that are slippage-prone.
**Steps:**
1. Call _executeInstantRedemption or _initiateWithdrawImpl on a Pendle PT vault.
2. _redeemPT redeems PT via YT.redeemPY or MARKET.swapExactPtForSy to get netSyOut.
3. SY.redeem(address(this), netSyOut, TOKEN_OUT_SY, 0, true) executes with minTokenOut=0.
4. Attacker sandwiches the redemption (or natural slippage occurs) so netTokenOut is far below fair value; vault accepts it.
5. In instant redemption, borrowedCurrencyAmount = netTokenOut (when TOKEN_OUT_SY==BORROW_TOKEN) or trade proceeds, both reduced.
**How found:** Code review of _redeemPT noticed the literal 0 passed as minTokenOut, then traced both call sites (_executeInstantRedemption, _initiateWithdrawImpl) and inspected Pendle SY contracts to confirm some redemptions involve external withdrawals/swaps subject to slippage.
**Exploitation:** MEV searcher back-runs/front-runs the vault's redemption transaction to move the SY underlying price, forcing SY.redeem to return fewer tokens than fair value; the vault accepts the degraded output with no revert.
**Insight:** When auditing wrappers around yield-token redemption (Pendle SY/YT), check every minOut/limit argument passed to external redeem/swap calls; a hardcoded 0 silently disables protection even when the outer function has its own limit param.
