UniHook on BNB Chain
Uniswap v4 Hook Contract 0x7996b634dff2ae3c07810d93c5b8b589120738ec on BNB Chain · Fee sharing · Verified contract
- Volume (24h)
- $159
- Value locked (TVL)
- $19
- All-time volume
- $159
- Pools using this hook
- 1
- Swaps (24h)
- 5 (2 traders)
- Total swaps
- 5
What it does
Every swap on a coin pool pays a fee taken from the host token, with the sniper rate applying during the launch window for everyone except the locker and the normal rate after, and the fee is split between creator, treasury and a burn that cascades up the host chain.
How it works step by step
- Charges a fee on every swap of an .AI Pad coin pool by taking it from the host leg: out of the host on buys and out of the host on sells
- Splits each fee into creator and treasury shares, credited as ERC-6909 claims to the FeeVault, and a burn share
- Cascades the burn share up the host chain by selling the slice into each host's own pool, so every level including the root is burned
- Uses a sniper fee rate and a per-swap buy cap during a short window after launch, with the locker's own first buy exempt
- Tracks the pool's price against the launch and graduation prices and marks graduation on first crossing
- Blocks liquidity additions from anyone but the locker and refuses donations
- Swap behaviour
- Buys and sells pay the fee on the host leg. Swaps where the trader fixes the host amount (exact-input buys, exact-output sells) are charged in beforeSwap; other swaps are charged in afterSwap via a hook delta. The fee is the sniper rate during the sniper window for everyone except the locker, and the normal fee afterwards. Swaps that stop early on a price limit revert with PartialFill, and swaps past the launch price revert with PriceBeyondStart.
- Liquidity behaviour
- Only the locker can add liquidity (beforeAddLiquidity reverts for any other sender). Removing liquidity is not hooked, so the locker's positions are the only liquidity and no other party can add to them.
- Fee behaviour
- Coin pools have a 0 LP fee; the hook charges the whole fee. The rate is the sniper rate during the window and the normal rate afterwards, with a minimum of 0.25% and a maximum of 5% for the normal rate. The fee is split into burn, creator and treasury shares by launch settings fixed at registration. The burn share is routed up the host chain, and the creator and treasury shares are credited to the vault.
- Owner & admin controls
- No owner, admin role, pause or upgrade path is visible in the source. Config is set once per coin through register by the locker address, which is fixed at deploy as the deployer. Launch settings are described as changeable by a factory admin only for future launches, but that admin is not part of this hook's code.
Enabled Uniswap v4 callbacks
beforeInitialize, afterInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeDonate, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize checks the pool is the locker's registered pool at its launch price. afterInitialize starts the sniper window. beforeAddLiquidity restricts liquidity to the locker. beforeDonate reverts so donations are refused. beforeSwap computes the fee on exact-input buys and exact-output sells. afterSwap checks price, marks graduation, enforces the sniper buy cap, and takes the fee on the other swap directions via a return delta. beforeSwapReturnDelta and afterSwapReturnDelta are enabled because the hook takes its fee as a delta.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: The locker key can register pool configs and add liquidity, and its own swaps pay no sniper fee or buy cap. It cannot change fees after registration or pause trading in this hook's code.
Risk to user funds: The hook never holds tokens or claims; fees are settled as ERC-6909 claims minted to the vault in the same swap, and cascade swaps are settled with the fee's own deltas. Traders pay the fee on every swap, and the hook can block swaps via PriceBeyondStart and PartialFill reverts.
Security findings
- [info] Hook takes a fee via return deltas: afterSwap and beforeSwap return deltas let the hook take host tokens from every swap on coin pools. This is the intended fee mechanism and is bounded by a 5% normal cap and sniper cap, but it means swaps always pay the fee.
- [medium] Locker controls pool registration and liquidity: The locker address (set to the deployer) alone can register configs and add liquidity, and its own swaps are exempt from the sniper fee and buy cap. Users depend on that address being honest about the launch config.
- [low] Cascade swaps bypass fee and hook callbacks: The hook sells burn slices into parent pools via its own swaps; these are fee-free and skip hook callbacks, capped at the parent's launch price. Failure to sell leaves the slice burned at the current level instead, so funds are not stuck.
- [low] Price-based revert gates: Swaps that push price past the launch price or stop early on a limit revert, so a pool can refuse trades near its bounds, though no pause exists.
Contract details
- Verified source
- Yes (UniHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 11,592 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc6909-claims, launchpad, liquidity-management, mev-protection, return-delta
Pools using UniHook
- BNB / 智脑 (0.00% fee) — 24h volume $159, TVL $19, 5 swaps today