DynamicFee on Robinhood Chain
Uniswap v4 Hook Contract 0x7566a3bfbe88c06bc5f33fea927f461e8279d0c4 on Robinhood Chain · Dynamic fee · Verified contract
- Volume (24h)
- $0.80
- Value locked (TVL)
- $71
- All-time volume
- $33.18K
- Pools using this hook
- 53
- Swaps (24h)
- 4 (4 traders)
- Total swaps
- 3,319
What it does
A Uniswap v4 hook that raises the swap fee when the price has moved more ticks in the previous swap and lowers it when the market is calm, within a 0.05% to 5.00% range, while also taking a fixed 0.10% protocol fee on each swap.
How it works step by step
- Sets the starting tick of each pool at initialization
- Before each swap, sets the LP fee to 0.30% plus 0.01% per tick of the previous swap's tick move, clamped between 0.05% and 5.00%
- Emits DynamicFeeApplied with the fee used for each swap
- After each swap, takes 0.10% of the unspecified currency and sends it to the fixed AEON_FEE_RECIPIENT
- After each swap, records the absolute tick move for use in the next swap's fee
- Swap behaviour
- On each swap, beforeSwap sets the LP fee from the prior tick move, and afterSwap takes 10 bps of the unspecified currency to the fixed recipient and records the new tick move.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- The LP fee is set per swap in beforeSwap: fee = BASE_FEE (0.30%) plus lastMove times FEE_PER_TICK (0.01% per tick), clamped between MIN_FEE (0.05%) and MAX_FEE (5.00%), and returned with the override flag. Separately, the AeonFee base takes a fixed 10 bps of the unspecified currency on every swap and sends it to the immutable recipient 0xF1E958db7D1e4C074377946018Ad645db4FB158e.
- Owner & admin controls
- No admin controls found. The protocol fee recipient (AEON_FEE_RECIPIENT) and rate (AEON_FEE_BPS) are compile-time constants and cannot be changed; fee parameters BASE_FEE, MIN_FEE, MAX_FEE, FEE_PER_TICK are also constants. No owner, pause, or upgrade functions appear in the ABI.
Enabled Uniswap v4 callbacks
afterInitialize, beforeSwap, afterSwap, afterSwapReturnDelta
afterInitialize records the starting tick for the pool. beforeSwap refreshes the starting tick, computes and applies the dynamic fee override. afterSwap (inherited) takes the 10 bps protocol fee via poolManager.take and then records the absolute tick move from the swap for the next swap's fee. afterSwapReturnDelta is enabled so the hook's afterSwap return value adjusts the swap's delta by the taken fee.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: No privileged role is present, so no single key can alter fees or pause swaps. The protocol fee recipient is hardcoded and cannot be redirected after deploy.
Risk to user funds: The hook does not hold user funds between transactions, but on every swap it takes a 10 bps fee from the unspecified currency and sends it to the fixed recipient through the return delta mechanism. A revert in the hook would block swaps in the pool rather than lock funds.
Security findings
- [medium] Return-delta hook moves the token ledger: afterSwap takes the protocol fee via poolManager.take on every swap and returns a matching return delta, which moves the token ledger; a bug here would revert all swaps for the pool.
- [info] Fee can rise to 5.00% during volatility: The fee is clamped to MAX_FEE of 5.00%, so traders can pay up to 5.00% plus the 0.10% protocol fee during volatile periods.
- [info] Mandatory 10 bps protocol fee: The 10 bps protocol fee is applied to the unspecified currency on every swap, which the base contract enforces and which derived hooks cannot override.
- [info] Fee is based on the prior swap's tick move: The fee uses the previous swap's tick move, so the first swap after a large move pays a fee based on that move, and LPs cannot control the parameters.
Contract details
- Verified source
- Yes (DynamicFee)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 2,516 bytes
- Upgradeable proxy
- No
- Detected patterns
- dynamic-fee, moves-currency, return-delta
Pools using DynamicFee
- USDG / EMPIREX (Dynamic fee) — 24h volume $0.80, TVL $8.83, 4 swaps today
- ETH / CRH (0.90% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / INSIDER (0.90% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / people (Dynamic fee) — 24h volume $0, TVL <$0.01, 0 swaps today
- USDG / NORMIE (3.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / VOGE (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- AI / USDG (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / FOMOSEEK (0.25% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / DUCS (5.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / SAYLORMOON (0.90% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / SAYLORMOON (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / Analyst (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / VOGE (0.25% fee) — 24h volume $0, TVL $0, 0 swaps today
- CAP / USDG (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- HookDeploy / USDG (1.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- OOPAD / USDG (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / ZZZ (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- PONSION / USDG (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / BPOOL (0.25% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / OOPAD (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today