FewV4ShellHook on Ethereum
Uniswap v4 Hook Contract 0x154a0e150e7b34dd6a65d514b10805ca0f63e088 on Ethereum · Custom pricing · Verified contract
- Volume (24h)
- $0
- Value locked (TVL)
- $980
- All-time volume
- $0
- Pools using this hook
- 3
- Swaps (24h)
- 7 (2 traders)
- Total swaps
- 68
What it does
Routes every swap on a shell pool into an owner-registered FewToken LP pool, reverting if no route or inventory exists, so traders get the LP pool's price with strict 1:1 wrap/unwrap settlement.
How it works step by step
- Stores a per-shell-pool LP route (lpPools mapping) that only the owner can set or remove.
- Records each initialized shell pool key in initedPools and initedPoolIds on beforeInitialize.
- Executes every swap in the registered FewToken LP pool and reverts if it is unavailable or only partially filled.
- Wraps the input token and unwraps the output token 1:1 via canonical FewToken wrappers, checking balances and return values.
- Exposes quote and pseudoTotalValueLocked as depth and quote helpers that rely on V4Quoter simulation and wrapper/PoolManager balances.
- Swap behaviour
- beforeSwap derives the owner-registered LP route, executes the swap in the LP pool, checks full fill and inventory, then wraps input and unwraps output through the FewToken wrappers and settles with PoolManager; the shell pool itself never executes swaps.
- Liquidity behaviour
- No liquidity callbacks; anyone may add liquidity to the shell pool, which is never used as an execution venue, and the hook does not restrict liquidity actions.
- Fee behaviour
- Shell pool swaps route entirely into the owner-registered LP pool; the hook takes no fee of its own and returns a zero fee override, so fees are those of the underlying LP pool.
- Owner & admin controls
- A two-step transferable owner (set at construction, transferred via transferOwner/acceptOwner) can call setLpPool to register or remove the FewToken LP pool mapping per shell pool; there is no upgrade path, fee setting, pause, or sweep function.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, beforeSwapReturnDelta
beforeInitialize records each shell pool key and PoolId for enumeration; beforeSwap routes every swap into the registered FewToken LP pool via poolManager.swap and settles wrapping/unwrapping; beforeSwapReturnDelta lets the hook return specified and unspecified deltas so the shell swap settles against its own accounting.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: The owner can point any shell pool at any LP pool whose wrappers match the underlying tokens, or remove the mapping to disable swaps; the owner cannot directly move user funds, but a malicious or compromised owner could route swaps to a hostile or drained LP pool.
Risk to user funds: The hook does not custody user funds at rest, but during each swap it takes origin tokens from PoolManager, wraps and settles them, and unwraps output; a misconfigured or malicious owner-registered LP pool determines where that flow goes, and failed settlement reverts the trade rather than losing funds.
Security findings
- [medium] Owner-controlled LP pool routing: The hook is the sole executor of swaps and holds physical flash-converted balances during settlement; any owner-registered LP pool with a malicious hook could affect routed trades.
- [low] Swaps can be blocked by configuration: Swaps revert if the LP pool lacks liquidity, the wrapper lacks underlying, or PoolManager lacks settlement inventory, so an owner removing the mapping or inventory running out blocks trading.
- [info] Strict settlement checks: Wrap/unwrap is strict 1:1 with balance and return-value checks, and exact-in/exact-out must fully fill or the whole transaction reverts, limiting partial-fill loss.
- [info] Immutable logic: Contract is not upgradeable; there is no proxy, fee skim or sweep function in the verified source.
Contract details
- Verified source
- Yes (FewV4ShellHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 15,823 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, return-delta
Pools using FewV4ShellHook
- ETH / COW (0.10% fee) — 24h volume $0, TVL $980, 7 swaps today
- ETH / USDT (0.20% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / USDT (0.25% fee) — 24h volume $0, TVL $0, 0 swaps today