Custom pricing hook on Robinhood Chain
Uniswap v4 Hook Contract 0x541c980ed3e0b5ced0bde5352c32bdab9d26a0cc on Robinhood Chain · Custom pricing
- Volume (24h)
- $0
- Value locked (TVL)
- $8.83K
- All-time volume
- $12.07K
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 14,079
What it does
A Uniswap v4 hook that charges a bounded toll on swaps, tracks mining-style work and an anchor price, and routes accrued value to keepers, a platform recipient and protocol-owned liquidity reserves.
How it works step by step
- Charges a swap toll in basis points that is bounded between a minimum and maximum rate and can be retargeted over time.
- Splits collected toll between a platform recipient, keeper bounties and protocol-owned liquidity reserves.
- Maintains an anchor tick and an EMA of work per block to track price and activity across a TWAP window.
- Records miner or work contributions per block and lets participants claim rewards based on their work share.
- Mints and burns ERC-6909 claims and settles currency through the pool manager to account for pending HBTC and ETH.
- Exposes permissionless poke, harvest, settle and claim functions that advance state and distribute accrued balances.
- Swap behaviour
- beforeSwap and afterSwap are active and apply a toll with return-delta adjustments, while updating anchor tick and work/EMA state used for pricing and rewards.
- Liquidity behaviour
- beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity, afterRemoveLiquidity and beforeDonate/afterDonate exist as selectors and are invoked by the pool manager. Their logic cannot be fully characterised from the decoded input; the presence of polDeposited, polPendingDeposit and polReserve suggests protocol-owned liquidity accounting.
- Fee behaviour
- Hook applies a toll in basis points (tollRateBps, bounded by MIN_TOLL_BPS and MAX_TOLL_BPS, starting at INITIAL_TOLL_BPS) and accrues totalTollCollected; the toll is split between a platform share (PLATFORM_BPS), a keeper bounty (KEEPER_BPS, KEEPER_BOUNTY_WEI, keeperEscrow) and POL/net reserves. Exact fee mechanics could not be confirmed without source.
- Owner & admin controls
- No admin controls found. No owner, pause or upgrade selectors were decoded; the contract exposes permissionless entry points (poke, settleFor, claim, claimUpTo, harvest, flushPol, settleGenesis, claimPlatformRevenue) and parameters appear fixed as constants (PLATFORM_BPS, KEEPER_BPS, INITIAL_TOLL_BPS, MIN/MAX_TOLL_BPS, MIN/MAX_FACTOR_WAD, TWAP_WINDOW, etc.). Recipient addresses (platformRecipient, hbtc, launchDeployer, quoteCurrency) are pure getters, suggesting immutable configuration.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize: validates pool initialisation (UnauthorizedInitialize, PoolAlreadyInitialized). beforeSwap and afterSwap: implement swap-time toll, anchor tick and TWAP/EMA logic, and return deltas (beforeSwapReturnDelta, afterSwapReturnDelta) that can take or reallocate swap amounts. beforeSwap and afterSwap also settle accounting through the pool manager (unlock, take, settle, mint, burn, sync).
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, low confidence).
Who controls it: No privileged owner is evident from the decoded selectors, so direct admin abuse appears limited. However the hook takes and redistributes value on every swap and relies on oracle-like state (anchorTick, emaWorkPerBlock, windowWork) that could be manipulated by large trades or by parties controlling mining/work registration (mine-like selectors MiningNotOpen, TradingNotOpen, ZeroWork present). Immutable recipients mean fees flow to fixed addresses.
Risk to user funds: The hook can take tokens via return deltas on swaps and holds ETH/HBTC escrow and POL reserves, so user and pool funds pass through contract-controlled accounting. Exposure depends on accounting correctness and oracle integrity, which could not be confirmed from bytecode alone.
Security findings
- [medium] Hook modifies swap deltas: Swap callbacks use beforeSwapReturnDelta and afterSwapReturnDelta, meaning the hook can alter the amounts users receive and take tokens from the pool flow.
- [medium] Price and work state may be manipulable: Anchor tick, EMA work per block and TWAP-style windows are updated from in-block state (poke, harvest, settleFor), which may be influenced by sandwiching or by manipulating mining/work totals.
- [medium] Hook custodies pool and protocol funds: Hook holds ETH and HBTC balances (keeperEscrow, polReserve, totalPendingHbtc, totalUnfilledEth) and mints/burns ERC-6909 claims, so funds are custodied by the contract logic.
- [low] Permissionless settlement and claim functions: Several reward and settlement entry points (claim, claimUpTo, settleFor, settleGenesis, claimPlatformRevenue, flushPol) are callable by anyone; correctness depends on accounting invariants not verifiable without source.
- [info] Unverified source: No verified source; function semantics are inferred from selector names only.
Contract details
- Verified source
- No
- Bytecode size
- 28,264 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc20, erc6909-claims, moves-currency, return-delta, self-unlock
Pools using Custom pricing hook
- NVDA / BTCNVDA (0.00% fee) — 24h volume $0, TVL $8.83K, 0 swaps today