Dynamic fee hook on Arc
Uniswap v4 Hook Contract 0x55adf5ac640bfdb0937c616506c25de7c5d920cc on Arc · Dynamic fee
- Volume (24h)
- $9.00
- Value locked (TVL)
- $0
- All-time volume
- $9.00
- Pools using this hook
- 1
- Swaps (24h)
- 2 (1 traders)
- Total swaps
- 2
What it does
A per-launch permanent fee hook that charges every swap a quote-asset tax (creator tax plus 1% base) with a decaying anti-snipe surcharge in the first three seconds, routing fees to a dividend splitter and treasury.
How it works step by step
- Overrides the pool's dynamic fee to zero on every swap and collects the full fee in the quote asset instead.
- Charges creator tax on buys and sells separately (each leg 1% to 10%) plus a 1% base fee, totaling up to 11%.
- Applies a 99% opening surcharge decaying across 3 seconds, sent entirely to the treasury, with a cap so total fee never exceeds 99% of gross.
- Refuses exact-output swaps during the opening surcharge window to prevent large gross-up fills.
- Latches bond and KOTH milestones on-chain the first time the pool tick crosses the configured thresholds.
- Accrues the dividend share of each fee to the token's reward ledger and reclassifies any undistributable remainder to the treasury.
- Swap behaviour
- Each swap takes the whole fee in the quote asset: via beforeSwap when the quote is the specified side (exact-input buys, exact-output sells) and via afterSwap when the quote is unspecified (exact-input sells, exact-output buys). The pool fee is overridden to zero. Exact-output swaps revert during the opening surcharge window unless the sender is exempt.
- Liquidity behaviour
- No liquidity callbacks. Liquidity is not taxed by this hook; the hook only acts on swaps.
- Fee behaviour
- Every swap pays a quote-denominated fee: the composite (creator leg tax 1% to 10% plus a 1% base fee) taken on whichever side is the quote asset, using beforeSwap when the quote is specified and afterSwap when it is unspecified. The pool's own fee is overridden to zero on every swap. An additional decaying opening surcharge (99% at launch, halving on a schedule, zero after 3 seconds) is sent to the treasury, capped so bucket fee plus surcharge never exceeds 99% of the gross. Fees are split between the splitter (dividend share is accrued via the token's accrueQuoteReward, with any non-distributable remainder reclassified to treasury) and the treasury.
- Owner & admin controls
- No owner, no setters: every parameter (poolManager, portal, splitter, treasury, quoteAsset, executors, tickSpacing, buyTaxBps, sellTaxBps) is immutable and fixed at construction. The only privileged actions are one-shot Portal-only binds: beforeInitialize (pool id, token, quote side, launch timestamp, launch block), bindBond, bindKoth, and bindSnipeExempt (the opening-surcharge exemption list, fixed once). The Portal address itself is immutable and is the sole caller for these binds, so the Portal's correctness governs which pool and exemptions get bound. No pause, no upgrade path, no fee-recipient change.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize: binds the hook to the single pool it will serve and records the token, quote side and launch time. beforeSwap: classifies the swap shape, records a pending swap in transient storage, takes the fee on the specified quote side and returns a zero dynamic-fee override. afterSwap: verifies the fill, latches bond and KOTH milestones from the pool tick, and takes the fee and surcharge on the unspecified quote side. beforeSwapReturnDelta and afterSwapReturnDelta: allow the hook to take fee amounts via return deltas.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: Immutable configuration means no privileged key can alter fees or pause trading after deployment. The Portal is the only party able to perform the one-shot binds; if the Portal were compromised at bind time it could bind a wrong pool, token, exemption list or milestone ticks, but could not change fees afterward.
Risk to user funds: The hook takes a quote-asset fee from every swap and can hold or move funds only transiently during the swap frame. It cannot withdraw pool liquidity or user balances beyond the defined fee and surcharge. Fee destinations are immutable. Risk is primarily that the fee rate is high by design (up to 11% composite plus surcharge) and that swaps can revert in the opening window for exact-output requests.
Security findings
- [info] Exact-output refused during opening window: Exact-output swaps revert with ExactOutputInSnipeWindow while the opening surcharge is live (first 3 seconds), except for exempt senders. Traders attempting exact-output in that window will fail.
- [low] Opening-surcharge exemption keyed on tx.origin: Wallets in snipeExemptOf are identified by tx.origin, not by the direct caller. This waives only the opening surcharge, not the base fee. A contract wallet cannot be listed; the signer address must be named instead.
- [low] Swap liveness depends on fee recipients accepting transfers: The hook takes fees via return deltas and PoolManager.take. If a take fails (e.g. the splitter or treasury transfer reverts), the swap reverts with no fallback, so a misbehaving recipient could block trading. Recipients are fixed at construction and are Portal-deployed contracts.
- [low] External call to launched token inside swap: The dividend accrual calls into the launched token contract (accrueQuoteReward) during afterSwap. Correctness of accounting depends on that token implementation honouring the interface.
Contract details
- Verified source
- No
- Bytecode size
- 10,423 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, return-delta
Pools using Dynamic fee hook
- USDC / QUIETKFWB (Dynamic fee) — 24h volume $9.00, TVL $0, 2 swaps today