Dynamic fee hook on Robinhood Chain
Uniswap v4 Hook Contract 0xe95c83dffe5870e24e41b639d33148bc4c03f8c4 on Robinhood Chain · Dynamic fee
- Volume (24h)
- $12
- Value locked (TVL)
- $56
- All-time volume
- $101.20K
- Pools using this hook
- 50
- Swaps (24h)
- 68 (45 traders)
- Total swaps
- 4,356
What it does
A Uniswap v4 hook that applies owner-configurable dynamic fees per pool and takes a protocol share of swap output for a fee recipient.
How it works step by step
- Records pool configuration at initialization via beforeInitialize and afterInitialize
- Resolves a per-pool fee from a stored override or the owner-set default fee
- Takes a protocol fee share from swap output through afterSwapReturnDelta
- Sends the protocol fee to a configurable fee recipient
- Exposes owner-only functions to adjust default fees, per-pool fees, protocol fee rate and recipient
- Swap behaviour
- beforeSwap and afterSwap run on every swap; the hook resolves the pool fee, records state, and in afterSwap can take a protocol fee from the output via return delta.
- Liquidity behaviour
- beforeAddLiquidity updates per-pool bookkeeping in storage; beforeRemoveLiquidity and afterRemoveLiquidity selectors are present in the dispatch table, and afterAddLiquidity is also dispatched, but no liquidity callback is enabled in the hook permissions, so these are not invoked by the PoolManager.
- Fee behaviour
- Fees are resolved per pool via getFee, using a per-pool override stored in mappings when set, otherwise the owner-set defaultFee. The hook has a protocolFeeRate and feeRecipient, and afterSwap appears to read the fee configuration and may take a protocol share of swap output via afterSwapReturnDelta. Exact fee math could not be confirmed without source.
- Owner & admin controls
- Owner (slot 0) can set the default fee via setDefaultFee, set per-pool fees via setPoolFee, remove pool fee overrides via removePoolFee, set the protocol fee rate via setProtocolFeeRate, change the fee recipient via setFeeRecipient, and transfer or renounce ownership. Admin functions are selector-dispatched without any pausing or upgrade mechanism found in the decoded bytecode.
Enabled Uniswap v4 callbacks
beforeInitialize, afterInitialize, beforeAddLiquidity, beforeSwap, afterSwap, afterSwapReturnDelta
beforeInitialize and afterInitialize record pool configuration at pool creation. beforeAddLiquidity updates pool state on liquidity additions. beforeSwap and afterSwap read and set fee-related state and bookkeeping on each swap. afterSwapReturnDelta allows the hook to take a share of the swap output as a delta, which is how the protocol fee is collected.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, medium confidence).
Who controls it: The owner can set the default fee and any per-pool fee, including potentially very high values, which would extract value from swappers. The owner can also redirect the protocol fee by changing the fee recipient, and can take over the contract through transferOwnership.
Risk to user funds: The hook does not appear to custody user principal, but it does take a share of swap output through afterSwapReturnDelta and the owner can raise that share through fee settings, so traders and pool funds can be taxed at owner-chosen rates.
Security findings
- [medium] Hook takes swap output via return delta: afterSwapReturnDelta is enabled, so the hook can take tokens from swap output. The protocol fee rate and fee recipient set by the owner determine how much is taken and where it goes.
- [medium] Owner can set arbitrary fees: setDefaultFee and setPoolFee accept a uint24 with no bound visible in the decoded dispatch. A malicious or compromised owner could set very high fees, extracting value from traders on affected pools.
- [low] Single privileged owner: Single owner controls fee parameters and recipient with no timelock or multisig evident from the bytecode.
- [info] Non-upgradeable implementation: No upgradeable proxy pattern is evident in the decoded bytecode; the contract appears to be a direct implementation.
Contract details
- Verified source
- No
- Bytecode size
- 14,116 bytes
- Upgradeable proxy
- No
- Detected patterns
- ownable, return-delta
Pools using Dynamic fee hook
- COPPERINU / USDG (Dynamic fee) — 24h volume $12, TVL $56, 4 swaps today
- COPPERINU / SLVR (Dynamic fee) — 24h volume $0, TVL $0, 10 swaps today
- COPPERINU / SLVR (Dynamic fee) — 24h volume $0, TVL $0, 9 swaps today
- COPPERINU / SLVR (Dynamic fee) — 24h volume $0, TVL $0, 9 swaps today
- COPPERINU / SLVR (Dynamic fee) — 24h volume $0, TVL $0, 9 swaps today
- COPPERINU / SLVR (Dynamic fee) — 24h volume $0, TVL $0, 8 swaps today
- COPPERINU / SLVR (Dynamic fee) — 24h volume $0, TVL $0, 7 swaps today
- COPPERINU / SLVR (Dynamic fee) — 24h volume $0, TVL $0, 7 swaps today
- COPPERINU / VAULT (Dynamic fee) — 24h volume $0, TVL $0, 5 swaps today
- ETH / COPPERINU (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / COPPERINU (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / COPPERINU (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- COPPERINU / USDG (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- COPPERINU / USDG (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / COPPERINU (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / COPPERINU (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- COPPERINU / VAULT (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- COPPERINU / SLVR (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / COPPERINU (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / COPPERINU (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today