# The Notional version of `lend()` can be used to lock iPTs

Notional lend() path lacked a check that principal p is Notional, letting callers pass Illuminate's principal so iPTs get locked in the Lender contract.

- 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/15
- Library page: https://bugbountylibrary.com/r/sherlock%3A2023-01-illuminate%3AH-2
- 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:** Lender.lend() Notional branch / ERC5095 deposit
**Root cause:** lend() resolves the token via markets(u,m,p) without verifying p == Notional, so an Illuminate principal can be supplied; the Notional deposit path then mints extra iPTs to the Lender contract that cannot be redeemed.
**Steps:**
1. Call `lend(p, u, m, a, r)` with `p` set to the Illuminate principal instead of Notional
2. `markets(u,m,p)` returns the Illuminate PT token rather than the Notional wrapper
3. `INotional(token).deposit(a-fee, address(this))` sells underlying for iPTs held by the Lender
4. `authMint(msg.sender, received)` mints a second iPT to the caller
5. Lender-held iPTs have no redemption path, so other users' redemptions are under-collateralized
**How found:** Code review of lend(): noticed no validation that p corresponds to Notional before using the marketplace token directly in deposit and minting additional iPTs.
**Exploitation:** Attacker supplies Illuminate principal to the Notional lend branch, causing the Lender contract to accumulate iPTs it cannot redeem while the attacker receives freshly minted iPTs; other redeemers lose principal. Requires the deposit signature mismatch to be resolved (per escalation, not exploitable at the time).
**Insight:** In multi-principal routers, verify the principal enum maps to the expected adapter before reusing a shared token lookup; a mismatched principal silently routes funds into the wrong wrapper and strands tokens in the contract.
