BerserkBearFeeHook on Robinhood Chain
Uniswap v4 Hook Contract 0x5bea51a486a6a85e4f5c86eaad9f61851aaf0044 on Robinhood Chain · Dynamic fee · Verified contract
- Volume (24h)
- $0
- Value locked (TVL)
- $10
- All-time volume
- $41.46K
- Pools using this hook
- 460
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 1,878
What it does
Every swap in these pools pays a small platform fee of up to 1% that is taken from the output on exact-input swaps and added to the input on exact-output swaps, then sent to the treasury, so traders always receive slightly less or pay slightly more than the pool price.
How it works step by step
- Takes a fixed fee of feeBps (capped at MAX_FEE_BPS = 100, i.e. 1%) from each swap after it executes, in the unspecified currency of the swap
- Exact-input swaps pay the fee out of the output token; exact-output swaps pay it out of the input token
- Sends the collected fee directly to the treasury address via PoolManager.take, so the hook holds no balance
- Emits HookFeeTaken with the pool id, currency and amount for each fee taken
- Returns a positive int128 delta so the PoolManager debits the trader and credits the hook, which is then forwarded to the treasury
- Owner can change feeBps (up to the 1% cap) and the treasury address; ownership transfer is two-step
- Swap behaviour
- After each swap, the hook takes feeBps/10000 of the unspecified-side amount: on exact-input swaps the trader receives slightly less output, and on exact-output swaps the trader pays slightly more input. Trades are otherwise unaffected, and swaps are never blocked by the hook. When feeBps is 0 no fee is taken.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- The hook charges a platform fee of feeBps (initially set at deployment, adjustable by owner up to 1%, i.e. MAX_FEE_BPS = 100) on the unspecified currency of every swap, sent to the treasury. The pool's own LP fee is separate and not modified by this hook.
- Owner & admin controls
- Owner (Ownable2Step) can call setFeeBps to change the fee anywhere from 0 to 1% and setTreasury to redirect fee recipients to any non-zero address. Ownership can be transferred in two steps and renounced. There is no pause function and no upgradeability.
Enabled Uniswap v4 callbacks
afterSwap, afterSwapReturnDelta
afterSwap: charges the platform fee after each swap and forwards it to the treasury. afterSwapReturnDelta: allows the hook to return a positive delta that takes the fee amount from the swapper's settlement.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: A single owner key controls the fee rate (up to 1%) and the treasury destination. A compromised or malicious owner could direct all fee revenue to an attacker-controlled address or raise fees to the cap immediately, but could not seize pool liquidity, block swaps, or change the core pool parameters.
Risk to user funds: The hook does not hold any balance; collected fees are taken and forwarded to treasury within the same swap. Traders' swap settlement is directly affected by the fee amount, and the hook can route those fees to any address the owner sets.
Security findings
- [medium] Owner can redirect fees to any address: setTreasury lets the owner set the treasury to any non-zero address instantly, so all future fee revenue, which is taken from traders' swap amounts, can be sent wherever the owner chooses.
- [low] Owner can raise fee up to 1% on all swaps: setFeeBps can set feeBps anywhere up to MAX_FEE_BPS (100 bps). The owner can change this at any time with no timelock, so existing traders can face up to a 1% extra cost per swap immediately.
- [info] Hook takes currency via return deltas: afterSwapReturnDelta causes the PoolManager to debit the swapper for the fee amount and the hook is credited, then take() moves it to treasury. This is the intended fee mechanism but it means the hook is entitled to move swapper funds.
- [info] Fee taken from unspecified currency can reduce swap output: On exact-input swaps the fee reduces trader output; on exact-output swaps it increases trader input. Traders should be aware the fee is not visible in the pool LP fee.
- [low] Hook could fail on swaps if treasury is a non-accepting contract: poolManager.take sends tokens to the treasury address; if the treasury is a contract that rejects ERC-20 transfers, swaps in the affected pools would revert.
Contract details
- Verified source
- Yes (BerserkBearFeeHook)
- Compiler
- solc 0.8.30+commit.73712a01
- Bytecode size
- 8,890 bytes
- Upgradeable proxy
- No
- Detected patterns
- dynamic-fee, moves-currency, ownable, return-delta
Pools using BerserkBearFeeHook
- FTUSD / USDG (4.00% fee) — 24h volume $0, TVL <$0.01, 0 swaps today
- FIFE / USDG (4.00% fee) — 24h volume $0, TVL <$0.01, 0 swaps today
- USDG / CHEQUE (4.00% fee) — 24h volume $0, TVL <$0.01, 0 swaps today
- USDG / POKÉ (4.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / ZC (4.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- RVN / USDG (3.80% fee) — 24h volume $0, TVL $0, 0 swaps today
- CLAIMED / USDG (4.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / xSwap (4.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / KABO (4.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / LAUNCHOOD (4.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / SCAN (4.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / ELIEN (4.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / Prestocks (4.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / MUSEX (4.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / Mike (4.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- JEV / USDG (4.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / UPDN (4.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / MUSEPAD (4.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / FOMOBAG (4.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / CEREBRO (3.80% fee) — 24h volume $0, TVL $0, 0 swaps today