Access control hook on Robinhood Chain

Uniswap v4 Hook Contract 0x6e74ed45d4324bcc4884fb38bda7303ce878a880 on Robinhood Chain · Access control

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

What it does

This hook restricts liquidity additions and swaps on the pool to whitelisted addresses set by the owner, and it records pool fee configuration at initialization, but from the decoded bytecode it is unclear whether any trades pay more or less than the pool's base fee.

How it works step by step

  • Ownable contract with owner, two-step ownership transfer (transferOwnership, acceptOwnership) and a pendingOwner slot
  • Maintains a whitelist mapping of addresses managed by setWhitelist and setWhitelistBatch
  • Stores a default fee configuration (uint24/uint16 packed fields) and per-pool fee config keyed by pool id, set via a function at selector 0x266e7b54
  • beforeInitialize records pool key data, creator and fee config for each pool id and increments a registration counter
  • beforeAddLiquidity and beforeSwap are gated by a whitelist check and a per-pool swap counter; beforeSwap updates the swap counter for the pool
  • Exposes view functions for pool registration status, pool key lookup, pool creator, fee config and config versions
Swap behaviour
beforeSwap is enabled and performs a whitelist-gated update of a per-pool swap counter; it does not appear to return a fee override or delta, so the pool's configured fee applies to swaps. Which trades pay more or less cannot be determined from the decoded bytecode.
Liquidity behaviour
beforeAddLiquidity is enabled and appears to check whether the caller is whitelisted before allowing liquidity to be added; removal is not hooked.
Fee behaviour
Stores default and per-pool fee configuration (packed uint24 and uint16 fields) that is read during beforeInitialize and by fee config views; the decoded bytecode does not clearly show whether it is passed to the pool as a dynamic fee override, so this is uncertain.
Owner & admin controls
The owner can transfer ownership in two steps, add or remove addresses from the whitelist (single or batch), set the registrar and change the default and per-pool fee configuration. Pausing and upgradeability were not identified.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap

beforeInitialize registers pools and their fee configuration; beforeAddLiquidity restricts liquidity additions via the whitelist; beforeSwap tracks swaps per pool and gates access.

Security & trust assessment

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

Who controls it: A single owner key can add itself or others to the whitelist, block liquidity or swaps for non-whitelisted addresses, change fee configuration and set the registrar, which is a high degree of control over pool participants.

Risk to user funds: The hook does not appear to hold tokens or move funds through return deltas. Its main exposure is that the whitelist can block users from adding liquidity or swapping, and that fee changes can alter costs for traders.

Security findings

  • [medium] Owner-controlled whitelist gates liquidity and swaps: Whitelist mapping is written by setWhitelist and setWhitelistBatch and read by beforeAddLiquidity and beforeSwap, so the owner can restrict who may add liquidity or trade with the hooked pool.
  • [medium] Owner can change fee configuration: Packed fee config fields are writable by the owner through the function at 0x266e7b54, which could raise fees paid by traders or change pool parameters.
  • [low] Pool registration can overwrite stored data: beforeInitialize writes pool key, creator and fee config storage for each pool id; overwriting behaviour on duplicate ids could not be confirmed from bytecode alone.
  • [info] Two-step ownership transfer: transferOwnership is paired with acceptOwnership and a pendingOwner slot, which reduces the risk of accidental transfer to a wrong address.

Contract details

Verified source
No
Bytecode size
10,885 bytes
Upgradeable proxy
No
Detected patterns
access-control, ownable

Pools using Access control hook