YuppieHook on Robinhood Chain
Uniswap v4 Hook Contract 0x6609c8797c20992719466134e03a66c9d2c0c0cc on Robinhood Chain · Dynamic fee · Verified contract
- Volume (24h)
- $187
- Value locked (TVL)
- $982
- All-time volume
- $449.79K
- Pools using this hook
- 1
- Swaps (24h)
- 18 (18 traders)
- Total swaps
- 3,288
What it does
A Uniswap v4 hook for YUP pools that charges a registrar-set fee on the counter asset of enabled pools, keeps a TWAP oracle, and uses each swap to give one YUP account a turn to run its policy.
How it works step by step
- Charges a buy fee (up to 2%) and sell fee (up to 3%) on the counter asset of registered YUP pools, minted as PoolManager claims to the hook.
- Reverts swaps where the pool does not fill the amount the fee was charged on, so the fee cannot be evaded by price limits or shallow liquidity.
- Maintains a 64-observation cumulative tick oracle for registered pools, exposed via consult() for TWAP reads.
- Runs one round-robin heartbeat per swap that may call executePolicyFromHookFast on the next eligible YUP account, with gas reserved to finish the swap.
- Lets anyone call processTurns or processUrgentTurns to advance the same scheduler for normal or urgent account policies, bounded by gas and per-block stamps.
- Lets feeRecipient withdraw all accrued fee claims for a given currency.
- Swap behaviour
- Heartbeat-enabled pools charge the counter-asset fee in beforeSwap or afterSwap depending on orientation, verify the pool filled the fee basis, revert zero-fill swaps, and run one round-robin account heartbeat with reserved gas. Oracle-enabled pools checkpoint cumulative tick history on every swap.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Fee is charged on the counter asset (the non-YUP side) of heartbeat-enabled pools only, at a registrar-set rate capped at 2% buy and 3% sell. Exact-input buys and exact-output sells are charged in beforeSwap, others in afterSwap. Fees are minted to the hook's PoolManager claim balance and withdrawable by feeRecipient. Swaps where the pool does not fill the amount the fee was charged on revert with SwapFilledShortOfFeeBasis, so the fee cannot be evaded or inflated by price limits.
- Owner & admin controls
- Owner-less. The immutable registrar can enable or disable heartbeat and oracle pools and can set the buy and sell fee rates, lowering them to zero or raising them back up to the launch caps of 200 bps buy and 300 bps sell. The immutable feeRecipient alone can withdraw accrued fee claims. There is no proxy, pause or upgrade mechanism in the decoded bytecode.
Enabled Uniswap v4 callbacks
beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeSwap charges the input-side counter fee and reserves the fee basis; afterSwap charges the output-side fee, enforces that the pool filled the fee basis, reverts zero-fill swaps, checkpoints a TWAP oracle for oracle-enabled pools, and runs one round-robin heartbeat that may execute a single YUP account policy with reserved gas. beforeSwapReturnDelta and afterSwapReturnDelta let the hook take its fee as a delta on the swap.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: The registrar can change fee rates instantly (including to zero or to the caps) and can enable or disable pools, but cannot move user funds, pause swaps or change the fee recipient. The fee recipient can only withdraw accrued fee claims. Both roles are immutable addresses fixed at construction, with no admin transfer.
Risk to user funds: The hook holds no user principal. It can take a bounded swap fee on heartbeat-enabled YUP pools, accrued as PoolManager claims withdrawable only by feeRecipient, and it can revert swaps that fail the fee basis or zero-fill checks. Heartbeat execution can run an account's policy during a user's swap, which adds reentrancy-like exposure to whatever that policy does.
Security findings
- [info] Swap fees taken through return deltas: The hook takes its fee via beforeSwapReturnDelta and afterSwapReturnDelta, so it can extract value from every swap on heartbeat-enabled pools, bounded by the 2% buy and 3% sell caps.
- [medium] Heartbeat executes external account policies inside swaps: Every heartbeat-enabled swap triggers an external call to an account policy via executePolicyFromHookFast, which can move or act on that account's assets within the 1.2M gas frame.
- [low] Permissionless policy execution: Permissionless processTurns and processUrgentTurns let anyone force execution of registered account policies, bounded by gas caps and per-block turn stamps.
- [low] Registrar can change fees at will within caps: The registrar can set buy and sell fee rates to any value up to the caps at any time, including instantly before a swap.
Contract details
- Verified source
- Yes (YuppieHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 17,960 bytes
- Upgradeable proxy
- No
- Detected patterns
- dynamic-fee, moves-currency, oracle, return-delta, self-unlock
Pools using YuppieHook
- ETH / YUP (0.30% fee) — 24h volume $187, TVL $982, 18 swaps today