# Wrong token or offset read

Asset, offset, or approval read from the wrong field, causing underflow, revert, or free tokens

_Area: Smart contract access control and control flow. Seen in 5 disclosed reports; latest 2025-09-04. Updated 2026-10-23._

## How it works
A contract reads an asset address, a balance, or a calldata offset from the wrong place. The value it gets back is a different token, a stale balance, or a shifted field. Downstream arithmetic then subtracts a balance that was never credited (underflow/revert), approves a token the next step does not spend, or bridges/burns the wrong asset. The broken assumption is that the field read and the field later used refer to the same token and the same account.

## Where it shows up
- A swap or bridge sets its destination to the order receiver instead of the orchestrator that later measures the balance [E1](https://bugbountylibrary.com/r/cantina%3Agenius_jul2025%3A3.1.4.md).
- A module calls its own token's `_sendPacket`/`_debit` when bridging a different asset [E2](https://bugbountylibrary.com/r/sherlock%3A2024-02-tapioca%3AM-27.md).
- Calldata offsets: `asset` read at offset 24 (tokenIn) where offset 44 (tokenOut) was intended [E3](https://bugbountylibrary.com/r/cantina%3Asuperform_may2025%3A3.2.13.md).
- A hook assigns `spToken` to a share/yield-source address when the received asset is the underlying [E4](https://bugbountylibrary.com/r/cantina%3Asuperform_may2025%3A3.2.16.md).
- Post-execution balance delta computed on the spent token rather than the received token [E3](https://bugbountylibrary.com/r/cantina%3Asuperform_may2025%3A3.2.13.md).

## How to review
For every balance delta, approval, and bridge call, trace the exact token and account: the token whose balance is measured after execution must be the token actually received, and the account debited must be the account credited. For calldata, confirm each offset maps to the intended field. For hooks, classify inflow vs outflow and check that `spToken`/`outAmount` name the same token. The invariant: swap/bridge destination == account later debited, and measured token == received token.

## Variants seen
- Swap output routed to receiver, orchestrator balance reads zero, fill reverts and receiver keeps tokens [E1](https://bugbountylibrary.com/r/cantina%3Agenius_jul2025%3A3.1.4.md).
- Wrong token's send/debit invoked in a compose receiver, burning the module token or reverting [E2](https://bugbountylibrary.com/r/sherlock%3A2024-02-tapioca%3AM-27.md).
- Wrong calldata offset inverts the delta sign, underflow blocks all redemptions [E3](https://bugbountylibrary.com/r/cantina%3Asuperform_may2025%3A3.2.13.md).
- Wrong `spToken` in an outflow hook makes approval target the wrong token, next hook reverts [E4](https://bugbountylibrary.com/r/cantina%3Asuperform_may2025%3A3.2.16.md).

## Impact and severity
Ranges from blocked redemptions and fee collection [E3](https://bugbountylibrary.com/r/cantina%3Asuperform_may2025%3A3.2.13.md), DoS on bridging [E2](https://bugbountylibrary.com/r/sherlock%3A2024-02-tapioca%3AM-27.md)[E4](https://bugbountylibrary.com/r/cantina%3Asuperform_may2025%3A3.2.16.md), to free tokens for the receiver [E1](https://bugbountylibrary.com/r/cantina%3Agenius_jul2025%3A3.1.4.md). Severity rises when the mismatch is silent (offset/sign inversion) or lets value leave without payment.

## Why fixes fail
No fix evidence in these reports.

## Evidence
- E1: https://bugbountylibrary.com/r/cantina%3Agenius_jul2025%3A3.1.4.md
- E2: https://bugbountylibrary.com/r/sherlock%3A2024-02-tapioca%3AM-27.md
- E3: https://bugbountylibrary.com/r/cantina%3Asuperform_may2025%3A3.2.13.md
- E4: https://bugbountylibrary.com/r/cantina%3Asuperform_may2025%3A3.2.16.md
