Custom pricing hook on Robinhood Chain
Uniswap v4 Hook Contract 0xe6f2c1ca3395de545b3313d1993000a34316a0cc on Robinhood Chain · Custom pricing
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 198 (52 traders)
- Total swaps
- 198
What it does
This hook takes a toll on swaps through return deltas, charging different rates for inbound and outbound trades, while holding the collected fees and a locked position that the owner can release or move.
How it works step by step
- Takes a fee (toll) on swaps via before/after swap return deltas, with separate inbound and outbound basis-point constants (INBOUND_TOLL_BPS, OUTBOUND_TOLL_BPS)
- Holds collected toll balances inside the hook and forwards them through remitToll()
- Implements a time-based lock (engageLock, extendLock, releaseLock, lockTerm, isLocked) that gates a position held by the hook, with dissolveLock and skimLockYield for settling it
- Uses a self-unlock pattern via unlockCallback and calls the PoolManager's unlock and modifyLiquidities, so it manages liquidity positions it owns
- Accepts ERC721 position NFTs via onERC721Received and records a keeper that can be appointed by the owner
- Exposes view helpers (corridor, corridorPoolKey, horizon, toll, tollHeld, observatory, positionManager) describing its configuration and held state
- Swap behaviour
- beforeSwap and afterSwap are enabled with return-delta permissions, so the hook can take a toll from swap amounts; trades in the inbound and outbound directions are charged different basis-point rates (exact direction and rates not confirmed from source).
- Liquidity behaviour
- Add and remove liquidity hooks are present as view selectors in the dispatcher, but no liquidity-changing hook permissions are enabled; liquidity is managed through the hook's own locked position via modifyLiquidities and the lock functions.
- Fee behaviour
- Charges a toll through return deltas using INBOUND_TOLL_BPS and OUTBOUND_TOLL_BPS; collected tokens accumulate in the hook (tollHeld) and are sent out by remitToll.
- Owner & admin controls
- A privileged owner (storage slot 0 address) can appoint a keeper, call releaseLock, dissolveLock, skimLockYield, and recover tokens; the exact authority checks cannot be confirmed without source.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize: validates or refuses pool initialization (HorizonInitRefused). beforeSwap: gates swaps and computes the toll. afterSwap: settles the toll and updates accounting. beforeSwapReturnDelta and afterSwapReturnDelta: let the hook take the toll out of swap amounts.
Security & trust assessment
Risk level: high, estimated (decoded bytecode, low confidence).
Who controls it: A single owner or keeper key can move collected tolls and locked position value through recover, skimLockYield, dissolveLock and releaseLock, and can appoint a keeper.
Risk to user funds: The hook holds toll balances and a locked liquidity position, and it can take a share of swap amounts through return deltas; privileged functions can move those balances.
Security findings
- [medium] Return-delta toll on swaps: beforeSwapReturnDelta and afterSwapReturnDelta let the hook take a share of each swap's amounts, so the hook directly affects trader outputs.
- [high] Owner recovery and yield skimming: recover, skimLockYield and dissolveLock move tokens held by the hook, including locked position value, to an address selected by the owner key.
- [medium] Lock controls over held position: engageLock, extendLock and releaseLock control a locked liquidity position owned by the hook, so the lock state can affect whether that position can be withdrawn.
- [medium] Unverified source: No verified source is available, so the admin checks, rate values and exact toll direction are inferred from decoded bytecode only.
Contract details
- Verified source
- No
- Bytecode size
- 9,286 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc20, moves-currency, return-delta, self-unlock, tax