HookLegs on Robinhood Chain
Uniswap v4 Hook Contract 0xba97750d0f40fedf13a98abdb131a7a598b06888 on Robinhood Chain · Other · Verified contract
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 2
- Swaps (24h)
- 1,137 (194 traders)
- Total swaps
- 1,137
What it does
An index-basket hook that executes each swap leg of a multi-token index through Uniswap v3, Slipstream or v4 venues, pricing legs against oracle references and rejecting fills outside a price band.
How it works step by step
- Executes one exact-input swap per call on a pass-through quote or a registered Uniswap v3, Slipstream or v4 venue
- Checks each leg's output against a USD band derived from Chainlink or signed price references and rejects out-of-band fills
- Enforces a per-leg minimum output supplied in hook data and refuses partial fills
- Moves tokens between the PoolManager credit and vault ERC-20 balances (buy legs send output to the vault, sell legs pull input from the vault)
- Caps venue fees at 1% for hookless pools and 2% for hooked v4 venues, and emits a LegFilled event per leg
- Uses a transient-storage lock and a one-shot callback guard for v3 swap callbacks
- Swap behaviour
- On each swap, the hook runs one exact-input leg against a registry-listed venue (v3, Slipstream or hooked v4), checks the fill against a USD-reference band and minimum output, and settles the balance through the PoolManager and the basket vault.
- Liquidity behaviour
- No liquidity callbacks are enabled (beforeAddLiquidity is listed as a permission but the supplied library contains no liquidity logic that moves funds; the hook is an index basket hook whose legs swap through the pool manager).
- Fee behaviour
- Fees are not set by the hook itself at swap time: legs run on Uniswap v3, Aerodrome Slipstream or v4 venues at their pool fees, capped by MAX_POOL_FEE_PIPS (1%) for hookless venues and MAX_LEG_FEE_PIPS (2%) for hooked v4 venues. The index fee (25 to 100 bps, split between Bankr, creator and holders) is applied by the basket logic outside this library, so the exact split is not shown in the supplied legs code.
- Owner & admin controls
- Proxy to implementation 0x164d20b55427eb56f8c1801b3289e026a6c33b29, so the proxy admin can upgrade the logic that runs; upgrade authority and any owner or guardian roles are not visible in the supplied input and could not be confirmed. The supplied source describes guardian levers (buyable flag, asset status freezes, plan freezes) and governance delays, but who holds those keys is not established from the input.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeSwap, beforeSwapReturnDelta
beforeInitialize: pool initialisation checks for the index pool. beforeAddLiquidity: gates liquidity additions to the index pool. beforeSwap: routes each swap through the basket's leg execution, pricing checks and minimum-output checks. beforeSwapReturnDelta: lets the hook settle swap deltas itself, so it can take or credit tokens against the PoolManager.
Security & trust assessment
Risk level: medium (verified source, medium confidence).
Who controls it: A privileged key behind the proxy could replace the implementation, changing how legs are priced, banded, filled and settled, and therefore what users receive. Guardian levers described in the source can disable an asset (buyable false) or freeze rebalancing plans, which would block mints of affected indexes. Governance delays (21 days long, 48 hours short) limit but do not remove this power, and the actual delay controls are not visible in the input.
Risk to user funds: The hook holds and moves funds in the swap path: it takes output from the PoolManager to vault addresses, pays inputs from vaults into the PoolManager, and wraps or unwraps WETH for native-ETH venues. A guardian freeze or asset disable can block trades and mints, and a malicious upgrade could redirect or misprice legs. Usage is bounded by per-leg bands and minimum outputs.
Security findings
- [medium] Upgradeable proxy: The hook sits behind a proxy that delegates to an implementation at 0x164d20b5...; the logic can be replaced by whoever controls the upgrade path, which is not shown in the input.
- [medium] Hook settles swap deltas and moves currency: beforeSwapReturnDelta is enabled and the library takes tokens from the PoolManager and pays from the vault (take, settle, sync), so the hook directly moves user and vault funds during swaps.
- [info] Execution guards present: Legs are bounded by bands (LegOutOfBand), minimum outputs (LegBelowMinimum), fee caps (LegFeeTooHigh) and partial-fill checks, and v3 callbacks are guarded by a one-shot transient-storage lock, which limits price and reentrancy abuse in the supplied code.
- [medium] Reliance on signed and oracle prices: Legs price tokens against USD references from Chainlink feeds or co-signed off-chain attestations; a compromised or wrong signer or stale feed could make legs fill at off-market prices within the band.
Contract details
- Verified source
- Yes (HookLegs)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 22,549 bytes
- Upgradeable proxy
- Yes
- Detected patterns
- moves-currency, return-delta, upgradeable
Pools using HookLegs
- MAG7 / USDG (0.00% fee) — 24h volume $0, TVL $0, 697 swaps today
- WETH / MAG7 (0.00% fee) — 24h volume $0, TVL $0, 440 swaps today