ProbabilisticFeeCollector on World Chain
Uniswap v4 Hook Contract 0x836f5bc2c58496842861ebad66902747148cc040 on World Chain · Fee sharing · Verified contract
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0.92
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 2
What it does
After some swaps, this hook sweeps accrued fees from one designated liquidity position to a fixed collector address, without changing swap prices or amounts for traders.
How it works step by step
- Runs an afterSwap callback only; no other hook callbacks are enabled
- Derives a pseudo-random trigger from block.number, msg.sender and tx.origin
- On trigger (about 1 in 33 swaps), calls positionManager.modifyLiquiditiesWithoutUnlock with DECREASE_LIQUIDITY (zero) and TAKE_PAIR
- Sends the collected token pair to the hardcoded STATIC_COLLECTOR address
- Emits CollectSucceeded on success and swallows failures so swaps never revert
- Swap behaviour
- On each swap, the hook runs afterSwap; with roughly 1 in 33 probability it attempts to collect fees from the configured NFT position to STATIC_COLLECTOR. It never alters the swap result.
- Liquidity behaviour
- No liquidity callbacks. The hook calls DECREASE_LIQUIDITY with zero liquidity on a position it does not own, which in practice collects accrued fees rather than removing principal; the hook itself holds no tokens.
- Fee behaviour
- The hook does not change pool fees. On roughly 1 in 33 swaps (triggerModulo = 33, about 3% by the contract's own math, described as about 4% in the comment), it calls the position manager to decrease liquidity by zero and take the pair's accrued fees for STATIC_COLLECTOR. The swap outcome is never modified.
- Owner & admin controls
- Only STATIC_COLLECTOR (hardcoded address 0x72b3...ECCdC) can call setNFT and setTriggerModulo; there is no owner transfer, pause, or upgrade mechanism. The admin can change which position NFT is harvested and how often collection is attempted.
Enabled Uniswap v4 callbacks
afterSwap
afterSwap: runs after each swap to pseudo-randomly trigger fee collection from the configured NFT position to STATIC_COLLECTOR.
Security & trust assessment
Risk level: low (verified source, high confidence).
Who controls it: STATIC_COLLECTOR can repoint the harvested position via setNFT and change the trigger frequency via setTriggerModulo, but cannot directly move funds. Setting triggerModulo to 1 would collect on every swap, adding gas cost to swappers.
Risk to user funds: The hook holds no tokens and does not alter swap deltas, so it cannot block or divert swap funds. Its only effect on LP value is that accrued fees on the configured position are redirected to STATIC_COLLECTOR, which is a fee-sharing cut taken from the position's earnings rather than from traders directly.
Security findings
- [info] Predictable probabilistic trigger: The trigger is derived from block.number, msg.sender and tx.origin, all of which are predictable or influenceable by a searcher, so the 1-in-33 collection can be targeted or avoided.
- [info] Silent failure on collect: Collection is performed inside a try/catch on the position manager, so a failing collect is silently ignored without reverting the swap.
- [low] Dependence on external position manager and NFT setup: The hook relies on modifyLiquiditiesWithoutUnlock on a position manager and on the NFT position being owned by or approved to this hook; if the position is not properly set up, collection simply does nothing.
- [low] Weak simulation guard: The collection uses tx.origin == address(0) as a static-call guard, which is unusual and would not catch normal quoter simulations that originate from a non-zero EOA.
Contract details
- Verified source
- Yes (ProbabilisticFeeCollector)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 8,478 bytes
- Upgradeable proxy
- No
Pools using ProbabilisticFeeCollector
- WLD / USDC (0.01% fee) — 24h volume $0, TVL $0, 0 swaps today