PRHook on Robinhood Chain

Uniswap v4 Hook Contract 0xafc105fb435cb085dc13699882977b02889800cc on Robinhood Chain · Fee sharing · Verified contract

Volume (24h)
$0
Value locked (TVL)
$0
All-time volume
$0.08
Pools using this hook
1
Swaps (24h)
0 (0 traders)
Total swaps
2

What it does

This hook adds a 0% to 5% buyback fee to swaps in allow-listed PR pools, taken in PR on buys and in the other token on sells and sent to a buyback vault, while LPs can withdraw freely.

This read was written for the hook 0xc3c1…c0cc on Robinhood Chain and reused here: the two share a code shape, so constants such as fees, owners and addresses can differ.

How it works step by step

  • Charges an extra fee on swaps in allow-listed pools that contain the PR token, taken from the swap output.
  • Buys (receiving PR) pay the fee in PR; sells (receiving the other token, e.g. ETH) pay it in that token.
  • Fees are sent straight to a buyback vault set by the owner.
  • Buy and sell fee rates are adjustable by the owner or an operator, but never above 5%.
  • Owner can pause fee collection or remove pools from the allowlist, which simply turns the fee off; swaps still work.
Swap behaviour
On exact-input swaps the trader receives the swap output minus the buy or sell fee (0% to 5%); on exact-output swaps the trader gets exactly the requested amount but pays extra input to cover a fee of up to 5% of the requested output. Swaps are never blocked; pausing or non-allowlisted pools just mean no extra fee.
Liquidity behaviour
No liquidity callbacks; LPs can add and withdraw freely.
Fee behaviour
An extra hook fee of 0% to 5% (separate buy and sell rates, hard-capped at 5%) is charged on top of the pool's normal LP fee and sent to the buyback vault. On exact-output swaps that only partly fill, the fee is calculated on the requested amount rather than the filled amount.
Owner & admin controls
The owner can set fee bounds and the operator or owner can set buy and sell rates, all capped at 5%; the owner can also change the buyback vault, allowlist pools, pause fee collection, and rescue tokens held by the hook itself. Ownership uses a two-step transfer.

Enabled Uniswap v4 callbacks

beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeSwap: collects the fee on exact-output swaps; afterSwap: collects the fee on exact-input swaps; beforeSwapReturnDelta: adds the fee to the trader's input on exact-output swaps; afterSwapReturnDelta: deducts the fee from the trader's output on exact-input swaps.

Security & trust assessment

Risk level: low, estimated (decoded bytecode, high confidence).

Who controls it: The owner (and an operator for rates) controls fee rates up to 5%, the fee destination, the pool allowlist, and pausing fee collection. The worst they can do is charge traders up to 5% per swap and redirect those fees.

Risk to user funds: The hook takes 0% to 5% of swap output (or adds that to input on exact-output swaps) and sends it to the buyback vault; rescue only moves tokens sitting in the hook itself. LP principal in the PoolManager cannot be locked or drained.

Security findings

  • [info] Fee hard-capped at 5%: Buy and sell fees can be changed by the owner or operator but can never exceed 5% due to a hard-coded limit.
  • [low] Fee on requested amount for partial fills: For exact-output swaps hitting a price limit, the fee is charged on the requested output rather than the actual fill, so traders may overpay slightly in that edge case.
  • [info] Unrestricted LP withdrawals: Remove-liquidity callbacks are disabled, so the hook cannot block or charge LP withdrawals.

Contract details

Verified source
Yes (PRHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
9,635 bytes
Upgradeable proxy
No
Detected patterns
access-control, liquidity-management, ownable, pausable, return-delta

Pools using PRHook