# Illuminate's PT doesn't respect users' slippage specifications for underlyings

ERC5095 withdraw/redeem hardcodes 1% extra underlying slippage instead of honoring the caller's requested minimum, so users receive less underlying than specified.

- Payout: Contest reward
- Severity: high
- Program: Illuminate
- Credited: IllIllI
- Disclosed: 2023-01-06
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2023-01-illuminate-judging/issues/16
- Library page: https://bugbountylibrary.com/r/sherlock%3A2023-01-illuminate%3AH-1
- Tags: domain:web3 impact:funds-loss kind:contest platform:sherlock sev:high tech:evm tech:solidity technique:source-review vuln:accounting-error vuln:business-logic

**Target:** ERC5095 principal token withdraw/redeem via Marketplace.sellPrincipalToken
**Root cause:** The minimum-output argument passed to sellPrincipalToken is computed as `a - (a/100)` (a hardcoded 1% haircut) rather than the user-supplied slippage limit, so the contract accepts up to 1% more slippage than requested.
**Steps:**
1. Call `ERC5095.withdraw(underlying, maturity, a, ...)` where `a` is the requested underlying amount.
2. Observe the call to `IMarketPlace.sellPrincipalToken(underlying, maturity, shares, Cast.u128(a - (a/100)))` — the min-output is `a - 1%` regardless of caller intent.
3. Same pattern in the second withdraw branch (line 302-307) and in `redeem()` (lines 380-385, 404-409).
4. A MEV bot sandwiches the sale so the user receives up to 1% less underlying than their specified minimum.
**How found:** Code review of ERC5095 withdraw/redeem; noticed the min-output argument was a fixed `a - (a/100)` expression rather than the user's slippage parameter, and cross-referenced ERC4626's requirement that exact underlying be returned.
**Exploitation:** MEV bot observes the withdraw/redeem transaction, front-runs to move the principal-token market price, letting the hardcoded 1% slippage allowance be consumed; user receives less underlying than their stated minimum, losing part of principal if the PT was minted externally.
**Insight:** When a token wrapper claims ERC4626/ERC5095 compatibility, check every internal swap's min-output argument against the caller-supplied slippage parameter — hardcoded percentage haircuts silently widen slippage for all users and are exploitable by MEV bots at near-zero cost.
