Fee sharing hook on BNB Chain
Uniswap v4 Hook Contract 0xabf65a0c3c0d692cfba3e16fa5b0e59615e40044 on BNB Chain · Fee sharing
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $1.34M
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 22,882
What it does
A Uniswap v4 hook that takes a configurable percentage fee on swaps, forwards it to a fee recipient, and can update the pool's dynamic LP fee.
How it works step by step
- Stores an owner-set fee in basis points and a fee recipient address in packed storage
- Computes a fee on each swap in afterSwap using the stored fee basis points
- Returns a delta so the pool settles the fee amount out of the swap flow
- Transfers the collected fee to the configured fee recipient via take
- Can update the pool's dynamic LP fee through updateDynamicLPFee
- Exposes owner-only configuration for fee, recipient and ownership
- Swap behaviour
- After each swap, the hook computes a fee from feeBps, takes that amount from the swap output via the return delta, and sends it to feeRecipient using take.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Hook stores a fee in basis points (uint16 feeBps, packed with feeRecipient in slot 1). In afterSwap it can take a fee from the swap and send it to the recipient via a take call, returning a delta. It also calls updateDynamicLPFee, indicating the pool's LP fee can be set dynamically through the hook.
- Owner & admin controls
- Owner (slot 0) can transfer ownership via 0x6ff1f06e and set the fee recipient and fee basis points via 0xdfc6bd2b (writes to slot 1 packed address and uint16 feeBps). Owner is also read in 0xd5390431, suggesting owner-gated initialization or configuration. No pause or upgrade mechanism identified.
Enabled Uniswap v4 callbacks
afterSwap, afterSwapReturnDelta
afterSwap: fee computation and collection after each swap. afterSwapReturnDelta: the hook returns a delta that adjusts the swapper's settled amounts, allowing it to skim a portion of swap proceeds as fees.
Security & trust assessment
Risk level: medium (decoded bytecode, medium confidence).
Who controls it: The owner can change the fee recipient and fee basis points and transfer ownership. A malicious or compromised owner could redirect all hook fees to an address they control or raise the fee to a high level on future swaps.
Risk to user funds: The hook does not hold a balance itself in the decoded logic beyond fee transfers; it takes a portion of swap output via return delta and forwards it through take to the fee recipient. Traders pay the fee on each swap, and LPs are affected through the dynamic LP fee update.
Security findings
- [medium] Owner-adjustable fee without visible cap: Owner can set feeBps via the configuration function at 0xdfc6bd2b; no upper bound is evident from the decoded bytecode, so the fee may be raised substantially.
- [medium] Owner-controlled fee recipient: Owner can redirect the fee recipient, so future fee revenue can be sent to any address chosen by the owner.
- [info] Return delta takes swap value: The hook uses afterSwapReturnDelta, so it takes a share of swap output from the pool flow on every swap, which directly affects traders and the pool's accounting.
- [low] Single-step ownership transfer: Ownership transfer is a single-step function at 0x6ff1f06e with no visible two-step confirmation; a mistaken transfer could be irreversible.
Contract details
- Verified source
- No
- Bytecode size
- 2,566 bytes
- Upgradeable proxy
- No
- Detected patterns
- dynamic-fee, moves-currency, return-delta
Pools using Fee sharing hook
- DOYR / U (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today