# Wrong parameter in remote transfer makes it possible to steal all USDO balance from users

TapiocaOmnichainReceiver passes the caller-supplied owner as srcChainSender in recursive compose, letting an attacker impersonate any victim and drain their USDO cross-chain.

- Payout: Contest reward
- Severity: high
- Program: Tapioca
- Credited: 0xadrii
- Disclosed: 2024-02-14
- Write-up quality: 8/10
- Original: https://github.com/sherlock-audit/2024-02-tapioca-judging/issues/111
- Library page: https://bugbountylibrary.com/r/sherlock%3A2024-02-tapioca%3AH-10
- Tags: domain:web3 impact:funds-loss kind:contest platform:sherlock sev:high tech:evm tech:solidity technique:chained technique:source-review vuln:access-control vuln:business-logic

**Target:** TapiocaOmnichainReceiver remote transfer / LayerZero compose
**Root cause:** _remoteTransferReceiver passes remoteTransferMsg_.owner instead of _srcChainSender into _internalRemoteTransferSendPacket, so the recursive compose message's source sender is attacker-controlled.
**Steps:**
1. Craft initial remote transfer A->B with owner=victim, amountLD=0 to bypass allowance check in _remoteTransferReceiver.
2. Compose msg on B triggers _internalRemoteTransferSendPacket which builds a B->A compose with srcChainSender=victim (wrong param).
3. On A, lzCompose runs _remoteTransferReceiver with _srcChainSender=victim and owner=victim, so _internalTransferWithAllowance skips allowance (owner==spender) and burns victim's USDO.
4. Final _lzSend mints the burned amount on B to attacker's address.
5. Run `forge test --mt testVuln_stealUSDOFromATargetUserDueToWrongParameter`; victim balance 0, attacker 100 ether.
**How found:** Code review of compose flow: noticed _internalRemoteTransferSendPacket receives remoteTransferMsg_.owner rather than _srcChainSender, and reasoned that owner==spender bypasses the allowance check on the return leg.
**Exploitation:** Attacker sends a zero-amount remote transfer with owner set to victim; recursive compose loops A->B->A->B, burning victim's USDO on chain A and minting to attacker on chain B.
**Escalation:** Recursive compose chaining across chains amplifies a single wrong parameter into full balance drain of any holder.
**Insight:** In cross-chain compose/OFT flows, trace which address becomes the authenticated srcChainSender across recursive sends; any place a user-supplied field is forwarded as sender identity enables impersonation, and owner==spender allowance shortcuts are the bypass.
