BasedBidHook on Robinhood Chain
Uniswap v4 Hook Contract 0x037bf303462bb3cde80038a1945cd10af1ebdacc on Robinhood Chain · Dynamic fee · Verified contract
- Volume (24h)
- $13.94K
- Value locked (TVL)
- $23.47K
- All-time volume
- $702.72K
- Pools using this hook
- 195
- Swaps (24h)
- 100 (59 traders)
- Total swaps
- 7,328
What it does
A Uniswap v4 hook that layers configurable hook fees (static, tiered or dynamic), an admin fee, launch buy limits and fee-distribution logic onto swaps in pools for a project token, with the proceeds routed to LP donations, buybacks, reward distribution and a treasury.
How it works step by step
- Charges a hook fee on every external swap in a pool, sourced as either a static per-direction rate, a tiered schedule keyed on trade size, or a dynamic rate driven by tick movement and a surge decay.
- Takes the whole fee from the non-project token when the project token is the unspecified leg, or takes a percentage of the non-project output otherwise.
- Splits accrued non-project fees into an admin fee for the treasury, an optional donation to in-range liquidity, and a pending pool of fees for later distribution.
- Applies a cooldown penalty surcharge when the same tx.origin trades again within a configured window.
- Enforces per-origin buy limits during a launch whitelist period, with a separate higher cap for whitelisted wallets.
- Distributes accumulated fees via unlock callbacks to buyback conversions, reward trackers, custom wallets and a referral address, and can auto-trigger distribution once a threshold is reached.
- Swap behaviour
- beforeSwap computes the hook fee and, when the project token is the unspecified leg, takes the full fee from the specified non-project token and returns a before-swap delta. afterSwap takes a percentage fee on non-project output, enforces launch buy limits and volume accounting, and records the trade timestamp. Nested swaps during distributions are rejected.
- Liquidity behaviour
- Adding or removing liquidity reverts while a distribution or internal conversion is in progress. Otherwise no liquidity state is changed, although the hook donates its own fee share to in-range liquidity during swaps.
- Fee behaviour
- The pool's LP fee is static and not managed by the hook. The hook fee is set by the configured fee kind (static, tiered or dynamic), increased by any cooldown penalty and capped at 18 percent. The admin fee is a formula over the hook fee capped at 2 percent, with a configurable referral share. Fee exempt wallets skip the hook fee but still pay the admin fee. Accrued fees are split into admin, LP donation and distribution pools.
- Owner & admin controls
- A contract owner can replace the admin-fee configuration (treasury address, admin fee floor, formula parameters, referral share), call distributeAdminFees and transfer or renounce contract ownership (renounce is disabled). Each pool has a pool owner who can set fee kind and parameters, hook fee rates up to 10 percent default, tiered and dynamic configs, whitelist settings and wallets, distribution configuration, reward swap paths, cooldown, conversion slippage, referral address and fee thresholds. Pool owners can transfer or renounce their pool ownership. Parameter changes are blocked during distributions. There is no pause function or upgrade proxy visible in the ABI.
Enabled Uniswap v4 callbacks
afterInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
afterInitialize sets up per-pool configuration and records the initial tick. beforeAddLiquidity and beforeRemoveLiquidity block liquidity changes during distributions. beforeSwap and afterSwap compute and collect fees, enforce buy limits and update volume state. beforeSwapReturnDelta lets the hook take the fee from the specified leg. afterSwapReturnDelta lets the hook take the percentage fee after the swap.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: The contract owner can change the treasury address, admin fee formula and admin fee floor. Each pool owner can change fee kinds, rates, distribution routing, whitelist settings, referral address and cooldown, and can transfer pool ownership. Renouncing contract ownership is disabled, while pool ownership can be renounced.
Risk to user funds: The hook holds ERC-6909 balances of fee tokens and takes non-project tokens from swaps via return deltas. It can donate to pool liquidity, convert fees through pool hops, and transfer funds to treasury, reward and custom wallet recipients. Hook-held fees accrue until distributed, and distribution can be deferred, but users' fee deductions and pending balances depend on the hook's accounting remaining correct.
Security findings
- [medium] Owner can change the treasury and fee formulas at any time: updateAdminFee lets the contract owner redirect the treasury address and change admin-fee formula parameters, with the 2 percent cap as the only bound on the admin fee. Fees accrued before a change are routed under the new configuration when distributed.
- [medium] Pool owners control hook fee rates and distribution routing: A pool owner can set hook fees up to 10 percent default and 18 percent total, set the fee threshold, reward swap paths and custom wallet payouts, and change the referral address. A malicious owner could route fee flows to themselves within these bounds, subject to the pool-level and admin-level caps.
- [info] Hook takes tokens via return deltas and can reject trades: beforeSwapReturnDelta and afterSwapReturnDelta let the hook take tokens from swaps. Buy limits during the launch window and the nested-swap revert rules can block specific trades, including exact-output swaps that do not fill fully (ExactOutputNotFilled).
- [info] Distribution calls out to external reward and wallet contracts: Distribution runs external reward callbacks, custom wallet transfers and conversion swaps through the pool manager. The code adds reentrancy locks and slippage bounds (default 5 percent) on conversions, and uses try/catch for threshold-triggered distribution so user swaps are not bricked.
Contract details
- Verified source
- Yes (BasedBidHook)
- Compiler
- solc 0.8.35+commit.47b9dedd
- Bytecode size
- 23,014 bytes
- Upgradeable proxy
- No
- Detected patterns
- access-control, dynamic-fee, ownable, return-delta, rewards, self-unlock, tax
Pools using BasedBidHook
- ETH / FEESBACK (1.00% fee) — 24h volume $13.84K, TVL $18.32K, 90 swaps today
- ETH / AXO (1.00% fee) — 24h volume $100, TVL $3.34K, 3 swaps today
- ETH / TICKER (1.00% fee) — 24h volume $0.13, TVL $1.13, 1 swaps today
- ETH / HOODED (3.00% fee) — 24h volume $0.08, TVL $53, 1 swaps today
- ETH / YRH (5.00% fee) — 24h volume $0.07, TVL $2.06, 1 swaps today
- ETH / HOODED (2.00% fee) — 24h volume $0.06, TVL $38, 1 swaps today
- ETH / HOODED (2.50% fee) — 24h volume $0.04, TVL $25, 1 swaps today
- ETH / FLY (1.00% fee) — 24h volume <$0.01, TVL <$0.01, 1 swaps today
- ETH / LOOP (1.00% fee) — 24h volume <$0.01, TVL $267, 1 swaps today
- ETH / $PEDRO (1.00% fee) — 24h volume $0, TVL $250, 0 swaps today
- ETH / BASEDWORK (3.00% fee) — 24h volume $0, TVL $71, 0 swaps today
- ETH / BASED (1.00% fee) — 24h volume $0, TVL $70, 0 swaps today
- ETH / BIDZY (1.00% fee) — 24h volume $0, TVL $114, 0 swaps today
- ETH / BBID (1.00% fee) — 24h volume $0, TVL $35, 0 swaps today
- ETH / VEYRA (1.00% fee) — 24h volume $0, TVL $69, 0 swaps today
- ETH / GOB (1.00% fee) — 24h volume $0, TVL $45, 0 swaps today
- ETH / HV2TEST (1.00% fee) — 24h volume $0, TVL $18, 0 swaps today
- ETH / DACK (1.00% fee) — 24h volume $0, TVL $3.46, 0 swaps today
- ETH / BSBID (1.00% fee) — 24h volume $0, TVL $0.42, 0 swaps today
- ETH / HOODED (3.50% fee) — 24h volume $0, TVL $41, 0 swaps today