DTFFeeHook on Robinhood Chain

Uniswap v4 Hook Contract 0x380a2836760631d8b69ac1cbafce60bb919b40cc on Robinhood Chain · Dynamic fee · Verified contract

Volume (24h)
$28.98K
Value locked (TVL)
$39.86K
All-time volume
$5.54M
Pools using this hook
1
Swaps (24h)
2,941 (6 traders)
Total swaps
220,291

What it does

A Uniswap v4 swap-tax hook for the DTF/USDG pool that takes a fee in USDG on each swap and sends it to the DTF treasury, with a decaying launch tax of up to 90% in the first 24 hours to deter snipers.

How it works step by step

  • Charges a fee in the fee token (USDG) on swaps of any pool containing it and sends it to the treasury
  • Uses beforeSwap to tax swaps where USDG is the specified amount and afterSwap where USDG is the unspecified amount
  • Starts a per-pool launch window on the first swap and applies a linearly decaying launch tax from launchTaxStartBps down to feeBps
  • Exempts the protocol's swapGateway and launcher from the launch tax so the UI and team buy pay only the baseline fee
  • Passes through untaxed any pool that does not contain the fee token
  • Never custodies funds: poolManager.take sends fees directly to the treasury
Swap behaviour
On every swap of a pool containing USDG, beforeSwap or afterSwap takes a fee in USDG (depending on whether USDG is the specified or unspecified side) and forwards it to treasury. Swaps via the swapGateway or launcher pay the baseline feeBps; other senders pay the decaying launch tax during the first launchWindow after the pool's first swap.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Takes a fee in the fee token (USDG) on every swap of a pool containing it. Baseline feeBps defaults to 300 (3%). During the launch window, non-exempt senders pay launchTaxStartBps (9000 bps at deploy) decaying linearly to feeBps over launchWindow. The swapGateway and launcher pay only feeBps. Pools without the fee token pay nothing. Fees are sent straight to treasury via poolManager.take, not held by the hook.
Owner & admin controls
AccessManaged authority (global DTFManager, default ADMIN_ROLE) can call setFeeBps (capped at 5% / 500 bps), setTreasury (redirects all fees), and setLaunchTaxStartBps (decrease-only). launchWindow, feeToken, launcher and swapGateway are immutable. No pause, upgrade proxy or owner withdrawal function is present.

Enabled Uniswap v4 callbacks

beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeSwap: stamps the pool's launch window on first swap and takes the fee when the fee token is the specified amount. afterSwap: takes the fee when the fee token is the unspecified amount. beforeSwapReturnDelta and afterSwapReturnDelta: allow the hook to return deltas so it can charge the swapper in the fee token.

Security & trust assessment

Risk level: medium (verified source, high confidence).

Who controls it: A compromised ADMIN_ROLE key could set the baseline fee to 5% and redirect the treasury to an attacker address, diverting all future fees. The launch tax can only be lowered, so an admin cannot raise it against traders. Access control is set through an external AccessManager whose role configuration is not visible here.

Risk to user funds: The hook never holds funds: fees go directly to treasury. It can take up to the configured fee (max 5% ordinary, up to 90% during launch) from each swap's fee-token side, and it can revert swaps that exceed the PoolManager's available fee-token balance at launch-tax rates.

Security findings

  • [medium] Swaps can revert at launch-tax rates: Fees are taken with poolManager.take inside beforeSwap at launch-tax rates; a large non-exempt buy can revert if the PoolManager does not hold enough fee token, so some swaps fail by design.
  • [medium] Treasury redirect by admin: setTreasury lets the authority redirect every future fee to any non-zero address with no timelock or event-level safeguard beyond TreasurySet.
  • [low] Exemption limited to two addresses: The sender exemption is keyed on immutable swapGateway and launcher addresses. Users trading through other routers pay the full launch tax, which is intended but means third-party integrations are penalised.
  • [info] Fee rates are bounded in code: The hook sets a 5% cap on feeBps and a 90% cap on launch tax at construction, bounding the worst-case tax a trader can pay.

Contract details

Verified source
Yes (DTFFeeHook)
Compiler
solc 0.8.28+commit.7893614a
Bytecode size
7,402 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, launchpad, moves-currency, return-delta, tax

Pools using DTFFeeHook