Dynamic fee hook on Arc
Uniswap v4 Hook Contract 0xd7b2d96b239aa98cb9816386e63997b6526d2044 on Arc · Dynamic fee
- Volume (24h)
- $43.75K
- Value locked (TVL)
- $0.35
- All-time volume
- $43.75K
- Pools using this hook
- 1
- Swaps (24h)
- 7,265 (496 traders)
- Total swaps
- 7,265
What it does
This hook takes a fixed creator tax of up to 9.9% on each swap, plus a steep anti-snipe tax that is near 99% for the first three seconds after launch and then drops to zero, so buyers in the opening window pay far more than later traders.
This read was written for the hook 0x2b22…e044 on Arc 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 creator-set tax of up to 9.9% on swaps by taking a hook delta in the unspecified currency inside PoolManager.swap, applied via afterSwapReturnDelta.
- Applies an extra opening snipe tax that starts at 99% and decays in integer right-shift steps over a three-second window after the pool is initialized.
- Splits the collected tax: the snipe portion goes to the treasury and the creator portion goes to an immutable splitter, both via PoolManager.take.
- Latches a one-shot bonded flag the first time the pool tick crosses a Portal-set bond tick, read via extsload on the PoolManager in afterSwap.
- Binds itself to exactly one pool in beforeInitialize, refusing any other pool key, so a stranger cannot reuse the hook for their own pool.
- Swap behaviour
- Swaps pay the pool's 1% LP fee plus a creator tax (buyTaxBps on buys where the quote asset is the input, sellTaxBps on sells) of up to 9%, and during the first three seconds after launch an additional snipe tax that starts at 99% and drops to about 6.2%, then 0.2%, then zero. The Portal's own opening buy is exempt from the snipe tax, and so is the splitter's netting swap. The fee lands in the quote asset or the token depending on trade direction and exact-input versus exact-output.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Uses the pool's static 1% LP fee plus the hook's dynamic tax: a fixed creator rate per direction (both immutable, 0 to 10%, not both zero) and a time-decaying snipe rate during the opening window. Creator tax is split with the immutable splitter; snipe tax goes to the immutable treasury. Rounding is down.
- Owner & admin controls
- No owner, no pause, no setters, no upgrade path. Tax rates, splitter, treasury, pool key and bond tick are all immutable or written once by the Portal. bindBond is callable only by the Portal and only once.
Enabled Uniswap v4 callbacks
beforeInitialize, afterSwap, afterSwapReturnDelta
beforeInitialize: binds the hook to its single pool and records launch time and token from the pool key, restricted to the Portal as initializer. afterSwap: latches the bond flag, computes and takes the tax, and returns it as a positive hook delta so PoolManager reduces the swapper's credit. afterSwapReturnDelta: enables that returned delta to change the swap's net amounts.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, medium confidence).
Who controls it: Essentially none: no privileged key can change fees, pause trading, or redirect funds after deployment. Only the Portal can make the one-time bind calls during launch.
Risk to user funds: The hook holds no user funds between transactions; it takes its tax inside the swap and forwards it to the immutable splitter and treasury via PoolManager.take. It can block swaps through reverts but cannot move or withdraw pool liquidity.
Security findings
- [medium] Hook can take up to 99% on swaps in the opening window: The snipe tax is applied before any swap in the first three seconds, starting at 9900 bps; the code clamps the total at 9900 bps so the pool stays tradeable, but early buyers receive almost nothing.
- [high] Revert in afterSwap bricks the pool permanently: take() is not wrapped in a try/catch, so a failing transfer reverts the swap and, with no admin or upgrade path, the pool cannot be recovered. This is an accepted design trade-off documented in the source.
- [medium] Opening tax can flow back to its payer via the splitter: Holder-paying distribution is permissionless, so a sniper who funds the dividend bucket and then cranks it can recover part of the tax; the source measured this and mitigated part of it by exempting the splitter's swap from the snipe tax.
- [low] Extsload dependency on PoolManager for bond latch: afterSwap reads the pool slot0 through an external call to PoolManager.extsload inside try/catch; a failure simply defers bonding to a later swap.
Contract details
- Verified source
- No
- Bytecode size
- 5,175 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, return-delta
Pools using Dynamic fee hook
- USDC / TORCH (1.00% fee) — 24h volume $43.75K, TVL $0.35, 7,265 swaps today