RoutrFeeHook on Ethereum
Uniswap v4 Hook Contract 0x52bc98c2fc9bfc82c9f7c93a1ca06931225e12cc on Ethereum · Launchpad · Verified contract
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 1 (1 traders)
- Total swaps
- 1
What it does
This hook charges ETH buyers of the ROUTR token a launch fee that starts at up to 30% and decays to 2% over the first hour, charges sellers a flat 2%, lets exempt addresses trade fee-free, and permanently locks liquidity providers' positions.
How it works step by step
- Charges a time-decaying launch fee on ETH-side buys of the ROUTR token pool during the first hour after initialization, falling from maxLaunchFee to normalFee.
- Charges a flat normalFee (2%) on all other swaps for non-exempt senders.
- Takes the fee as ETH via poolManager.take in beforeSwap for exact-input buys, or in afterSwap for other cases, using the unspecified-currency return delta.
- Splits collected ETH fees between a vault (1.5% of gross) and a dev wallet (0.5% of gross) by direct ETH transfers.
- Blocks liquidity removal permanently via beforeRemoveLiquidity, locking LP positions.
- Exempts configured addresses (vault, dev wallet, owner, hook itself, and any address set by owner) from fees.
- Swap behaviour
- Non-exempt buys of the token paying ETH pay a launch fee that decays linearly from maxLaunchFee to normalFee over LAUNCH_WINDOW (3600 seconds) after the pool is initialized, then settle at normalFee; non-exempt sells pay normalFee (2%) throughout; exempt senders pay no fee. Exact-output sells where ETH is the specified output skip the fee entirely.
- Liquidity behaviour
- Adding liquidity is unrestricted and generates no hook callbacks. Removing liquidity reverts with 'LP locked' for every caller, so liquidity is effectively permanently locked in the pool.
- Fee behaviour
- Fees are computed as a percentage of gross ETH swapped, taken via return deltas, then split 1.5% to vault and 0.5% to dev wallet. Fee rates are adjustable by the owner only within bounds: normalFee can only decrease and cannot go below 0.5%; maxLaunchFee can only decrease and cannot go below normalFee.
- Owner & admin controls
- Owner (OpenZeppelin Ownable, non-proxy, no pause or upgrade functions visible) can: add or remove fee exemptions with setExempt; lower normalFee and maxLaunchFee within the stated floors; rescue any ETH held by the hook to an arbitrary address via emergencyRescue; renounce or transfer ownership. Vault, dev wallet, and token addresses are immutable.
Enabled Uniswap v4 callbacks
afterInitialize, beforeRemoveLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
afterInitialize records the launch timestamp and validates the pool contains ETH and the ROUTR token. beforeRemoveLiquidity reverts to permanently lock LP. beforeSwap intercepts buy fees from ETH input via poolManager.take and sets the before-swap delta. afterSwap collects fees on the unspecified currency and distributes them. beforeSwapReturnDelta and afterSwapReturnDelta allow the hook to take fee amounts from swaps.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: The owner controls fee exemptions, can lower fees within floors, and can drain any ETH the hook holds via emergencyRescue; the owner cannot raise fees, pause swaps, or change vault or dev addresses since those are immutable.
Risk to user funds: The hook holds ETH transiently during swaps and between fee collection and distribution; it does not custody token balances. Users' LP capital is locked permanently in the pool by the hook's beforeRemoveLiquidity revert, and fee-paying swappers' ETH passes through the hook before being forwarded to vault and dev wallet.
Security findings
- [info] Permanent LP lock: beforeRemoveLiquidity always reverts with 'LP locked', so liquidity providers cannot withdraw; this is intentional per the code comments but means LP capital is irrecoverable.
- [medium] Owner can rescue hook ETH to any address: emergencyRescue lets the owner send the hook's full ETH balance to any address, which can include fees accrued but not yet forwarded and any ETH sent via receive().
- [medium] Exact-output sell fee gap: The contract's own comments acknowledge that exact-output sells where ETH is the specified amount skip the fee entirely, so those trades avoid the fee.
- [low] Owner-exempt control over fees: The owner can exempt any address via setExempt, letting chosen traders swap without paying the 2% or launch fee.
- [low] Unrestricted hook ETH transfers via fee distribution: Vault and dev fee transfers use low-level call with gas forwarded; a reverting vault or dev wallet blocks all fee-paying swaps through require failures.
Contract details
- Verified source
- Yes (RoutrFeeHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 7,492 bytes
- Upgradeable proxy
- No
- Detected patterns
- launchpad, liquidity-management, moves-currency, ownable, return-delta