Fee sharing hook on BNB Chain
Uniswap v4 Hook Contract 0x701303edd46128e4bf30939d9886a1f1652c28cc on BNB Chain · Fee sharing
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 6 (2 traders)
- Total swaps
- 6
What it does
This hook charges every swap a per-pool fee, capped by an unverified maximum, and splits it between the pool creator and a pot or protocol recipient who claim it later, while LPs can always add to registered pools and withdraw freely.
This read was written for the hook 0x575d…68cc on Ethereum and reused here: the two share a code shape, so constants such as fees, owners and addresses can differ.
How it works step by step
- Charges a per-pool swap fee, taken directly from swap amounts through return deltas.
- Splits collected fees between a pool creator (a fixed creator share) and a pot or fee recipient, recorded as amounts owed per recipient and token.
- Recipients withdraw owed fees through a collect function that pulls tokens from the Uniswap v4 PoolManager.
- Only registered factory or spoke contracts can initialize pools, and adding liquidity is checked against known pools.
- An admin can register spokes and change the admin; pool configuration includes a fee value validated against a maximum.
- Swap behaviour
- Each swap is charged the pool's configured fee, taken from the input in beforeSwap or from the output in afterSwap, and credited to the fee recipients. The exact fee level cannot be read from bytecode, and an invalid fee is rejected with a BadFee error.
- Liquidity behaviour
- Adding liquidity is checked to confirm the pool is registered, otherwise it reverts. Remove-liquidity callbacks are disabled, so LPs can always withdraw freely.
- Fee behaviour
- Swap fees are set per pool and capped by a maximum fee constant that cannot be verified from bytecode. Fees are split by a fixed creator share, with the rest going to a pot or protocol recipient, and recipients claim them later.
- Owner & admin controls
- The admin can change the admin address and register spoke contracts that create and configure pools. Configuration functions appear able to set pool fee parameters, which are validated against a maximum that cannot be confirmed from bytecode.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize: allows only registered spokes or factories to create pools; beforeAddLiquidity: rejects liquidity for unknown pools; beforeSwap: computes the fee and can take it from the swap input; afterSwap: settles the fee on the output side and records it as owed; beforeSwapReturnDelta and afterSwapReturnDelta: let the hook deduct the fee from swap amounts.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, medium confidence).
Who controls it: A single admin key can register spokes and transfer admin rights, and through spokes can influence pool fee settings. The admin cannot touch LP principal.
Risk to user funds: The hook takes a configured fee from swap amounts and holds it as claims in the PoolManager until recipients collect it. The exact maximum fee is unknown from bytecode, and LP principal cannot be locked or drained.
Security findings
- [medium] Swap fee taken via return deltas: The hook can deduct fees from swap input or output. The maximum fee is enforced by a BadFee check, but the exact cap is not verifiable from bytecode.
- [low] Admin-registered spokes configure pools: The admin controls which spoke contracts can create pools and set their fee parameters.
- [info] LP withdrawals unrestricted: Remove-liquidity callbacks are disabled, so the hook can never block or charge LP withdrawals.
Contract details
- Verified source
- No
- Bytecode size
- 6,850 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, return-delta, self-unlock
Pools using Fee sharing hook
- TEST / USDC (0.00% fee) — 24h volume $0, TVL $0, 6 swaps today