Dynamic fee hook on BNB Chain
Uniswap v4 Hook Contract 0x6ba3e977dff4bb7abccebfbc508e56f5534befcf on BNB Chain · Dynamic fee
- Volume (24h)
- $2.29K
- Value locked (TVL)
- $8.33K
- All-time volume
- $65.28K
- Pools using this hook
- 1
- Swaps (24h)
- 60 (12 traders)
- Total swaps
- 2,498
What it does
A Uniswap v4 hook on BSC that hooks into initialization, liquidity and swap events, with dynamic-fee and anti-MEV features and an owner-controlled upgradeable implementation.
How it works step by step
- Runs on pool initialization to validate the pool and expected pool id
- Runs before and after add and remove liquidity, with return deltas for accounting
- Runs before and after swaps, with return-delta permissions and dynamic fee logic
- Exposes an owner-toggled anti-MEV flag that changes swap handling
- Uses ERC6909 claims and an unlock callback pattern with settle and take
- Operates behind an upgradeable ERC1967 proxy controlled by the owner
- Swap behaviour
- beforeSwap and afterSwap callbacks run on every swap, with return-delta permissions that let the hook adjust fees or amounts; the anti-MEV flag appears to affect this path.
- Liquidity behaviour
- Hooks run before and after add and remove liquidity, and after-liquidity callbacks return deltas, so the hook can adjust or claim balances on LP actions. The specific mechanics cannot be confirmed without source.
- Fee behaviour
- Uses dynamic fee mechanics (updateDynamicLPFee is referenced and beforeSwap can override the fee); the exact fee formula cannot be determined from decoded bytecode alone, and the anti-MEV toggle plausibly affects the fee applied to swaps.
- Owner & admin controls
- Owned by an Ownable owner who can call transferOwnership and renounceOwnership, set the anti-MEV flag via setAntiMevEnabled, and toggle other parameters through owner-gated setters (selectors 0x36498f29, 0x915dde0f, 0x5fc235c9). Proxy upgrades are possible via upgradeToAndCall, so the owner can replace the implementation logic entirely.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity, afterRemoveLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta, afterAddLiquidityReturnDelta, afterRemoveLiquidityReturnDelta
beforeInitialize validates pool setup; beforeAddLiquidity and beforeRemoveLiquidity and their after variants gate or account for LP actions; beforeSwap and afterSwap run around swaps and can alter the fee; beforeSwapReturnDelta, afterSwapReturnDelta and afterAdd/RemoveLiquidityReturnDelta let the hook take or give tokens as part of the pool accounting.
Security & trust assessment
Risk level: high (decoded bytecode, low confidence).
Who controls it: The owner can change anti-MEV and other parameters, transfer ownership, and upgrade the implementation through the proxy, which could alter swap or LP behaviour or redirect funds the hook controls.
Risk to user funds: The hook has return-delta permissions and can move tokens during swaps and LP actions, and its implementation can be upgraded by the owner, so it can in principle hold, move or block pool and user funds.
Security findings
- [high] Upgradeable proxy controlled by owner: The hook is a proxy with an owner-controlled upgrade path (upgradeToAndCall), so the code users interact with can be replaced at any time.
- [medium] Return delta permissions can move funds: Return-delta permissions let the hook take or supply tokens during swaps and liquidity changes, so a privileged or buggy path could move pool funds.
- [medium] Owner can change swap-affecting parameters: The owner can toggle anti-MEV protection and other settings that change swap behaviour for all users.
- [low] Self-unlock and claims accounting complexity: The hook uses an ERC6909 claims and unlock pattern with settle and take calls, which adds accounting complexity that could hold tokens if mishandled.
Contract details
- Verified source
- No
- Bytecode size
- 135 bytes
- Upgradeable proxy
- Yes
- Detected patterns
- dynamic-fee, erc6909-claims, moves-currency, ownable, return-delta, self-unlock, upgradeable
Pools using Dynamic fee hook
- USDT / PARK (Dynamic fee) — 24h volume $2.29K, TVL $8.33K, 60 swaps today