Fee sharing hook on Ink
Uniswap v4 Hook Contract 0x902edefb424d9857cddd5e8bbc003723fe2828ec on Ink · Fee sharing
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 1 (1 traders)
- Total swaps
- 1
What it does
A fee-sharing hook that takes a portion of swap deltas and routes accrued fees to builders, a creator and a treasury.
How it works step by step
- Takes a share of swap deltas through return-delta permissions
- Accrues fees in internal accounting (feesAccrued, pending, owed)
- Splits accrued fees among builders, creator and treasury using share constants
- Lets builders claim fees via claimBuilderFees and claimBuilderFeesFor
- Allows a claim-for-blocked flag to be set per address via setClaimForBlocked
- Calls the pool manager through unlock and take to move currency
- Swap behaviour
- beforeSwap and afterSwap run custom logic, and beforeSwapReturnDelta and afterSwapReturnDelta let the hook take part of the swap delta to accrue fees.
- Liquidity behaviour
- beforeAddLiquidity and afterAddLiquidity are exposed, and beforeRemoveLiquidity and afterRemoveLiquidity are exposed with liquidity callbacks that appear to run through the pool manager.
- Fee behaviour
- Fees are derived from the swap path and split among builders, creator, and a treasury using shareBps, SHARE_CREATOR, SHARE_TREASURY, MAX_TOTAL_FEE_BPS and MAX_BUILDER_FEE_BPS constants; exact fee rates cannot be confirmed without source.
- Owner & admin controls
- A set-once initializer address (storage slot 3, written by initialize and an owner-style setter 0x715fb0db) controls initialize(uint160); setClaimForBlocked(bool) lets a caller toggle a per-address claim flag; no pause or upgrade function is identified, and no explicit owner transfer is confirmed from decoded selectors alone.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeDonate, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize and afterInitialize record pool setup and the initialization timestamp; beforeAddLiquidity and beforeRemoveLiquidity are used for liquidity gating; beforeSwap and afterSwap run swap logic; beforeDonate is used to block or handle donations; beforeSwapReturnDelta and afterSwapReturnDelta let the hook take a share of swap deltas, which means it can take currency from the swap.
Security & trust assessment
Risk level: medium (decoded bytecode, low confidence).
Who controls it: A privileged initializer or owner-like address could set the pool and claim configuration, and the claimForBlocked mapping can be toggled, which may affect which addresses can claim accrued fees.
Risk to user funds: The hook can take a share of swap deltas and transfer accrued fees to builders, creator and treasury addresses. It could block claims for selected addresses through the claim-for-blocked mapping. Funds it holds are controlled by the bytecode logic, which cannot be fully verified without source.
Security findings
- [medium] Return deltas take swap currency: The hook uses beforeSwapReturnDelta and afterSwapReturnDelta, so it can take tokens from swaps and redirect them to fee recipients.
- [medium] Self-unlock moves currency: The bytecode contains a take/unlock flow with unlockCallback, so the hook calls the pool manager to move currency during swaps.
- [medium] Claim blocking for addresses: The contract has a claimBuilderFees and claimBuilderFeesFor path, along with setClaimForBlocked, which can block claims for specific addresses.
- [info] Fee caps not verified: Without verified source, the exact fee caps and whether they are enforced cannot be confirmed from the decoded selectors.
- [info] Admin model not fully determined: The upgrade path and any owner transfer logic could not be confirmed from the selectors alone.
Contract details
- Verified source
- No
- Bytecode size
- 13,255 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, return-delta, self-unlock
Pools using Fee sharing hook
- OTO / IKT (0.00% fee) — 24h volume $0, TVL $0, 1 swaps today