# Missing Tick and Liquidity Checks in _decodeAndReward (currentOnly=true) Enables Front-Running and Slippage Attacks

Sorella's _decodeAndReward with currentOnly=true skips tick/liquidity checks, letting an attacker front-run bundles to shift liquidity and steal disproportionate rewards.

- Payout: Contest reward
- Severity: medium
- Program: Sorella
- Credited: Kokkiri
- Disclosed: 2024-12-23
- Write-up quality: 7/10
- Original: https://cdn.cantina.xyz/reports/cantina_competition_sorella_november2024.pdf#3.1.1
- Library page: https://bugbountylibrary.com/r/cantina%3Asorella_november2024%3A3.1.1
- Tags: domain:web3 impact:funds-loss kind:contest platform:cantina sev:medium tech:evm tech:solidity technique:chained technique:race-window vuln:business-logic vuln:oracle-manipulation vuln:reward-distribution

**Target:** Angstrom GrowthOutsideUpdater reward accounting on Uniswap v4
**Root cause:** _decodeAndReward with currentOnly=true trusts the bundle's expected tick/liquidity without verifying the pool's actual tick and liquidity at execution time, so front-run liquidity moves go undetected.
**Steps:**
1. Attacker holds liquidity 1e18 in ticks [0,60] alongside users' 331e18; pool has 1e18 full-range liquidity.
2. Node operator builds bundle: poolUpdate swaps 1e18 tokenA expecting end tick 59, with take 0.997e18 tokenB and settle 1e18 tokenA.
3. Attacker front-runs: removes 1e18 from [0,60] and adds 1000e18 to [60,120].
4. Bundle executes; swap ends at tick 60 inside attacker's new range; _decodeAndReward(currentOnly=true) credits attacker's position without checking actual liquidity/tick.
5. Attacker's ExactFlashOrder hook removes the 1000e18 position, takes rewards, and calls `PoolManager.settleFor(tokenA, angstrom, 0.89e13)` to zero the balance delta.
6. Bundle settles 1e18 tokenA / takes 0.997e18 tokenB; attacker keeps disproportionate rewards with minimal IL.
**How found:** Reviewer read _decodeAndReward and noticed currentOnly=true path never compares actual pool liquidity/tick to the bundle's expected values, hypothesizing a front-run liquidity relocation would misattribute rewards.
**Exploitation:** Attacker front-runs the node operator's bundle by relocating liquidity to the tick where the swap will end, then uses an in-bundle ExactFlashOrder hook to withdraw the position, harvest inflated rewards, and settleFor a small tokenA amount to mask the balance discrepancy and avoid insolvency revert.
**Escalation:** Chained reward-accounting bug with flash-order hook and settleFor to neutralize the resulting balance delta; also causes on-chain/off-chain price divergence breaking standing orders.
**Insight:** When a bundle/commit-reveal system encodes expected pool state (tick, liquidity) for reward math, check whether execution-time state is actually re-validated against those encoded values; unvalidated expected-state fields are front-runnable.
