You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Grouping a set of observations about LimitOrderHook in one place, for tracking and to reduce duplicate reports. Items are summarized briefly and are not all confirmed. No severity is assigned here.
- Withdrawal accounting can underflow — withdraw computes currency*Total - checkpoint while currency*Total is decremented on each withdrawal, so an earlier withdrawal can push a total below a later user's checkpoint and block that withdrawal. Already tracked in #129.#138 - Final cancel clears order totals — On the last cancel, order totals are zeroed without redeeming fee claims minted to the hook by earlier partial cancels, leaving those claims unaccounted. Already tracked in #127.#138 - Checkpoint set before fee realization — A placement records its checkpoint from current totals before modifyLiquidity credits previously accrued fees, so newly added liquidity can share fees accrued before it joined.#138 - Boundary fills can be skipped — The tick is derived from sqrtPriceX96 rather than slot0.tick; at an exact boundary on a downward move the order at that tick can be left unfilled, so withdraw reverts NotFilled until price re-enters.#153 - PoolKey.hooks not validated — placeOrder/cancelOrder accept a caller-supplied PoolKey without checking key.hooks == address(this), so orders can be placed against pools configured with a different hook.#149 - In-range check based on deltas — Out-of-range placement is inferred from balance-delta zero-checks rather than comparing the current tick to the order range, so a boundary placement with a one-sided principal can create in-range liquidity.#149 - Fill crediting the deposited token (tickSpacing = 1) — Already tracked in #132.#153 - Native currency order settlement — Native-currency settlement can spend the hook's own ETH rather than the intended payer.#154
Per-swap fill cost scales with orders crossed — Each crossed order is filled with a modifyLiquidity removal, around 123k gas, with no cap and no minimum order size, so a swap crossing a dense range can revert.
Grouping a set of observations about
LimitOrderHookin one place, for tracking and to reduce duplicate reports. Items are summarized briefly and are not all confirmed. No severity is assigned here.- Withdrawal accounting can underflow —#138withdrawcomputescurrency*Total - checkpointwhilecurrency*Totalis decremented on each withdrawal, so an earlier withdrawal can push a total below a later user's checkpoint and block that withdrawal. Already tracked in #129.- Final cancel clears order totals — On the last cancel, order totals are zeroed without redeeming fee claims minted to the hook by earlier partial cancels, leaving those claims unaccounted. Already tracked in #127.#138- Checkpoint set before fee realization — A placement records its checkpoint from current totals before#138modifyLiquiditycredits previously accrued fees, so newly added liquidity can share fees accrued before it joined.- Boundary fills can be skipped — The tick is derived from#153sqrtPriceX96rather thanslot0.tick; at an exact boundary on a downward move the order at that tick can be left unfilled, sowithdrawrevertsNotFilleduntil price re-enters.-#149PoolKey.hooksnot validated —placeOrder/cancelOrderaccept a caller-suppliedPoolKeywithout checkingkey.hooks == address(this), so orders can be placed against pools configured with a different hook.- In-range check based on deltas — Out-of-range placement is inferred from balance-delta zero-checks rather than comparing the current tick to the order range, so a boundary placement with a one-sided principal can create in-range liquidity.#149- Fill crediting the deposited token (tickSpacing = 1) — Already tracked in #132.#153- Native currency order settlement — Native-currency settlement can spend the hook's own ETH rather than the intended payer.#154afterSwapiterates every crossed tick intickSpacingsteps calling_fillOrder, so gas scales with the size of the tick move and a wide swap can revert. See LimitOrderHook: L-08 scan only the ticks that hold an order #150Source:
src/general/LimitOrderHook.sol.