# Missing Slippage Protection in Expired PT Redemption Causes User Fund Loss

Expired PT redemption in Notional Exponent calls sy.redeem with minTokenOut=0, exposing users to slippage and MEV losses during SY DEX swaps.

- Payout: Audit contest
- Severity: high
- Program: Notional
- Found by: 0xPhantom2
- Disclosed: 2025-06-27
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2025-06-notional-exponent-judging/issues/874
- Library page: https://bugbountylibrary.com/r/sherlock%3A2025-06-notional-exponent%3AH-11
- Tags: area:web3 domain:web3 impact:funds-loss kind:contest platform:sherlock sev:high tech:evm tech:solidity technique:source-review vuln:business-logic

**Target:** PendlePTLib.redeemExpiredPT / SY redeem flow
**Root cause:** redeemExpiredPT passes minTokenOut=0 to sy.redeem, so when the SY contract performs an external DEX swap there is no slippage bound on the redemption.
**Steps:**
1. PT expires; user calls instant redemption or initiates withdraw
2. _redeemPT detects PT.isExpired()==true and calls PendlePTLib.redeemExpiredPT
3. PT transferred to YT; yt.redeemPY(sy) returns netSyOut
4. sy.redeem(address(this), netSyOut, tokenOutSy, 0, true) executes with minTokenOut=0
5. SY performs external DEX swap at unfavorable rate (market or MEV)
6. User receives fewer sUSDe than expected with no recourse
**How found:** Code review of the expired-PT branch in _redeemPT traced into PendlePTLib.redeemExpiredPT and spotted the hardcoded 0 minTokenOut argument passed to sy.redeem.
**Exploitation:** MEV searcher or adverse market conditions cause the SY's external DEX swap to execute at a worse rate; since minTokenOut=0 the redemption accepts any output, and the loss is borne by the redeeming user in both instant redemption and withdraw initiation flows.
**Insight:** When auditing redemption/unwinding paths, trace every downstream call that performs a swap and check whether the caller-supplied slippage bound is actually forwarded; hardcoded 0 in a library helper is easy to miss because the outer function may look protected.

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

**redeemExpiredPT calls sy.redeem with minTokenOut 0**

```
function redeemExpiredPT(
        IPPrincipalToken pt,
        IPYieldToken yt,
        IStandardizedYield sy,
        address tokenOutSy,
        uint256 netPtIn
    ) external returns (uint256 netTokenOut) {
        // PT Tokens are known to be ERC20 compliant
        pt.transfer(address(yt), netPtIn);
        uint256 netSyOut = yt.redeemPY(address(sy));
@->     netTokenOut = sy.redeem(address(this), netSyOut, tokenOutSy, 0, true); // AUDIT: no slippage protection
```

