# InfernalRiftBelow.thresholdCross verify the wrong msg.sender

InfernalRiftBelow.thresholdCross checks msg.sender against the aliased L1 rift address instead of the relayer/cross-domain messenger, so L2 NFT bridging always reverts and user assets are lost.

- Payout: Audit contest
- Severity: high
- Program: Flayer
- Found by: Ali9955
- Disclosed: 2024-08-06
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2024-08-flayer-judging/issues/405
- Library page: https://bugbountylibrary.com/r/sherlock%3A2024-08-flayer%3AH-12
- Tags: area:web3 domain:web3 impact:funds-loss kind:contest platform:sherlock sev:high tech:evm tech:solidity technique:source-review vuln:access-control vuln:business-logic

**Target:** InfernalRiftBelow L2 bridge contract (thresholdCross)
**Root cause:** thresholdCross validates msg.sender against the aliased InfernalRiftAbove address, but the actual caller is the relayer/L2 cross-domain messenger, so the equality check always fails.
**Steps:**
1. L1 crossTheThreshold sends message via PORTAL.depositTransaction to InfernalRiftBelow.thresholdCross
2. On L2, thresholdCross executes with msg.sender = relayer/L2 messenger
3. Check `if (msg.sender != expectedAliasedSender) { revert CrossChainSenderIsNotRiftAbove(); }` fails since caller is not the aliased L1 rift
4. Bridged NFT package never minted to recipient; assets stranded
**How found:** Compared Flayer's thresholdCross caller check against sudoswap's original InfernalRift, which validates msg.sender is RELAYER_ADDRESS, revealing the wrong expected sender.
**Insight:** When a protocol forks a bridge, diff the caller-authentication check against the original: cross-domain messages arrive from the messenger/relayer, not the aliased source contract, so verify via xDomainMessageSender() rather than msg.sender equality.

