PoolcodeHook on Ethereum
Uniswap v4 Hook Contract 0x98d7cee4f9abd4ec1267cf575a72658638c020cc on Ethereum · Fee sharing · Verified contract
- Volume (24h)
- $79
- Value locked (TVL)
- $1.06K
- All-time volume
- $449.08K
- Pools using this hook
- 1
- Swaps (24h)
- 1 (1 traders)
- Total swaps
- 2,222
What it does
This hook charges a holder-voted ETH swap fee on the PCODE/ETH pool, with buys paying 0.5% to 1% and sells paying 2% to 4% (some swaps free under one mode), capped at 4% and sent entirely to PCODE holders, while LPs earn no swap fees but can withdraw freely.
How it works step by step
- Serves a single official PCODE/native-ETH pool and rejects any other pool.
- Charges an ETH fee on every swap (base: 1% on buys, 4% on sells), capped at 4%, and forwards 100% of it to the PCODE token's holder reward pool in the same transaction.
- Every 88 swaps, PCODE holders vote on one of four fixed fee modes for the next version: Base, Tide (0.5% buys), Cascade (sell fee falls from 4% to 2% over the version) or Beacon (every 8th swap is free).
- Overrides the LP fee to 0, so the hook's ETH fee is the only swap fee; LPs earn no swap fees from this pool.
- Exact-output sells (asking for an exact ETH amount out) are rejected; sells must be exact-input.
- Swap behaviour
- Buys (ETH to PCODE) pay 0.5% to 1% in ETH, taken from the ETH input; sells (PCODE to ETH) pay 2% to 4% in ETH, taken from the ETH output, with some swaps fee-free under the Beacon mode. Exact-output sells revert, and the LP fee is forced to 0.
- Liquidity behaviour
- No liquidity callbacks; LPs can add and withdraw freely.
- Fee behaviour
- Fees are 0% to 4% in ETH: buys 1% (0.5% in Tide mode), sells 4% (falling to 2% in Cascade mode), and every 8th swap is free in Beacon mode, with a hard cap of 4%. All fees go to the PCODE token's holder reward pool, and the pool's LP fee is set to 0.
- Owner & admin controls
- No admin controls found. The fee mode changes only through permissionless PCODE holder votes among four hard-coded modes, all capped at 4%.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize binds the single ETH/PCODE pool; beforeSwap rejects exact-output sells, sets the LP fee to 0 and takes the buy fee on exact-input buys; afterSwap takes the sell or exact-output buy fee, forwards fees to the token and counts swaps; beforeSwapReturnDelta and afterSwapReturnDelta let the hook deduct the ETH fee from swap amounts.
Security & trust assessment
Risk level: low (verified source, high confidence).
Who controls it: No privileged keys exist. Token holders can only choose among four fixed fee modes, all within 0% to 4%.
Risk to user funds: The hook takes 0% to 4% of the ETH side of each swap and forwards it immediately to the token reward pool. LP principal cannot be touched, and withdrawals are unrestricted.
Security findings
- [info] Fee hard-capped at 4%: All modes are compile-time constants clamped to a 4% maximum, and there is no owner, setter or pause function.
- [info] LPs earn no swap fees: The LP fee is overridden to 0 on every swap, and all ETH fees go to PCODE token holders instead of LPs.
- [info] Exact-output sells blocked: Sells that specify an exact ETH output revert, so routers must sell exact-input. This applies to all users equally and is not a sell block.
Contract details
- Verified source
- Yes (PoolcodeHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 8,357 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, return-delta, tax
Pools using PoolcodeHook
- ETH / PCODE (Dynamic fee) — 24h volume $79, TVL $1.06K, 1 swaps today