FolioHook on Robinhood Chain

Uniswap v4 Hook Contract 0x6ad4ec3c5882c147cff0b90faa86080602d420cc on Robinhood Chain · Dynamic fee · Verified contract

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

What it does

A Uniswap v4 hook that sets a per-pool fee on swaps and captures a share of swap flow through return deltas, with liquidity and donate callbacks that appear to be passive.

How it works step by step

  • Stores a per-pool fee value set through register() and exposed via feeOf()
  • Runs swap logic in beforeSwap and afterSwap that updates per-pool storage
  • Uses beforeSwapReturnDelta and afterSwapReturnDelta to adjust swap deltas
  • Takes currency from the pool manager with take() and tracks collected amounts
  • Passes liquidity add, remove and donate callbacks through as views without state changes
Swap behaviour
beforeSwap and afterSwap execute fee logic, update per-pool storage, and use return deltas to take a portion of the swap amount and collect it in the hook.
Liquidity behaviour
Liquidity add and remove callbacks (beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity, afterRemoveLiquidity) and beforeDonate/afterDonate exist but appear to be passive pass-through views with no state changes observed.
Fee behaviour
Fee is registered per pool via register() and read via feeOf(); beforeSwap and afterSwap are present and the hook takes currency through take() and uses return deltas, so a portion of swap flow is likely collected by the hook and tracked in the collected mapping; exact fee rate formula cannot be fully determined without source.
Owner & admin controls
No admin controls found.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize and afterInitialize are used to set up pool state; beforeSwap and afterSwap run fee/swap logic and update storage; beforeSwapReturnDelta and afterSwapReturnDelta let the hook alter the swap's delta, which is how it captures a share of swap flow.

Security & trust assessment

Risk level: medium (decoded bytecode, medium confidence).

Who controls it: No owner or admin selector was found, so no single key appears able to change parameters; the register() function is callable by anyone, and the protocol relies on the caller to register pools correctly.

Risk to user funds: The hook can take and redirect swap-side currency via return deltas and hold collected balances in the contract; because funds move on every swap, a logic error in fee or accounting could affect pool flows, though no admin drain path was found.

Security findings

  • [medium] Return-delta currency capture: Hook uses beforeSwapReturnDelta and afterSwapReturnDelta and calls take(), so it can take currency from the pool and redirect it; this is an inherent mechanism that affects swap outcomes.
  • [medium] Permissionless pool registration: register() is nonpayable with no access control selector observed, and a BadFee error exists, so fee validation is the only guard on a per-pool fee that is then applied to swaps.
  • [low] Per-pool accounting keyed by pool id: Storage slot 0 maps keys to addresses and slot 1 maps keys to uint256 values that are read and written during swaps, indicating per-pool accounting that depends on caller-supplied pool keys.
  • [info] Immutable logic with no pause: No upgrade proxy or pausing mechanism was detected in the decoded selectors.

Contract details

Verified source
Yes (FolioHook)
Compiler
solc 0.8.28+commit.7893614a
Bytecode size
3,837 bytes
Upgradeable proxy
No
Detected patterns
moves-currency, return-delta

Pools using FolioHook