# Reserve desync via transfer hooks and taxes

Token transfer hooks, fees or mint/burn that move pair balances without a guarded reserve sync

_Area: DeFi oracles, liquidations and flash loans. Seen in 3 disclosed reports; latest 2026-06-16. Updated 2026-12-04._

## How it works
An AMM prices swaps from its cached reserves, but a token's transfer path can change the pair's real balance without updating those reserves. Transfer fees, double router transfers, mint/burn helpers, or a `_transfer` hook that reads `balanceOf(pair)` all create a gap between what the pair holds and what it prices against. Anyone who can widen that gap (by sending tokens in, burning reserves, or flash-inflating the balance) can then call `skim`/`sync` or swap to convert the distortion into the other asset [E1](https://bugbountylibrary.com/r/dhl%3A20260616-dip.md)[E2](https://bugbountylibrary.com/r/dhl%3A20260606-boss.md)[E3](https://bugbountylibrary.com/r/dhl%3A20260526-skp-exp2.md).

## Where it shows up
- Tokens with sell fees or transfer taxes used as a pair asset [E1](https://bugbountylibrary.com/r/dhl%3A20260616-dip.md)[E2](https://bugbountylibrary.com/r/dhl%3A20260606-boss.md)
- Routers that may transfer the token twice for one swap [E1](https://bugbountylibrary.com/r/dhl%3A20260616-dip.md)
- Helper contracts exposing mint/burn against a live pair [E2](https://bugbountylibrary.com/r/dhl%3A20260606-boss.md)
- `_transfer` hooks branching on `from == pair` or `balanceOf(pair)` [E3](https://bugbountylibrary.com/r/dhl%3A20260526-skp-exp2.md)
- Any code computing an amount as `balanceOf(pair) - reserve` [E3](https://bugbountylibrary.com/r/dhl%3A20260526-skp-exp2.md)
- Public `skim`/`sync` reachable after a fee-bearing transfer [E1](https://bugbountylibrary.com/r/dhl%3A20260616-dip.md)

## How to review
For every token in a pair, trace each transfer path and ask: after this call, does `balanceOf(pair)` still equal the reserve the pair will price against? The invariant is that no user-triggerable transfer, mint, burn or hook may change pair balance without a matching reserve update, and no branch may derive a payout from the balance-minus-reserve delta. Check that fees are accounted before pricing, that mint/burn cannot target the pair, and that hooks reading live balances are bounded and not owner-armable [E3](https://bugbountylibrary.com/r/dhl%3A20260526-skp-exp2.md).

## How finders spotted it
- On-chain forensics: an owner-set whitelist address appeared 6 days before the drain, its creator matched the token deployer, source was unverified, and the deployer showed a ~14-day lifecycle with throwaway tokens and dust-airdrop-inflated holders — signs of a staged rug disguised as a bug [E3](https://bugbountylibrary.com/r/dhl%3A20260526-skp-exp2.md).
- Reading the `_transfer` hook and noticing a branch that computes an amount from live `balanceOf(pair)` minus a cached reserve, which is flash-inflatable in one transaction [E3](https://bugbountylibrary.com/r/dhl%3A20260526-skp-exp2.md).

## Variants seen
- Sell fee plus double router transfer, then `skim`/`sync` to distort the paired reserve [E1](https://bugbountylibrary.com/r/dhl%3A20260616-dip.md)
- Helper mint/burn skewing the pair to dust, exploiting tax-accounting mismatch [E2](https://bugbountylibrary.com/r/dhl%3A20260606-boss.md)
- Owner-armed transfer hook redistributing treasury when pair balance exceeds reserves [E3](https://bugbountylibrary.com/r/dhl%3A20260526-skp-exp2.md)

## Impact and severity
Direct drains of the paired asset: 111k USDC [E1](https://bugbountylibrary.com/r/dhl%3A20260616-dip.md), 10,207 USDT [E2](https://bugbountylibrary.com/r/dhl%3A20260606-boss.md), and a USDT pair drained via flash-loan-inflated buy [E3](https://bugbountylibrary.com/r/dhl%3A20260526-skp-exp2.md). Impact scales with pair liquidity and with flash-loan aggregation across many sources, which maximises the inflatable delta in a single transaction [E3](https://bugbountylibrary.com/r/dhl%3A20260526-skp-exp2.md). Severity is high: the loss is the pair's counter-asset, not just the manipulated token.

## Evidence
- E1: https://bugbountylibrary.com/r/dhl%3A20260616-dip.md
- E2: https://bugbountylibrary.com/r/dhl%3A20260606-boss.md
- E3: https://bugbountylibrary.com/r/dhl%3A20260526-skp-exp2.md
